Файловый менеджер - Редактировать - /home/clickysoft/public_html/travel-guru.clickysoft.net/resources/views/admin/regions/update.blade.php
Назад
@extends('admin.layouts.master') @section('title', 'Edit Region') @push('admin-styles') @endpush @section('content') <div class="container-xxl flex-grow-1 container-p-y"> <div class="row"> <div class="col-lg-12 col-md-12 col-sm-8 col-xs-9 bhoechie-tab-container" style="background-color:white;"> <div class="row"> {{-- <div class="col-lg-2 col-md-2 col-sm-2 col-xs-2 bhoechie-tab-menu"> <div class="list-group"> <a href="#" class="list-group-item active text-center"> <i class="fas fa-pen"></i><br />Page Fields </a> </div> </div> --}} <div class="col-lg-12 col-md-12 col-sm-12 col-xs-12 bhoechie-tab"> <!-- Edit Region Form --> <div class="bhoechie-tab-content active"> <div class="p-5 mb-4"> <h5 class="card-header">Edit Region</h5> <div class="card-body"> <form action="{{ route('region.update.data', $region->id) }}" method="POST"> @csrf @include('partials.alert') <div class="row"> <div class="col-md-12 mb-12"> <label class="form-label">Title <i class="fa fa-asterisk small-font text-danger" aria-hidden="true"></i> </label> <input type="text" class="form-control" name="name" disabled value="{{ old('name', $region->name) }}" placeholder="Enter Name" /> </div> </div> <div class="row mt-3"> <div class="col-md-12 mb-12"> <label for="exampleFormControlTextarea1" class="form-label">Short Description <i class="fa fa-asterisk small-font text-danger" aria-hidden="true"></i> </label> {{-- <input type="hidden" name="short_description" id="content-input" value="{{ old('short_description', $region->short_description) }}"> <div id="editor"></div> --}} <textarea name="short_description" id="div-short-editor" style="height: 300px"> {{ old('short_description', $region->short_description) }} </textarea> </div> </div> <div class="row mt-3"> <div class="col-md-12 mb-12"> <label class="form-label">Read More Link <small>(Any Page URL)</small> <i class="fa fa-asterisk small-font text-danger" aria-hidden="true"></i> </label> <input type="text" class="form-control" name="link_page" value="{{ old('link_page', $region->link_page) }}" placeholder="Slug" /> </div> </div> <div class="row mt-3"> <div class="col-md-12 mb-5"> <label class="form-label">Image <i class="fa small-font text-danger" aria-hidden="true"></i> </label> <div class="dropzone needsclick" id="dropzone-deck-plan" data-region-id="{{ $region->id }}"> <div class="dz-message needsclick"> Drop File here or click to upload </div> <input type="file" name="file" style="display: none;" accept=".png, .jpeg, .jpg"> </div> <br> <div id="deckplan-file"> @if ($region->hasMedia('region_menu_image')) <img src="{{ $region->getFirstMediaUrl('region_menu_image') }}" width="300" class="img-fluid " alt="Responsive image" alt="Image"> @else <p>No file available.</p> @endif </div> </div> </div> <div class="row mt-3"> <div class="col-md-12"> <a href="{{ route('regions') }}" class="btn btn-danger redirect-btn">Back</a> <button type="submit" class="btn btn-primary" onclick="showLoader()">Update</button> </div> </div> </form> </div> </div> </div> </div> </div> </div> </div> </div> @endsection @push('admin-scripts') <script> $(document).ready(function() { $("div.bhoechie-tab-menu>div.list-group>a").click(function(e) { e.preventDefault(); $(this).siblings('a.active').removeClass("active"); $(this).addClass("active"); var index = $(this).index(); $("div.bhoechie-tab>div.bhoechie-tab-content").removeClass("active"); $("div.bhoechie-tab>div.bhoechie-tab-content").eq(index).addClass("active"); }); // Function to generate a slug from a given string function generateSlug(str) { return str .toLowerCase() .replace(/ /g, '-') // Replace spaces with hyphens .replace(/[^\w-]+/g, ''); // Remove special characters } // Event listener for the title input field $('input[name="title"]').on('input', function() { // Get the value of the title input var titleValue = $(this).val(); // Generate the slug var slugValue = generateSlug(titleValue); // Get the site URL from the APP_URL variable in the .env file var siteUrl = "{{ config('app.url') }}"; // Combine the site URL and the slug // var fullSlug = siteUrl + '/' + slugValue; var fullSlug = slugValue; // Set the value of the slug input field $('input[name="slug"]').val(fullSlug); }); }); </script> <script> Dropzone.autoDiscover = false; $(document).ready(function() { const previewTemplate = `<div class="dz-preview dz-file-preview"> <div class="dz-details"> <div class="dz-thumbnail"> <img data-dz-thumbnail> <span class="dz-nopreview">No preview</span> <div class="dz-success-mark"></div> <div class="dz-error-mark"></div> <div class="dz-error-message"><span data-dz-errormessage></span></div> <div class="progress"> <div class="progress-bar progress-bar-primary" role="progressbar" aria-valuemin="0" aria-valuemax="100" data-dz-uploadprogress></div> </div> </div> <div class="dz-filename" data-dz-name></div> <div class="dz-size" data-dz-size></div> </div> </div>`; var id = $('#dropzone-deck-plan').data('region-id'); var urlDeckPlan = "{{ route('region.upload.image', ':id') }}"; urlDeckPlan = urlDeckPlan.replace(':id', id); var dropzoneDeckPlan = new Dropzone("#dropzone-deck-plan", { previewTemplate: previewTemplate, headers: { 'X-CSRF-TOKEN': "{{ csrf_token() }}", }, parallelUploads: 1, maxFilesize: 20, maxFiles: 1, url: urlDeckPlan, method: "post", autoProcessQueue: true, uploadMultiple: false, acceptedFiles: 'image/jpeg,image/png,image/jpg', error: function(file, response) { if (file.size > this.options.maxFilesize * 1024 * 1024) { Swal.fire({ title: "File Too Large", text: `File "${file.name}" exceeds the maximum upload size of 15 MB.`, icon: "error" }); this.removeFile(file); } }, }); dropzoneDeckPlan.on("success", function(file, response) { if (response.html) { $("#deckplan-file").html(''); $("#deckplan-file").html(response.html); } }); }); </script> @endpush
| ver. 1.4 |
Github
|
.
| PHP 8.1.29 | Генерация страницы: 0 |
proxy
|
phpinfo
|
Настройка