Файловый менеджер - Редактировать - /home/clickysoft/public_html/rgr.clickysoft.net/resources/views/practices/edit.blade.php
Назад
@extends('layouts.master') @section('page-title') Edit Practice @endsection @section('content') @php use App\Models\Speciality; use App\Models\OpeningHour; use App\Models\PracticeSpeciality; @endphp <div class="main-data-content bg-white"> <div class="row"> <div class="col-md-6 col-sm-6 col-12"> <h4 class="pm-heading"> Edit Practice </h4> </div> <div class="col-md-6 col-sm-6 col-12"> <div class="new-project-btn back"> <a href="{{ route('practices.index') }}" class="btn btn-primary edit"><i class="fa fa-arrow-left" aria-hidden="true"></i>Back</a> </div> </div> </div> <div class="bg-white"> <form action="{{ route('practices.update', $practice->id) }}" method="POST" enctype="multipart/form-data"> @method('PUT') @csrf @include('layouts.flash-message') @csrf <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="{{ $practice->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" style="align-items: unset;"> <div class="field-cls"> <label class="label-text" for="email">Email*</label> <input type="email" id="email" autocomplete="off" name="email" value="{{ $practice->email }}" class="form-control" placeholder="Email" required> </div> <div class="field-cls"> <label class="label-text" for="phone">Phone*</label> <input type="text" id="phone" autocomplete="off" name="phone" value="{{ $practice->phone }}" class="form-control" placeholder="Phone" required> </div> <div class="field-cls"> <label class="label-text" for="phone"> Other Emails </label> <input type="text" id="phone" autocomplete="off" name="other_emails" value="{{ $practice->other_emails }}" class="form-control" placeholder="abc@email.com,xyz@email.com"> <div class=""> <small>Multiple emails can be send by using a comma between emails.</small> </div> </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="{{ $practice->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="{{ $practice->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="{{ $practice->city }}" class="form-control" placeholder="City*" required> </div> <div class="field-cls"> <input type="text" id="country" autocomplete="off" name="country" value="{{ $practice->country }}" class="form-control" placeholder="Country*" required> </div> <div class="field-cls"> <input type="text" id="zip_code" autocomplete="off" name="zip_code" value="{{ $practice->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="{{ $practice->latitude }}" class="form-control" placeholder="Latitude*" readonly> </div> <div class="field-cls"> <input type="text" id="long" autocomplete="off" name="longitude" value="{{ $practice->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++) @php $hours = OpeningHour::getByPracticeIdWithDay($practice->id, $days[$i]); @endphp <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" name="check_{{ $i }}" id="check_{{ $i }}" data-id="{{ $i }}" data-open="{{ $hours->opening_hour }}" data-close="{{ $hours->closing_hour }}" {{ !empty($hours->opening_hour) ? 'checked' : '' }}> <div class="slider round"></div> </label> </div> </div> <div class="col-md-4"> <input type="text" id="opening_hour_{{ $i }}" class="form-control opening_hour" name="opening_hour_{{ $i }}" {{ !empty($hours->opening_hour) ? '' : 'readonly' }} placeholder="Opening Time" value="{{ $hours->opening_hour }}"> </div> <div class="col-md-4 "> <input id="closing_hour_{{ $i }}" type="text" class="form-control closing_hour" name="closing_hour_{{ $i }}" {{ !empty($hours->closing_hour) ? '' : 'readonly' }} placeholder="Closing Time" value="{{ $hours->closing_hour }}"> </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"> </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" class="summernote">{!! $practice->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" class="summernote">{!! $practice->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" {{ $practice->is_featured == 1 ? 'checked' : '' }}> <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" {{ $practice->hide == 1 ? 'checked' : '' }}> <div class="slider round"></div> </label> </div> </div> </div> <div class="signup-btn submit-modal-btn"> <button type="submit" class="btn btn-primary">Submit</button> </div> </form> </div> </div> @endsection @section('script') <script src="https://maps.googleapis.com/maps/api/js?key=AIzaSyDCNf8ukepsehUSLC22cK61AHUIkoXJibI&libraries=places"> </script> <script> $(document).ready(function() { googleMap(); initialize(); // showlocation(); @php $practiceSpecialities = PracticeSpeciality::where('practice_id', $practice->id) ->pluck('speciality_id') ->toArray(); $specialities = Speciality::whereIn('id', $practiceSpecialities)->get(); $specialitiesAll = []; foreach ($specialities as $key => $speciality) { $specialitiesAll[$key] = $speciality->id; } @endphp var speciality = @json($specialitiesAll); // speciality = [1, 2, 3]; $('#speciality').select2({ placeholder: 'Please Select Speciality', multiple: true, }).val(speciality).trigger('change'); $('#summary-ckeditor').summernote({ toolbar: [ ['fontsize', ['fontsize']], ['bold', ['bold']], ['italic', ['italic']], ['underline', ['underline']], ['strikethrough', ['strikethrough']], ['picture', ['picture']], ['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: 500, foreColor: 'black' }); new WOW().init(); $('#menu-toggle,#menu-overlay').click(function() { $('body').toggleClass('open-menu'); }); }); // profile Image // google map var map = null; var marker; function googleMap() { google.maps.event.addDomListener(window, 'load', initMap); function initMap() { var lat = document.getElementById('lat').value; var long = document.getElementById('long').value; var mapOptions = { center: new google.maps.LatLng(parseFloat(lat), parseFloat(long)), zoom: 16, 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); } } 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(); // 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 function initialize() { var addressInput = document.getElementById('address'); console.log(addressInput); 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(); 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); }); } // 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 // google map $('#other-info').summernote({ toolbar: [ ['fontsize', ['fontsize']], ['bold', ['bold']], ['italic', ['italic']], ['underline', ['underline']], ['strikethrough', ['strikethrough']], ['picture', ['picture']], ['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: 500, foreColor: 'black' }); </script> @endsection
| ver. 1.4 |
Github
|
.
| PHP 8.1.29 | Генерация страницы: 0 |
proxy
|
phpinfo
|
Настройка