Файловый менеджер - Редактировать - /home/clickysoft/public_html/rgr.clickysoft.net/resources/views/practices/index.blade.php
Назад
@extends('layouts.master') @section('page-title') Practice Management @endsection @section('content') <style> .pac-container { z-index: 1051 !important; } </style> <div class="main-data-content"> <div class="row"> <div class="col-md-6 col-sm-6 col-12"> <h4 class="pm-heading"> Practice Managment </h4> </div> <div class="col-md-6 col-sm-6 col-12"> <div class="new-project-btn"> <a href="javascriptvoid:(0)" id="newPractice" onclick="" data-toggle="modal" data-target="#exampleModal-table" class="btn btn-primary"><i class="fa fa-plus" aria-hidden="true"></i> New Practice</a> </div> </div> </div> <div class="db-dashboard-table"> <div class="table-responsive"> <table class="table" id="customtable"> <thead> <tr> <th>#</th> <th>Practice Name</th> <th>Location</th> <th width="250px">Opening Hours</th> <th>Status</th> <th>Is Featured</th> <th>Is Hidden</th> <th class="db-right" width="170px">Action</th> </tr> </thead> <tbody> </tbody> </table> </div> </div> </div> <div id="confirmModal" class="modal" tabindex="-1" role="dialog"> <div class="modal-dialog" role="document"> <div class="modal-content"> <div class="modal-header"> <h5 class="modal-title">Confirmation</h5> <button type="button" class="close" data-dismiss="modal" aria-label="Close"> <span aria-hidden="true">×</span> </button> </div> <div class="modal-body"> <h6 class="text-center">Are you sure you want to remove this practice and all the data associated with this practice?</h6> </div> <div class="modal-footer"> <button type="button" name="ok_button" id="ok_button" class="btn btn-danger">OK</button> <button type="button" class="btn btn-default" data-dismiss="modal">Cancel</button> </div> </div> </div> </div> <div id="statusModal1" class="modal" tabindex="-1" role="dialog"> <div class="modal-dialog" role="document"> <div class="modal-content"> <div class="modal-header"> <h5 class="modal-title">Confirmation</h5> <button type="button" class="close" data-dismiss="modal" aria-label="Close"> <span aria-hidden="true">×</span> </button> </div> <div class="modal-body"> <h6 class="text-center">Are you sure you want to Deactive this practice?</h6> </div> <div class="modal-footer"> <button type="button" name="status_button1" id="status_button1" class="btn btn-danger">OK</button> <button type="button" class="btn btn-default" data-dismiss="modal">Cancel</button> </div> </div> </div> </div> <div id="statusModal2" class="modal" tabindex="-1" role="dialog"> <div class="modal-dialog" role="document"> <div class="modal-content"> <div class="modal-header"> <h5 class="modal-title">Confirmation</h5> <button type="button" class="close" data-dismiss="modal" aria-label="Close"> <span aria-hidden="true">×</span> </button> </div> <div class="modal-body"> <h6 class="text-center">Are you sure you want to Active this practice?</h6> </div> <div class="modal-footer"> <button type="button" name="status_button2" id="status_button2" class="btn btn-success">OK</button> <button type="button" class="btn btn-default" data-dismiss="modal">Cancel</button> </div> </div> </div> </div> <!-- TABLE MODAL BEGIN --> <div class="modal fade" id="exampleModal-table" tabindex="-1" role="dialog" aria-labelledby="exampleModalLabel" aria-hidden="true"> <div class="modal-dialog" role="document"> <div class="modal-content scroll"> <div class="modal-header"> <h5 class="modal-title" id="exampleModalLabel">Add new Practice</h5> <button type="button" class="close" data-dismiss="modal" aria-label="Close"> <span aria-hidden="true">×</span> </button> </div> <div class="modal-body"> <form id="addNewPractice" enctype="multipart/form-data"> <div class="row"> <div class="col-md-12"> <div class="messages"></div> </div> </div> <div class="row"> <div class="col-md-12 col-sm-12 col-12"> <div class="main-flex-cls"> <div class="field-cls"> <label class="label-text" for="name">Name*</label> <input type="text" id="name" autocomplete="off" name="name" value="{{ old('name') }}" class="form-control" placeholder="Name" required> </div> </div> </div> </div> <div class="row"> <div class="col-md-12 col-sm-12 col-12"> <div class="main-flex-cls"> <div class="field-cls"> <label class="label-text" for="email">Email*</label> <input type="email" id="email" autocomplete="off" name="email" value="{{ old('email') }}" class="form-control" placeholder="Email" required> @error('email') <span class="invalid-feedback" role="alert"> <strong>{{ $message }}</strong> </span> @enderror </div> <div class="field-cls"> <label class="label-text" for="phone">Phone*</label> <input type="text" id="phone" autocomplete="off" name="phone" value="{{ old('phone') }}" class="form-control" placeholder="Phone" required> </div> </div> </div> </div> <div class="row"> <div class="col-md-12 col-sm-12 col-12"> <div class="main-flex-cls"> <div class="field-cls"> <label class="label-text" for="address">Address*</label> <input type="text" id="address" autocomplete="off" name="address" value="{{ old('address') }}" class="form-control" placeholder="Street address" required> </div> <div class="field-cls"> <label class="label-text" for="address_2"> </label> <input type="text" id="address_2" autocomplete="off" name="address_2" value="{{ old('address_2') }}" class="form-control" placeholder="Street address line 2"> </div> </div> </div> </div> <div class="row"> <div class="col-md-12 col-sm-12 col-12"> <div class="main-flex-cls"> <div class="field-cls"> <input type="text" id="city" autocomplete="off" name="city" value="{{ old('city') }}" class="form-control" placeholder="City*" required> </div> <div class="field-cls"> <input type="text" id="country" autocomplete="off" name="country" value="{{ old('country') }}" class="form-control" placeholder="Country*" required> </div> <div class="field-cls"> <input type="text" id="zip_code" autocomplete="off" name="zip_code" value="{{ old('zip_code') }}" class="form-control" placeholder="Postal code"> </div> </div> </div> </div> <div class="row"> <div class="col-md-12 col-sm-12 col-12"> <div class="main-flex-cls"> <div class="field-cls"> <input type="text" id="lat" autocomplete="off" name="latitude" value="{{ old('latitude') }}" class="form-control" placeholder="Latitude*" readonly> </div> <div class="field-cls"> <input type="text" id="long" autocomplete="off" name="longitude" value="{{ old('longitude') }}" class="form-control" placeholder="Longitude*" readonly> </div> </div> </div> </div> <div class="row"> <div class="col-md-12 col-sm-12 col-12"> <div class="main-flex-cls"> <div class="field-cls"> <label class="label-text" for="address">Google Map*</label> <div id="map-canvas" style="height: 300px"></div> </div> </div> </div> </div> <div class="row"> <div class="col-md-12 col-sm-12 col-12"> <div class="modal-speciality"> <label>Speciality</label> <select autocomplete="off" name="speciality[]" id="speciality" class="form-control @error('speciality') is-invalid @enderror" multiple> @foreach ($specialities as $speciality) <option value="{{ $speciality->id }}">{{ $speciality->title }} </option> @endforeach </select> </div> </div> </div> <div class="row mt-3"> <div class="col-md-12 col-sm-12 col-12"> <div class="main-flex-cls"> <div class="field-cls"> <label class="label-text" for="hours">Opening Hours</label> @php $days = ['Monday', 'Tuesday', 'Wednesday', 'Thursday', 'Friday', 'Saturday', 'Sunday']; @endphp @for ($i = 0; $i <= 6; $i++) <div class="col-md-12 row mb-3"> <div class="col-md-3 text-md-end">{{ $days[$i] }}: </div> <div class="col-md-1"> <div class="timebox"> <label class="switch" for="check_{{ $i }}"> <input type="checkbox" autocomplete="off" name="check_{{ $i }}" id="check_{{ $i }}" data-id="{{ $i }}"> <div class="slider round"></div> </label> </div> {{-- <input type="checkbox" autocomplete="off" name="check_{{ $i }}" id="check_{{ $i }}" class="js-switch" data-id="{{ $i }}"> --}} </div> <div class="col-md-4"> <input type="text" id="opening_hour_{{ $i }}" class="form-control opening_hour" autocomplete="off" name="opening_hour_{{ $i }}" readonly placeholder="Opening Time"> </div> <div class="col-md-4 "> <input id="closing_hour_{{ $i }}" type="text" class="form-control closing_hour" autocomplete="off" name="closing_hour_{{ $i }}" readonly placeholder="Closing Time"> </div> </div> @endfor </div> </div> </div> </div> <div class="row upload-img-div"> <div class="col-md-5 col-sm-5 col-12"> <div class="col-ting"> <div class="control-group file-upload" id="file-upload1"> <h6 class="upload-pro-img">Upload Profile Image*</h6> <div class="image-box text-center"> <p>Choose Image</p> <img src="" alt=""> </div> <div class="controls" style="display: none;"> <input type="file" id="profile_name" autocomplete="off" name="profile_name" required> </div> </div> </div> </div> <div class="col-md-7 col-sm-7 col-12"> </div> </div> <div class="row"> <div class="col-md-12 col-sm-12 col-12"> <div class="main-flex-cls"> <div class="field-cls"> <label class="label-text">Description</label> <textarea cols="4" rows="10" autocomplete="off" name="description" id="summary-ckeditor">{!! old('description') !!}</textarea> </div> </div> </div> </div> <div class="row"> <div class="col-md-12 col-sm-12 col-12"> <div class="main-flex-cls"> <div class="field-cls"> <label class="label-text">Other Information</label> <textarea cols="4" rows="10" autocomplete="off" name="other_info" id="other-info">{!! old('other_info') !!}</textarea> </div> </div> </div> </div> <div class="row"> <div class="col-md-3 text-md-end">Gold Status </div> <div class="col-md-1"> <div class="timebox"> <label class="switch" for="gold_status"> <input type="checkbox" autocomplete="off" name="gold_status" id="gold_status"> <div class="slider round"></div> </label> </div> </div> </div> <div class="row"> <div class="col-md-3 text-md-end">Hide</div> <div class="col-md-1"> <div class="timebox"> <label class="switch" for="hide_show"> <input type="checkbox" autocomplete="off" name="hide_show" id="hide_show"> <div class="slider round"></div> </label> </div> </div> </div> <div class="signup-btn submit-modal-btn"> <button type="submit" class="btn btn-primary btn-practice">Submit</button> </div> </form> </div> </div> </div> </div> <!-- TABLE MODAL END --> @endsection @section('script') <script src="https://maps.googleapis.com/maps/api/js?key=AIzaSyDCNf8ukepsehUSLC22cK61AHUIkoXJibI&libraries=places"> </script> <script type="text/javascript"> var mapInitialized = false; $(document).ready(function() { $("#addNewPractice").on("submit", function (event) { event.preventDefault(); var formData = new FormData(this); $.ajaxSetup({ headers: { 'X-CSRF-TOKEN': $('meta[name="_token"]').attr('content') } }); $.ajax({ url: "{{ route('practices.store') }}", method: 'post', data: formData, processData: false, cache: false, contentType: false, beforeSend: function() { $('.btn-practice').html('Please wait...').attr('disabled',true); }, success: function (result) { $('.btn-practice').html(result.message); setTimeout(function (){ window.location = (result.redirect) }, 2000); }, error:function (result){ var errors = result.responseJSON.error; var errorsHtml = '<div class="alert alert-danger"><ul>'; $.each( errors, function( key, value ) { errorsHtml += '<li>'+ value[0] + '</li>'; }); errorsHtml += '</ul></div'; $('.messages').html(errorsHtml); $("#exampleModal-table").scrollTop(0); $('.btn-practice').html('Oops some error occurred').attr('disabled',true); setTimeout(function (){ $('.btn-practice').html('Submit').attr('disabled',false); }, 3000); } }); }); // Google Map function initialize() { var addressInput = document.getElementById('address'); var autoComplete = new google.maps.places.Autocomplete(addressInput); google.maps.event.addListener(autoComplete, 'place_changed', function() { var place = autoComplete.getPlace(); // place variable will have all the information you are looking for. document.getElementById("lat").value = place.geometry['location'].lat(); document.getElementById("long").value = place.geometry['location'].lng(); changeMarkerPosition(); }); } $('#exampleModal-table').on('shown.bs.modal', function(e) { // google.maps.event.addDomListener(window, 'load', initialize); initialize(); googleMap(); showlocation(); $('#summary-ckeditor2').summernote({ toolbar: [ ['insert', ['picture']], ['fontsize', ['fontsize']], ['bold', ['bold']], ['italic', ['italic']], ['underline', ['underline']], ['strikethrough', ['strikethrough']], ['link', ['link']], ['hr', ['hr']], ['table', ['table']], ['color', ['color']], ['clear', ['clear']], ['style', ['style']], ['ol', ['ol']], ['ul', ['ul']], ['paragraph', ['paragraph']], ['height', ['height']], ['codeview', ['codeview']], ['undo', ['undo']], ['redo', ['redo']] ], height: 200, foreColor: 'black', dialogsInBody: true }); }); $('#exampleModal-table').on('hidden.bs.modal', function(e) { $("#newPractice").trigger("reset"); $(this) .find("input,textarea,select") .val('') .end() .find("input[type=checkbox], input[type=radio]") .prop("checked", "") .end(); @for ($i = 0; $i <= 6; $i++) $('#opening_hour_' + {{ $i }}).prop('readonly', true); $('#closing_hour_' + {{ $i }}).prop('readonly', true); @endfor $('#lat').val(parseFloat(55.9546915)); $('#long').val(parseFloat(-3.1996055)); }) // Google Map // Datatable var table = $('#customtable').DataTable({ processing: true, serverSide: true, ajax: { url: "{{ route('practices.index') }}" }, columns: [{ data: 'DT_RowIndex', name: 'DT_RowIndex' }, { data: 'name', name: 'name' }, { data: 'location', name: 'location', }, { data: 'opening', name: 'opening', }, { data: 'status', name: 'status', }, { data: 'is_featured', name: 'is_featured', }, { data: 'is_hide', name: 'is_hide', }, { data: 'action', name: 'action', searchable: false, orderable: false, }, ] }); // Datatable // opening_hour & closing_hour On Off Radio $('input[type="checkbox"]').change(function() { id = $(this).attr("data-id"); if ($(this).is(":checked")) { $('#opening_hour_' + id).prop('readonly', false); $('#closing_hour_' + id).prop('readonly', false); } else { $('#opening_hour_' + id).prop('readonly', true); $('#opening_hour_' + id).prop('value', ''); $('#closing_hour_' + id).prop('readonly', true); $('#closing_hour_' + id).prop('value', ''); } }); // opening_hour & closing_hour On Off Radio // opening_hour & closing_hour $('.opening_hour, .closing_hour').datetimepicker({ format: 'hh:mm A', icons: { up: "fa fa-arrow-up", down: "fa fa-arrow-down" } }); // opening_hour & closing_hour // speciality multiselect $('#speciality').select2(); // speciality multiselect // texteditor }); // Delete Section var id; $(document).on('click', '.delete', function() { id = $(this).attr('id'); $('#confirmModal').modal('show'); }); $('#ok_button').click(function() { window.location = "/admin/practices/" + id + "/delete"; }); // Delete Section // Status Section var statusId; $(document).on('click', '.status0', function() { statusId = $(this).attr('id'); $('#statusModal2').modal('show'); }); $('#status_button2').click(function() { window.location = "/admin/practices/" + statusId + "/status"; }); $(document).on('click', '.status1', function() { statusId = $(this).attr('id'); $('#statusModal1').modal('show'); }); $('#status_button1').click(function() { window.location = "/admin/practices/" + statusId + "/status"; }); // Status Section // profile Image $(".image-box").click(function(event) { var previewImg = $(this).children("img"); $(this).siblings().children("input").trigger("click"); $(this).siblings().children("input").change(function() { var reader = new FileReader(); reader.onload = function(e) { var urll = e.target.result; $(previewImg).attr("src", urll); previewImg .parent() .css("background", "transparent"); previewImg.show(); previewImg.siblings("p").hide(); }; reader.readAsDataURL(this.files[0]); }); }); // profile Image // google map var map = null; var marker; function googleMap() { google.maps.event.addDomListener(window, 'load', initMap); function initMap() { document.getElementById('lat').value = parseFloat(55.9546915); document.getElementById('long').value = parseFloat(-3.1996055); var mapOptions = { center: new google.maps.LatLng(parseFloat(55.9546915), parseFloat(-3.1996055)), zoom: 15, mapTypeId: google.maps.MapTypeId.ROADMAP }; map = new google.maps.Map(document.getElementById("map-canvas"), mapOptions); google.maps.event.addListener(map, 'center_changed', function() { document.getElementById('lat').value = map.getCenter().lat(); document.getElementById('long').value = map.getCenter().lng(); }); $('<div/>').addClass('centerMarker').appendTo(map.getDiv()) .click(function() { var that = $(this); if (!that.data('win')) { that.data('win', new google.maps.InfoWindow({ content: 'this is the center' })); that.data('win').bindTo('position', map, 'center'); } that.data('win').open(map); }); // function showlocation() { // if ("geolocation" in navigator) { // navigator.geolocation.getCurrentPosition(liveLocation, error); // } else { // console.warn("geolocation IS NOT available"); // } // } // function error(err) { // console.warn('ERROR(' + err.code + '): ' + err.message); // }; // function liveLocation(position) { // var lat = position.coords.latitude; // var lon = position.coords.longitude; // document.getElementById('lat').value = lat; // document.getElementById('long').value = lon; // var latLong = new google.maps.LatLng(lat, lon); // map.setZoom(16); // map.setCenter(latLong); // } var lat = document.getElementById('lat').value; var lon = document.getElementById('long').value; var latLong = new google.maps.LatLng(lat, lon); map.setZoom(16); map.setCenter(latLong); google.maps.event.addDomListener(window, 'load', initMap); } function changeMarkerPosition() { var lat = document.getElementById('lat').value; var lon = document.getElementById('long').value; var latLong = new google.maps.LatLng(lat, lon); map.setZoom(16); map.setCenter(latLong); google.maps.event.addDomListener(window, 'load', initMap); } } function changeMarkerPosition() { var lat = document.getElementById('lat').value; var lon = document.getElementById('long').value; var latLong = new google.maps.LatLng(lat, lon); map.setZoom(16); map.setCenter(latLong); google.maps.event.addDomListener(window, 'load', initMap); } function showlocation() { if ("geolocation" in navigator) { navigator.geolocation.getCurrentPosition(callback, error); } else { console.warn("geolocation IS NOT available"); } } function error(err) { console.warn('ERROR(' + err.code + '): ' + err.message); }; function callback(position) { var lat = position.coords.latitude; var lon = position.coords.longitude; document.getElementById('lat').value = lat; document.getElementById('long').value = lon; var latLong = new google.maps.LatLng(lat, lon); map.setZoom(16); map.setCenter(latLong); } googleMap(); showlocation(); // google map $('#other-info').summernote({ toolbar: [ ['fontsize', ['fontsize']], ['bold', ['bold']], ['italic', ['italic']], ['underline', ['underline']], ['strikethrough', ['strikethrough']], ['link', ['link']], ['hr', ['hr']], ['table', ['table']], ['color', ['color']], ['clear', ['clear']], ['style', ['style']], ['ol', ['ol']], ['ul', ['ul']], ['paragraph', ['paragraph']], ['height', ['height']], ['codeview', ['codeview']], ['undo', ['undo']], ['redo', ['redo']] ], height: 200, foreColor: 'black', dialogsInBody: true }); </script> @endsection
| ver. 1.4 |
Github
|
.
| PHP 8.1.29 | Генерация страницы: 0 |
proxy
|
phpinfo
|
Настройка