Edit File: 706a018c2a652c7ed196bc18bfc5f615aefec56e.php
<?php $__env->startSection('css'); ?> <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'); ?> <!-- // Basic multiple Column Form section start --> <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.plans.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 col-12 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="logo" class="imageUploader"> </label> <div class="uploadedBlock"> <img src="<?php echo e($row->LogoPath); ?>"> <button class="close"><i class="la la-times"></i></button> </div> </div> </div> </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" value="<?php echo e($row->getTranslations('name')['ar'] ?? ''); ?>" name="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" value="<?php echo e($row->getTranslations('name')['en'] ?? ''); ?>" name="name_en" 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="number" value="<?php echo e($row->expected_views); ?>" name="expected_views" 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"> <select name="available" class="form-control" required data-validation-required-message="<?php echo e(awtTrans('هذا الحقل مطلوب')); ?>" > <option value><?php echo e(awtTrans('اختر الحالة')); ?></option> <option <?php echo e($row->available == 'true' ? 'selected' : ''); ?> value="true"><?php echo e(awtTrans('مفعل')); ?></option> <option <?php echo e($row->available == 'false' ? 'selected' : ''); ?> value="false"><?php echo e(awtTrans('غير مفعل')); ?></option> </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"> <input type="text" value="<?php echo e($row->price); ?>" name="price" class="form-control" placeholder="<?php echo e(awtTrans('اكتب سعر الباقه')); ?>" required data-validation-required-message="<?php echo e(awtTrans('هذا الحقل مطلوب')); ?>" > </div> </div> </div> <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="<?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(); ?>--> <script> $(document).ready(function(){ $(document).on('submit','.store',function(e){ e.preventDefault(); var url = $(this).attr('action') $.ajax({ url: url, method: 'post', data: new FormData($(this)[0]), dataType:'json', processData: false, contentType: false, beforeSend: function(){ $(".submit_button").html('<span class="spinner-border spinner-border-sm" role="status" aria-hidden="true"></span>').attr('disable',true) }, success: function(response){ if(response.key == "fail"){ $(".text-danger").remove() $('.store input').removeClass('border-danger') $(".submit_button").html("<?php echo e(awtTrans('تعديل')); ?>").attr('disable',false) Swal.fire({ position: 'top-start', type: 'error', title: response.msg, showConfirmButton: false, timer: 1500, confirmButtonClass: 'btn btn-primary', buttonsStyling: false, }) } else { $(".text-danger").remove() $('.store input').removeClass('border-danger') $(".submit_button").html("<?php echo e(awtTrans('تعديل')); ?>").attr('disable',false) Swal.fire({ position: 'top-start', type: 'success', title: '<?php echo e(awtTrans('تمت التعديل بنجاح')); ?>', showConfirmButton: false, timer: 1500, confirmButtonClass: 'btn btn-primary', buttonsStyling: false, }) setTimeout(function(){ window.location.replace(response.url) }, 1000); } }, error: function (xhr) { $(".submit_button").html("<?php echo e(awtTrans('تعديل')); ?>").attr('disable',false) $(".text-danger").remove() $('.store input').removeClass('border-danger') $.each(xhr.responseJSON.errors, function(key,value) { $('.store input[name='+key+']').addClass('border-danger') $('.store input[name='+key+']').after(`<span class="mt-5 text-danger">${value}</span>`); $('.store select[name='+key+']').after(`<span class="mt-5 text-danger">${value}</span>`); }); }, }); }); }); </script> <?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/plans/edit.blade.php ENDPATH**/ ?>
Back to File Manager