Файловый менеджер - Редактировать - /home/clickysoft/public_html/calvary-p2.clickysoft.net/resources/views/admin/hot-lunch-menu/add.blade.php
Назад
@extends('admin.layouts.master') @section('title', 'Add Hot Lunch Menu') @section('content') <div class="container-xxl flex-grow-1 container-p-y"> <div class="row"> <div class="col-md-12"> <div class="card mb-4"> <h5 class="card-header">Add Hot Lunch Menu</h5> <div class="card-body"> <form action="{{ route('menu.add.data', $hot_lunch_id) }}" method="POST"> @csrf @include('partials.alert') <div class="row"> <input type="hidden" name="hot_lunch_id" value="{{ $hot_lunch_id }}"> <div class="col-md-6 mb-6"> <label class="form-label">Title ( Lunch Day ) <i class="fa fa-asterisk small-font text-danger" aria-hidden="true"></i> </label> <input type="text" class="form-control" name="title" value="{{ old('title') }}" placeholder="Enter menu title" /> </div> <div class="col-md-6 mb-6"> <label class="form-label">Vendor <i class="fa fa-asterisk small-font text-danger" aria-hidden="true"></i> </label> <select class="form-control" name="vendor_id"> <option value="">Select Vendor</option> @foreach ($vendors as $vendor) <option value="{{ $vendor->id }}" {{ old('vendor_id') === $vendor->id ? 'selected' : '' }}> {{ $vendor->name }}</option> @endforeach </select> </div> {{-- <div class="col-md-6 mb-6"> --}} {{-- <label class="form-label">Type --}} {{-- <i class="fa fa-asterisk small-font text-danger" aria-hidden="true"></i> --}} {{-- </label> --}} {{-- <select class="form-control" name="type"> --}} {{-- <option value="">Select type</option> --}} {{-- <option value="solo" {{ old('type') === 'solo' ? 'selected' : '' }}>Solo</option> --}} {{-- <option value="combo" {{ old('type') === 'combo' ? 'selected' : '' }}>Combo --}} {{-- </option> --}} {{-- </select> --}} {{-- </div> --}} </div> {{-- <div class="row mt-3"> --}} {{-- <div class="col-md-6 mb-6"> --}} {{-- <label class="form-label">Sort in --}} {{-- <i class="fa fa-asterisk small-font text-danger" aria-hidden="true"></i> --}} {{-- </label> --}} {{-- <input type="number" class="form-control" name="sort" value="{{ old('sort') }}" --}} {{-- placeholder="Enter Sort" /> --}} {{-- </div> --}} {{-- </div> --}} <div class="row mt-3"> <div class="col-md-6 mb-6"> <label class="form-label">Vendor Items <i class="fa fa-asterisk small-font text-danger" aria-hidden="true"></i> </label> <select class="form-control" name="item_id[]" multiple> </select> <div class="mt-2"> <button type="button" class="btn btn-primary btn-xs" id="select-all">Select All</button> <button type="button" class="btn btn-danger btn-xs" id="deselect-all">Deselect All</button> </div> </div> <div class="col-md-6 mb-6"> <label class="form-label">Grades <i class="fa fa-asterisk small-font text-danger" aria-hidden="true"></i> </label> <select class="form-control select2" name="grade_id[]" multiple> @foreach ($grades as $grade) <option value="{{ $grade->id }}" {{ old('grade_id') === $grade->id ? 'selected' : '' }}> {{ $grade->title }} </option> @endforeach </select> <div class="mt-2"> <button type="button" class="btn btn-primary btn-xs" id="grade-select-all">Select All</button> <button type="button" class="btn btn-danger btn-xs" id="grade-deselect-all">Deselect All</button> </div> </div> </div> <div class="row mt-3"> <div class="col-md-12"> <a href="{{ route('manage.lunch') }}" class="btn btn-danger redirect-btn">Back</a> <button type="submit" class="btn btn-primary" onclick="showLoader()">Add</button> </div> </div> </form> </div> </div> </div> </div> </div> @endsection @push('admin-scripts') <script> $(document).ready(function () { $('select.select2').select2(); $('select[name="vendor_id"]').change(function () { let vendorId = $(this).val(); $.ajax({ url: '{{ route('vendor.items') }}', method: 'GET', data: { vendor_id: vendorId }, success: function (response) { $('select[name="item_id[]"]').html(response.options); $('select[name="item_id[]"]').select2(); reorderSelectItems($('select[name="item_id[]"]')); }, error: function (xhr) { console.log(xhr.responseText); } }); }); $('select[name="item_id[]"]').select2(); function reorderSelectItems(selectElement) { selectElement.on("select2:select", function (evt) { let elm = evt.params.data.element; $elm = $(elm); $t = $(this); $t.append($elm); $t.trigger("change.select2"); }); } reorderSelectItems($('select[name="item_id[]"]')); $('#select-all').on('click', function () { $('select[name="item_id[]"] option').prop('selected', true); $('select[name="item_id[]"]').trigger('change'); }); $('#deselect-all').on('click', function () { $('select[name="item_id[]"] option').prop('selected', false); $('select[name="item_id[]"]').trigger('change'); }); $('#grade-select-all').on('click', function () { $('select[name="grade_id[]"] option').prop('selected', true); $('select[name="grade_id[]"]').trigger('change'); }); $('#grade-deselect-all').on('click', function () { $('select[name="grade_id[]"] option').prop('selected', false); $('select[name="grade_id[]"]').trigger('change'); }); }); </script> @endpush
| ver. 1.4 |
Github
|
.
| PHP 8.1.29 | Генерация страницы: 0 |
proxy
|
phpinfo
|
Настройка