@@ -34,7 +34,8 @@
|
||||
<script src="{{ asset('public/assets/plgins/src/filepond/FilePondPluginImageTransform.min.js')}}"></script>
|
||||
<script src="{{ asset('public/assets/plugins/src/filepond/filepondPluginFileValidateSize.min.js')}}"></script>
|
||||
<script src="{{ asset('public/assets/plugins/src/filepond/custom-filepond.js')}}"></script>
|
||||
<script src="https://cdn.ckeditor.com/4.8.0/full-all/ckeditor.js"></script>
|
||||
<script src="https://cdn.ckeditor.com/4.16.0/standard/ckeditor.js"></script>
|
||||
|
||||
<script src="https://cdnjs.cloudflare.com/ajax/libs/jquery-validate/1.19.0/jquery.validate.js"></script>
|
||||
<!--<script src="https://cdnjs.cloudflare.com/ajax/libs/popper.js/1.14.3/umd/popper.min.js"></script>-->
|
||||
<script src="https://cdnjs.cloudflare.com/ajax/libs/jquery-validate/1.19.5/jquery.validate.min.js" integrity="sha512-rstIgDs0xPgmG6RX1Aba4KV5cWJbAMcvRCVmglpam9SoHZiUCyQVDdH2LPlxoHtrv17XWblE/V/PP+Tr04hbtA==" crossorigin="anonymous" referrerpolicy="no-referrer"></script>
|
||||
|
||||
@@ -1,46 +1,49 @@
|
||||
@extends('Admin.layouts.master')
|
||||
|
||||
@section('content')
|
||||
@php
|
||||
$currentPage = 'manage_cms';
|
||||
@endphp
|
||||
<div class="layout-px-spacing">
|
||||
<div class="middle-content container-xxl p-0">
|
||||
<div class="row layout-top-spacing ">
|
||||
<div class="top-tabel">
|
||||
<div class="row">
|
||||
<div class="col-md-12 left d-flex align-items-center justify-content-between"
|
||||
style="gap: 15px;">
|
||||
<a class="d-flex align-items-center justify-content-center pl-2"
|
||||
href="{{ route('manage.aboutUs')}}">
|
||||
<img class="back-btn" src="{{ asset('public/assets/img/left-arrow.svg')}}">
|
||||
<h6 class="card-title p-0">Edit Details for customer</h6>
|
||||
</a>
|
||||
</div>
|
||||
@php
|
||||
$currentPage = 'manage_cms';
|
||||
@endphp
|
||||
<div class="layout-px-spacing">
|
||||
<div class="middle-content container-xxl p-0">
|
||||
<div class="row layout-top-spacing ">
|
||||
<div class="top-tabel">
|
||||
<div class="row">
|
||||
<div class="col-md-12 left d-flex align-items-center justify-content-between" style="gap: 15px;">
|
||||
<a class="d-flex align-items-center justify-content-center pl-2"
|
||||
href="{{ route('manage.aboutUs') }}">
|
||||
<img class="back-btn" src="{{ asset('public/assets/img/left-arrow.svg') }}">
|
||||
<h6 class="card-title p-0">Edit Details for customer</h6>
|
||||
</a>
|
||||
</div>
|
||||
</div>
|
||||
<div class="col-xl-12 col-lg-12 col-sm-12 layout-spacing">
|
||||
<div class="widget-content widget-content-area br-8 position-btn p-0">
|
||||
<div class="view-details">
|
||||
<div class="simple-tab">
|
||||
<div class="tab-content" id="myTabContent">
|
||||
<div class="tab-pane fade show active" id="home-tab-pane" role="tabpanel"
|
||||
aria-labelledby="home-tab" tabindex="0">
|
||||
<form id="about_us_form">
|
||||
</div>
|
||||
<div class="col-xl-12 col-lg-12 col-sm-12 layout-spacing">
|
||||
<div class="widget-content widget-content-area br-8 position-btn p-0">
|
||||
<div class="view-details">
|
||||
<div class="simple-tab">
|
||||
<div class="tab-content" id="myTabContent">
|
||||
<div class="tab-pane fade show active" id="home-tab-pane" role="tabpanel"
|
||||
aria-labelledby="home-tab" tabindex="0">
|
||||
<form id="about_us_form">
|
||||
<div class="row">
|
||||
<div class="col-md-12">
|
||||
<input type="hidden" name="about_custom_id" value="{{ $edit_aboutUs_cust['id'] }}">
|
||||
<div id="terms-quill-edit" value="{{ $edit_aboutUs_cust['description'] }}" name="about_us" class="editor-quill" style="height: 300px;">{!! $edit_aboutUs_cust['description'] !!}</div>
|
||||
<input type="hidden" id="about_us" name="about_us" value="{{ $edit_aboutUs_cust['description'] }}" />
|
||||
</div>
|
||||
<input type="hidden" name="about_custom_id"
|
||||
value="{{ $edit_aboutUs_cust['id'] }}">
|
||||
<textarea id="terms-quill-edit" name="about_us" class="editor-quill" style="height: 300px;">
|
||||
{!! $edit_aboutUs_cust['description'] !!}
|
||||
</textarea>
|
||||
<input type="hidden" id="about_us" name="about_us"
|
||||
value="{{ $edit_aboutUs_cust['description'] }}" />
|
||||
</div>
|
||||
<div class="col-md-12">
|
||||
<button type="submit" id="update_about_us" class="download-btn-custom mt-3 custom-width-10" >
|
||||
<button type="submit" id="update_about_us"
|
||||
class="download-btn-custom mt-3 custom-width-10">
|
||||
<span>Update</span>
|
||||
</button>
|
||||
</div>
|
||||
</div>
|
||||
</form>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
@@ -49,77 +52,101 @@
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<!-- END MAIN CONTAINER -->
|
||||
|
||||
|
||||
</div>
|
||||
|
||||
<!-- END MAIN CONTAINER -->
|
||||
@endsection
|
||||
|
||||
@section('section_script')
|
||||
<script>
|
||||
var quill = new Quill('#terms-quill-edit', {
|
||||
theme: 'snow'
|
||||
});
|
||||
|
||||
// Listen for changes and update the hidden input with the HTML content
|
||||
quill.on('text-change', function() {
|
||||
var htmlContent = quill.root.innerHTML;
|
||||
document.getElementById('privacy_policy').value = htmlContent;
|
||||
<script src="https://cdn.ckeditor.com/4.16.0/standard/ckeditor.js"></script>
|
||||
<script src="https://code.jquery.com/jquery-3.6.4.min.js"></script>
|
||||
<script src="https://cdnjs.cloudflare.com/ajax/libs/jquery-validate/1.19.5/jquery.validate.min.js"></script>
|
||||
<script>
|
||||
// Initialize CKEditor
|
||||
CKEDITOR.replace('terms-quill-edit', {
|
||||
toolbar: [{
|
||||
name: 'basicstyles',
|
||||
items: ['Bold', 'Italic', 'Underline', 'Strike']
|
||||
},
|
||||
{
|
||||
name: 'paragraph',
|
||||
items: ['NumberedList', 'BulletedList', '-', 'Blockquote']
|
||||
},
|
||||
{
|
||||
name: 'styles',
|
||||
items: ['Format']
|
||||
},
|
||||
{
|
||||
name: 'links',
|
||||
items: ['Link', 'Unlink']
|
||||
},
|
||||
{
|
||||
name: 'tools',
|
||||
items: ['Maximize']
|
||||
}
|
||||
]
|
||||
});
|
||||
</script>
|
||||
<script src="https://code.jquery.com/jquery-3.6.4.min.js"></script>
|
||||
<script src="https://cdnjs.cloudflare.com/ajax/libs/jquery-validate/1.19.5/jquery.validate.min.js"></script>
|
||||
<script>
|
||||
$('#update_about_us').on("click", function (e) {
|
||||
|
||||
$.validator.addMethod("quillNotEmpty", function(value, element) {
|
||||
var quill = new Quill('#terms-quill-edit');
|
||||
return quill.getText().trim().length > 0;
|
||||
}, "Please enter about us ");
|
||||
$('#about_us_form').validate({
|
||||
ignore: [],
|
||||
debug: false,
|
||||
rules: {
|
||||
about_us: {
|
||||
required: true,
|
||||
quillNotEmpty: true
|
||||
}
|
||||
},
|
||||
messages: {
|
||||
about_us: {
|
||||
required: "Please Enter about us for customer"
|
||||
}
|
||||
},
|
||||
errorClass: 'error-message',
|
||||
submitHandler: function (form) {
|
||||
var quillContent = quill.root.innerHTML;
|
||||
$('#about_us').val(quillContent);base_url = url_path;
|
||||
var formData = new FormData(form);
|
||||
|
||||
$.ajaxSetup({
|
||||
headers: {
|
||||
"X-CSRF-TOKEN": $('meta[name="csrf-token"]').attr("content"),
|
||||
},
|
||||
});
|
||||
// Listen for changes and update the hidden input with the HTML content
|
||||
CKEDITOR.instances['terms-quill-edit'].on('change', function() {
|
||||
var htmlContent = CKEDITOR.instances['terms-quill-edit'].getData();
|
||||
document.getElementById('about_us').value = htmlContent;
|
||||
});
|
||||
|
||||
$('#update_about_us').on("click", function(e) {
|
||||
|
||||
$.validator.addMethod("ckeditorNotEmpty", function(value, element) {
|
||||
var editorData = CKEDITOR.instances['terms-quill-edit'].getData();
|
||||
return editorData.trim().length > 0;
|
||||
}, "Please enter about us");
|
||||
|
||||
$('#about_us_form').validate({
|
||||
ignore: [],
|
||||
debug: false,
|
||||
rules: {
|
||||
about_us: {
|
||||
required: true,
|
||||
ckeditorNotEmpty: true
|
||||
}
|
||||
},
|
||||
messages: {
|
||||
about_us: {
|
||||
required: "Please enter about us for customer"
|
||||
}
|
||||
},
|
||||
errorClass: 'error-message',
|
||||
submitHandler: function(form) {
|
||||
var editorData = CKEDITOR.instances['terms-quill-edit'].getData();
|
||||
$('#about_us').val(editorData);
|
||||
|
||||
var formData = new FormData(form);
|
||||
$.ajaxSetup({
|
||||
headers: {
|
||||
"X-CSRF-TOKEN": $('meta[name="csrf-token"]').attr("content"),
|
||||
},
|
||||
});
|
||||
|
||||
$.ajax({
|
||||
url: base_url + '/aboutus_cust_update',
|
||||
url: '{{ url('/aboutus_cust_update') }}',
|
||||
type: 'POST',
|
||||
data: formData,
|
||||
processData: false,
|
||||
contentType: false,
|
||||
success: function (response) {
|
||||
success: function(response) {
|
||||
if (response.status == 200) {
|
||||
toastr.success('About Us Customer Data Updated Successfully');
|
||||
setTimeout(function () {
|
||||
window.location.href = base_url + "/manage-about-us";
|
||||
toastr.success(
|
||||
'About Us Customer Data Updated Successfully');
|
||||
setTimeout(function() {
|
||||
window.location.href =
|
||||
'{{ url('/manage-about-us') }}';
|
||||
}, 1000);
|
||||
} else {
|
||||
toastr.error("Something went wrong");
|
||||
}
|
||||
},
|
||||
});
|
||||
}
|
||||
}
|
||||
});
|
||||
});
|
||||
});
|
||||
</script>
|
||||
@endsection
|
||||
@endsection
|
||||
|
||||
@@ -1,10 +1,10 @@
|
||||
@extends('Admin.layouts.master')
|
||||
|
||||
@section('content')
|
||||
@php
|
||||
$currentPage = 'manage_cms';
|
||||
@endphp
|
||||
<style>
|
||||
@php
|
||||
$currentPage = 'manage_cms';
|
||||
@endphp
|
||||
<style>
|
||||
.error-message {
|
||||
color: #FF0000;
|
||||
}
|
||||
@@ -24,110 +24,123 @@
|
||||
<div class="top-tabel">
|
||||
<div class="row">
|
||||
<div class="col-md-12 left d-flex align-items-center justify-content-between" style="gap: 15px;">
|
||||
<a class="d-flex align-items-center justify-content-center pl-2" href="{{route('manage.aboutUs')}}">
|
||||
<a class="d-flex align-items-center justify-content-center pl-2"
|
||||
href="{{ route('manage.aboutUs') }}">
|
||||
<img class="back-btn" src="{{ asset('public/assets/img/left-arrow.svg') }}">
|
||||
<h6 class="card-title p-0">Edit Details of Resturant</h6>
|
||||
</a>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="col-xl-12 col-lg-12 col-sm-12 layout-spacing">
|
||||
<div class="widget-content widget-content-area br-8 position-btn p-0">
|
||||
<div class="view-details">
|
||||
<div class="simple-tab">
|
||||
<div class="tab-content" id="myTabContent">
|
||||
<div class="tab-pane fade show active" id="home-tab-pane" role="tabpanel"
|
||||
aria-labelledby="home-tab" tabindex="0">
|
||||
<form id="aboutus_rest_form">
|
||||
<div class="col-xl-12 col-lg-12 col-sm-12 layout-spacing">
|
||||
<div class="widget-content widget-content-area br-8 position-btn p-0">
|
||||
<div class="view-details">
|
||||
<div class="simple-tab">
|
||||
<div class="tab-content" id="myTabContent">
|
||||
<div class="tab-pane fade show active" id="home-tab-pane" role="tabpanel"
|
||||
aria-labelledby="home-tab" tabindex="0">
|
||||
<form id="aboutus_rest_form">
|
||||
<div class="row">
|
||||
<div class="col-md-12">
|
||||
<input type="hidden" name="about_rest_id" value="{{ $edit_about_rest['id'] }}">
|
||||
<div id="terms-quill-edit" value="{{$edit_about_rest['description'] }}" name="about_rest" id="about_rest" class="editor-quill" style="height: 300px;">{!! $edit_about_rest['description'] !!}</div>
|
||||
<input type="hidden" id="about_rest" name="about_rest" value="{{ $edit_about_rest['description'] }}" />
|
||||
</div>
|
||||
<input type="hidden" name="about_rest_id"
|
||||
value="{{ $edit_about_rest['id'] }}">
|
||||
<textarea id="terms-quill-edit" name="about_rest" class="editor-quill" style="height: 300px;">
|
||||
{!! $edit_about_rest['description'] !!}
|
||||
</textarea>
|
||||
<input type="hidden" id="about_rest" name="about_rest"
|
||||
value="{{ $edit_about_rest['description'] }}" />
|
||||
</div>
|
||||
<div class="col-md-12">
|
||||
<button type="submit" id="update_aboutUS_rest" class="download-btn-custom mt-3 custom-width-10" >
|
||||
<button type="submit" id="update_aboutUS_rest"
|
||||
class="download-btn-custom mt-3 custom-width-10">
|
||||
<span>Update</span>
|
||||
</button>
|
||||
</div>
|
||||
</div>
|
||||
</form>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<!-- END MAIN CONTAINER -->
|
||||
@endsection
|
||||
@section('section_script')
|
||||
<script>
|
||||
var quill = new Quill('#terms-quill-edit', {
|
||||
theme: 'snow'
|
||||
});
|
||||
// Listen for changes and update the hidden input with the HTML content
|
||||
// Listen for changes and update the hidden input with the HTML content
|
||||
quill.on('text-change', function() {
|
||||
var htmlContent = quill.root.innerHTML;
|
||||
document.getElementById('edit_about_rest').value = htmlContent;
|
||||
});
|
||||
</script>
|
||||
<script src="https://code.jquery.com/jquery-3.6.4.min.js"></script>
|
||||
<script src="https://cdnjs.cloudflare.com/ajax/libs/jquery-validate/1.19.5/jquery.validate.min.js"></script>
|
||||
<script>
|
||||
$('#update_aboutUS_rest').on("click", function (e) {
|
||||
|
||||
$.validator.addMethod("quillNotEmpty", function(value, element) {
|
||||
var quill = new Quill('#terms-quill-edit');
|
||||
return quill.getText().trim().length > 0;
|
||||
}, "Please enter about us ");
|
||||
$('#aboutus_rest_form').validate({
|
||||
ignore: [],
|
||||
debug: false,
|
||||
rules: {
|
||||
about_rest: {
|
||||
required: true,
|
||||
quillNotEmpty: true
|
||||
}
|
||||
},
|
||||
messages: {
|
||||
about_rest: {
|
||||
required: "Please Enter about us for restaturant"
|
||||
}
|
||||
},
|
||||
errorClass: 'error-message',
|
||||
submitHandler: function (form) {
|
||||
var quillContent = quill.root.innerHTML;
|
||||
$('#about_rest').val(quillContent);base_url = url_path;
|
||||
var formData = new FormData(form);
|
||||
<!-- END MAIN CONTAINER -->
|
||||
@endsection
|
||||
|
||||
$.ajaxSetup({
|
||||
headers: {
|
||||
"X-CSRF-TOKEN": $('meta[name="csrf-token"]').attr("content"),
|
||||
@section('section_script')
|
||||
<script>
|
||||
// Initialize CKEditor
|
||||
CKEDITOR.replace('terms-quill-edit', {
|
||||
toolbar: [
|
||||
{ name: 'basicstyles', items: ['Bold', 'Italic', 'Underline', 'Strike'] },
|
||||
{ name: 'paragraph', items: ['NumberedList', 'BulletedList', '-', 'Blockquote'] },
|
||||
{ name: 'styles', items: ['Format'] },
|
||||
{ name: 'links', items: ['Link', 'Unlink'] },
|
||||
{ name: 'tools', items: ['Maximize'] }
|
||||
]
|
||||
});
|
||||
|
||||
// Listen for changes and update the hidden input with the HTML content
|
||||
CKEDITOR.instances['terms-quill-edit'].on('change', function() {
|
||||
var htmlContent = CKEDITOR.instances['terms-quill-edit'].getData();
|
||||
document.getElementById('about_rest').value = htmlContent;
|
||||
});
|
||||
|
||||
$('#update_aboutUS_rest').on("click", function(e) {
|
||||
|
||||
$.validator.addMethod("quillNotEmpty", function(value, element) {
|
||||
var editorData = CKEDITOR.instances['terms-quill-edit'].getData();
|
||||
return editorData.trim().length > 0;
|
||||
}, "Please enter about us");
|
||||
|
||||
$('#aboutus_rest_form').validate({
|
||||
ignore: [],
|
||||
debug: false,
|
||||
rules: {
|
||||
about_rest: {
|
||||
required: true,
|
||||
quillNotEmpty: true
|
||||
}
|
||||
},
|
||||
messages: {
|
||||
about_rest: {
|
||||
required: "Please Enter about us for restaturant"
|
||||
}
|
||||
},
|
||||
errorClass: 'error-message',
|
||||
submitHandler: function(form) {
|
||||
var editorData = CKEDITOR.instances['terms-quill-edit'].getData();
|
||||
$('#about_rest').val(editorData);
|
||||
|
||||
var formData = new FormData(form);
|
||||
$.ajaxSetup({
|
||||
headers: {
|
||||
"X-CSRF-TOKEN": $('meta[name="csrf-token"]').attr("content"),
|
||||
},
|
||||
});
|
||||
|
||||
$.ajax({
|
||||
url: '{{ url("/aboutus_rest_update") }}',
|
||||
type: 'POST',
|
||||
data: formData,
|
||||
processData: false,
|
||||
contentType: false,
|
||||
success: function(response) {
|
||||
if (response.status == 200) {
|
||||
toastr.success('About Us Restaturant Data Updated Successfully');
|
||||
setTimeout(function() {
|
||||
window.location.href = '{{ url("/manage-about-us") }}';
|
||||
}, 1000);
|
||||
} else {
|
||||
toastr.error("Something went wrong");
|
||||
}
|
||||
},
|
||||
});
|
||||
}
|
||||
});
|
||||
$.ajax({
|
||||
url: base_url + '/aboutus_rest_update',
|
||||
type: 'POST',
|
||||
data: formData,
|
||||
processData: false,
|
||||
contentType: false,
|
||||
success: function (response) {
|
||||
if (response.status == 200) {
|
||||
toastr.success('About Us Restaturant Data Updated Successfully');
|
||||
setTimeout(function () {
|
||||
window.location.href = base_url + "/manage-about-us";
|
||||
}, 1000);
|
||||
} else {
|
||||
toastr.error("Something went wrong");
|
||||
}
|
||||
},
|
||||
});
|
||||
}
|
||||
});
|
||||
});
|
||||
</script>
|
||||
@endsection
|
||||
});
|
||||
</script>
|
||||
@endsection
|
||||
|
||||
Reference in New Issue
Block a user