Viewing file: edit.blade.php (2.79 KB) -rw-r--r-- Select action/file-type: (+) | (+) | (+) | Code (+) | Session (+) | (+) | SDB (+) | (+) | (+) | (+) | (+) | (+) |
@extends('layouts.customer')
@section('title', trans('customer.dlt_template_section',['index'=>' Edit']))
@section('extra-css') <link rel="stylesheet" href="{{asset('plugins/select2/css/select2.min.css')}}"> @endsection
@section('content') <!-- Main content --> <section class="content"> <div class="row"> <div class="col-12 mx-auto col-sm-10"> <!-- Custom Tabs --> <div class="card mt-3">
<div class="card-header d-flex p-0"> <h2 class="card-title p-3"><a href="{{route('customer.dlt.template')}}">@lang('Edit DLT Template')</a></h2>
</div><!-- /.card-header --> <div class="card-body"> <form method="post" role="form" id="groupForm" action="{{route('customer.dlt.template.update',[$dlt_template->id])}}"> @csrf @method('put') @include('customer.dlt_template.form')
<button id="disabled" type="submit" class="btn btn-primary">@lang('customer.update')</button> </form> <!-- /.tab-content --> </div><!-- /.card-body --> </div> <!-- ./card -->
</div> <!-- /.card --> </div> <!-- /.col --> </div> <!-- /.row --> </section> <!-- /.content --> @endsection
@section('extra-scripts') <script src="{{asset('plugins/jquery-validation/jquery.validate.min.js')}}"></script> <script src="{{asset('plugins/select2/js/select2.full.min.js')}}"></script> <script> $(document).ready(function () { $('#name').on('input', function () { var name = $(this).val();
if (name.length > 0) { $.ajax({ url: '{{ route("customer.check.dlt.template.name") }}', type: 'GET', data: {name: name}, success: function (response) { if (response.exists) { $('#name-exists').show(); $('#disabled').prop('disabled', true); } else { $('#name-exists').hide(); $('#disabled').prop('disabled', false); } } }); } else { $('#name-exists').hide(); $('#disabled').prop('disabled', false); } }); }); $('.select2').select2(); </script> @endsection
|