Edit File: 3b2e2f1285fcee4eb4551a386a7ffb48ab8835d5.php
<?php $__env->startSection('css'); ?> <link href="https://cdn.jsdelivr.net/npm/select2@4.1.0-rc.0/dist/css/select2.min.css" rel="stylesheet" /> <link rel="stylesheet" type="text/css" href="<?php echo e(asset('admin/app-assets/css-rtl/plugins/forms/validation/form-validation.css')); ?>"> <link rel="stylesheet" type="text/css" href="<?php echo e(asset('admin/app-assets/vendors/css/extensions/sweetalert2.min.css')); ?>"> <?php $__env->stopSection(); ?> <?php $__env->startSection('content'); ?> <section id="multiple-column-form"> <div class="row match-height"> <div class="col-12"> <div class="card"> <div class="card-header"> <h4 class="card-title"><?php echo e(awtTrans('تعديل متجر ')); ?></h4> </div> <div class="card-content"> <div class="card-body"> <form method="POST" action="<?php echo e(route('admin.stores.update' , ['id' => $row->id])); ?>" class="store form-horizontal" novalidate> <?php echo csrf_field(); ?> <?php echo method_field('PUT'); ?> <div class="form-body"> <div class="row"> <div class="col-12"> <div class="imgMontg text-center"> <div class="dropBox"> <div class="textCenter"> <div class="imagesUploadBlock"> <label class="uploadImg"> <span><i class="feather icon-image"></i></span> <input type="file" accept="image/*" name="icon" class="imageUploader"> </label> <div class="uploadedBlock"> <img src="<?php echo e($row->iconPath); ?>"> <button class="close"><i class="la la-times"></i></button> </div> </div> </div> <span><?php echo e(awtTrans('صورة الغلاف ')); ?></span> </div> </div> </div> <div class="col-md-6 col-12 "> <div class="form-group"> <label for="first-name-column"><?php echo e(awtTrans('الاسم باللغة العربية')); ?></label> <div class="controls"> <input type="text" name="name_ar" value="<?php echo e($row->getTranslations('name')['ar']); ?>" class="form-control" placeholder="<?php echo e(awtTrans('اكتب الاسم بالعربية')); ?>" required data-validation-required-message="<?php echo e(awtTrans('هذا الحقل مطلوب')); ?>" > </div> </div> </div> <div class="col-md-6 col-12 "> <div class="form-group"> <label for="first-name-column"><?php echo e(awtTrans('الاسم باللغة الانجليزية')); ?></label> <div class="controls"> <input type="text" name="name_en" class="form-control" value="<?php echo e($row->getTranslations('name')['en']); ?>" placeholder="<?php echo e(awtTrans('اكتب الاسم بالانجليزية')); ?>" required data-validation-required-message="<?php echo e(awtTrans('هذا الحقل مطلوب')); ?>" > </div> </div> </div> <?php if($row->has_contract == 'true'): ?> <div class="col-md-6 col-12 "> <div class="form-group"> <label for="first-name-column"><?php echo e(awtTrans('اسم البنك ')); ?></label> <div class="controls"> <input type="text" name="bank_name" value="<?php echo e($row->bank_name); ?>" class="form-control" placeholder="<?php echo e(awtTrans('اسم الحساب البنكي ')); ?>" > </div> </div> </div> <div class="col-md-6 col-12 "> <div class="form-group"> <label for="first-name-column"><?php echo e(awtTrans('اسم الحساب البنكي ')); ?></label> <div class="controls"> <input type="text" name="bank_owner_name" value="<?php echo e($row->bank_owner_name); ?>" class="form-control" placeholder="<?php echo e(awtTrans('اسم الحساب البنكي ')); ?>" > </div> </div> </div> <div class="col-md-6 col-12 "> <div class="form-group"> <label for="first-name-column"><?php echo e(awtTrans('رقم الحساب البنكي ')); ?></label> <div class="controls"> <input type="text" name="bank_number" value="<?php echo e($row->bank_number); ?>" class="form-control" placeholder="<?php echo e(awtTrans('رقم الحساب البنكي ')); ?>" > </div> </div> </div> <div class="col-md-6 col-12 "> <div class="form-group"> <label for="first-name-column"><?php echo e(awtTrans('رقم الايبان')); ?></label> <div class="controls"> <input type="text" name="iban_number" value="<?php echo e($row->iban_number); ?>" class="form-control" placeholder="<?php echo e(awtTrans('رقم الايبان')); ?>" > </div> </div> </div> <?php endif; ?> <div class="col-md-6 col-12"> <div class="form-group"> <label for="first-name-column"><?php echo e(awtTrans('القسم')); ?></label> <div class="controls"> <select name="category" class="select2 form-control categories" required data-validation-required-message="<?php echo e(awtTrans('هذا الحقل مطلوب')); ?>" > <option value><?php echo e(awtTrans('اختر القسم')); ?></option> <?php $__currentLoopData = $categories; $__env->addLoop($__currentLoopData); foreach($__currentLoopData as $category): $__env->incrementLoopIndices(); $loop = $__env->getLastLoop(); ?> <option <?php echo e($row->category == $category->slug ? 'selected' : ''); ?> value="<?php echo e($category->slug); ?>"><?php echo e($category->name); ?></option> <?php endforeach; $__env->popLoop(); $loop = $__env->getLastLoop(); ?> </select> </div> </div> </div> <div class="col-md-6 col-12" > <div class="form-group"> <label for="first-name-column"><?php echo e(awtTrans('القسم الفرعي')); ?></label> <div class="controls"> <select name="category_id[]" multiple class="select2 form-control" id="category_div" > <?php $__currentLoopData = $subcategories; $__env->addLoop($__currentLoopData); foreach($__currentLoopData as $category): $__env->incrementLoopIndices(); $loop = $__env->getLastLoop(); ?> <option <?php if(in_array($category->id , $ids)): ?> selected <?php endif; ?> value="<?php echo e($category->id); ?>"><?php echo e($category->name); ?></option> <?php endforeach; $__env->popLoop(); $loop = $__env->getLastLoop(); ?> </select> </div> </div> </div> <?php if($row->has_contract == 'true'): ?> <div class="col-md-6 col-12"> <div class="form-group"> <label for="first-name-column"><?php echo e(awtTrans('الحاله')); ?></label> <div class="controls"> <select name="status" class="select2 form-control" required data-validation-required-message="<?php echo e(awtTrans('هذا الحقل مطلوب')); ?>" > <option <?php echo e($row->user->status == 'active' ? 'selected' : ''); ?> value="active"><?php echo e(awtTrans('نشط')); ?></option> <option <?php echo e($row->user->status == 'pending' ? 'selected' : ''); ?> value="pending"><?php echo e(awtTrans('في انتظار التفعيل')); ?></option> <option <?php echo e($row->user->status == 'block' ? 'selected' : ''); ?> value="block"><?php echo e(awtTrans('محظور')); ?></option> </select> </div> </div> </div> <?php endif; ?> <div class="col-md-12 col-12 "> <div class="form-group"> <label for="first-name-column"><?php echo e(awtTrans('العنوان')); ?></label> <div class="controls"> <input type="text" name="address" value="<?php echo e($row->address); ?>" id="address" class="form-control" placeholder="<?php echo e(awtTrans('العنوان')); ?>" required data-validation-required-message="<?php echo e(awtTrans('هذا الحقل مطلوب')); ?>" > </div> </div> </div> <div class="col-md-12 col-12 "> <div class="form-group pl-5 pr-5 mt-4 position-relative"> <label for="" class="d-block mb-3 siz13 font-weight-bolder"><?php echo e(awtTrans('تحديد الموقع')); ?></label> <div class="controls"> <input type="hidden" class="form-control position-absolute w-25" style="z-index: 11111; top:14%; left:7%" id="searchTextField" value="" placeholder="<?php echo e(awtTrans('تحديد موقعك')); ?>"> </div> <div id="map" style="height: 400px; margin-top: 20px"> </div> <input type="hidden" id="lat" name="lat" value="<?php echo e($row->lat); ?>"> <input type="hidden" id="lng" name="long" value="<?php echo e($row->long); ?>"> </div> </div> <input type="hidden" name="has_contract" value="<?php echo e($row->has_contract == 'true' ? 1 : 0); ?>"> <?php if($row->has_contract == 'true'): ?> <input type="hidden" name="user_id" value="<?php echo e($row->user_id); ?>"> <div class="col-md-12 col-12 d-flex justify-content-center mt-1 has_contract_hide"> <p><?php echo e(awtTrans('بيانات مدير النظام')); ?></p> </div> <div class="col-md-6 col-12 has_contract_hide"> <div class="form-group"> <label for="first-name-column"><?php echo e(awtTrans('اسم المدير')); ?></label> <div class="controls"> <input type="text" value="<?php echo e($row->user->name); ?>" name="name" class="has_contract_input form-control" > </div> </div> </div> <div class="col-md-6 col-12 has_contract_hide"> <div class="form-group"> <label for="first-name-column"><?php echo e(awtTrans('رقم الهاتف')); ?></label> <div class="controls"> <select style="width: 20% ; position: absolute; left: 3%;" name="country_key" class="select2 form-control" > <?php $__currentLoopData = $keys; $__env->addLoop($__currentLoopData); foreach($__currentLoopData as $key): $__env->incrementLoopIndices(); $loop = $__env->getLastLoop(); ?> <option <?php echo e($key->calling_code == $row->user->country_key ? 'selected' : ''); ?> value="<?php echo e($key->calling_code); ?>"><?php echo e($key->calling_code); ?></option> <?php endforeach; $__env->popLoop(); $loop = $__env->getLastLoop(); ?> </select> <input type="number" name="phone" value="<?php echo e($row->user->phone); ?>" class="has_contract_input form-control" placeholder="<?php echo e(awtTrans('اكتب رقم الهاتف')); ?>" > </div> </div> </div> <div class="col-md-6 col-12 has_contract_hide "> <div class="form-group"> <label for="first-name-column"><?php echo e(awtTrans('البريد الالكتروني')); ?></label> <div class="controls"> <input type="email" name="email" value="<?php echo e($row->user->email); ?>" class="has_contract_input form-control" placeholder="<?php echo e(awtTrans('اكتب البريد الالكتروني')); ?>" > </div> </div> </div> <div class="col-md-6 col-12 has_contract_hide"> <div class="form-group"> <label for="first-name-column"><?php echo e(awtTrans('كلمة السر')); ?></label> <div class="controls"> <input type="password" name="password" class="has_contract_input form-control" > </div> </div> </div> <?php endif; ?> <div class="col-12 d-flex justify-content-center mt-3"> <button type="submit" class="btn btn-primary mr-1 mb-1 submit_button"><?php echo e(awtTrans('تعديل')); ?></button> <a href="<?php echo e(url()->previous()); ?>" type="reset" class="btn btn-outline-warning mr-1 mb-1"><?php echo e(awtTrans(' رجوع ')); ?></a> </div> </div> </div> </form> </div> </div> </div> </div> </div> </section> <?php $__env->stopSection(); ?> <?php $__env->startSection('js'); ?> <script src="https://cdn.jsdelivr.net/npm/select2@4.1.0-rc.0/dist/js/select2.min.js"></script> <script> $('#category_div').select2() $('.categories').on('change',function(){ var category_id= $(this).val(); url = "<?php echo e(route('admin.stores.subcategories',':category_id')); ?>", new_url = url.replace(':category_id', category_id); var category_id = $(this).val(); $.ajax({ url: new_url, type: "GET", dataType: "json", contentType: false, cache: false, success: function (data) { $('#category_div').html(data.html) } }); }); $(document).keypress( function(event){ if (event.which == '13') { event.preventDefault(); } }); function initMap() { if (navigator.geolocation) { navigator.geolocation.getCurrentPosition(function (p) { var lat = Number($('#lat').val()) var lng = Number($('#lng').val()) const myLatlng = { lat: lat, lng: lng }; const map = new google.maps.Map(document.getElementById("map"), { zoom: 10, center: myLatlng, mapTypeControl: false, streetViewControl: false, }); // var input = document.getElementById('searchTextField'); // var autocomplete = new google.maps.places.Autocomplete(input); // const geocoder = new google.maps.Geocoder(); // document.getElementById("searchTextField").addEventListener("keyup", () => { // geocodeAddress(geocoder, map); // }); // document.getElementById("searchTextField").addEventListener("change", () => { // geocodeAddress(geocoder, map); // }); var marker = new google.maps.Marker({ position: new google.maps.LatLng(lat, lng), map: map, title: 'Set lat/lon values for this property', draggable: true, streetViewControl: false, }); google.maps.event.addListener(marker, 'dragend', function (event) { document.getElementById("lat").value = this.getPosition().lat(); document.getElementById("lng").value = this.getPosition().lng(); GetAddress(new google.maps.LatLng( marker.getPosition().lat(), marker.getPosition().lng())) }); google.maps.event.addListener(map, 'click', function(event) { $('#lat').val(event.latLng.lat()) $('#lng').val(event.latLng.lng()) marker.setPosition(event.latLng); map.setCenter(event.latLng); map.setZoom(10); GetAddress(new google.maps.LatLng( event.latLng.lat(), event.latLng.lng())) }); }); } } function GetAddress(latlng) { var geocoder = geocoder = new google.maps.Geocoder(); geocoder.geocode({ 'latLng': latlng }, function (results, status) { if (status == google.maps.GeocoderStatus.OK) { if (results[1]) { $("textarea#text").value = results[1].formatted_address; document.getElementById("address").value = results[1].formatted_address; document.getElementById("searchTextField").value = results[1].formatted_address; } } }); } function geocodeAddress(geocoder, resultsMap) { const address = document.getElementById("searchTextField").value; geocoder.geocode({ address: address }, (results, status) => { if (status === "OK") { $('#lat').val(results[0].geometry.location.lat()) $('#lng').val(results[0].geometry.location.lng()) resultsMap.setCenter(results[0].geometry.location); const myLatlng = { lat: results[0].geometry.location.lat(), lng:results[0].geometry.location.lng() }; const map = new google.maps.Map(document.getElementById("map"), { zoom: 10, center: myLatlng, mapTypeControl: false, streetViewControl: false, }); var marker = new google.maps.Marker({ position: new google.maps.LatLng(results[0].geometry.location.lat(), results[0].geometry.location.lng()), map: map, title: 'Set lat/lon values for this property', draggable: true , streetViewControl: false, }); google.maps.event.addListener(marker, 'dragend', function (event) { document.getElementById("latitude").value = this.getPosition().lat(); document.getElementById("longitude").value = this.getPosition().lng(); }); google.maps.event.addListener(map, 'click', function(event) { $('#lat').val(event.latLng.lat()) $('#lng').val(event.latLng.lng()) marker.setPosition(event.latLng); map.setCenter(event.latLng); map.setZoom(18); }); } else { // alert("Geocode was not successful for the following reason: " + status); } }); } </script> <script async defer src="https://maps.googleapis.com/maps/api/js?key=<?php echo e($setting['google_places']); ?>&callback=initMap" type="text/javascript"></script> <script src="<?php echo e(asset('admin/app-assets/vendors/js/forms/validation/jqBootstrapValidation.js')); ?>"></script> <script src="<?php echo e(asset('admin/app-assets/js/scripts/forms/validation/form-validation.js')); ?>"></script> <script src="<?php echo e(asset('admin/app-assets/vendors/js/extensions/sweetalert2.all.min.js')); ?>"></script> <script src="<?php echo e(asset('admin/app-assets/js/scripts/extensions/sweet-alerts.js')); ?>"></script> <?php echo $__env->make('admin.shared.addImage', \Illuminate\Support\Arr::except(get_defined_vars(), ['__data', '__path']))->render(); ?> <?php echo $__env->make('admin.shared.submitEditForm', \Illuminate\Support\Arr::except(get_defined_vars(), ['__data', '__path']))->render(); ?> <?php $__env->stopSection(); ?> <?php echo $__env->make('admin.layout.master', \Illuminate\Support\Arr::except(get_defined_vars(), ['__data', '__path']))->render(); ?><?php /**PATH /home/wwineerc/public_html/resources/views/admin/stores/edit.blade.php ENDPATH**/ ?>
Back to File Manager