mirror of
https://github.com/slawkens/myaac.git
synced 2026-01-08 15:51:29 +01:00
Extract script.ajax-setup.html.twig
This commit is contained in:
@@ -73,13 +73,9 @@
|
|||||||
<!-- jQuery Form Submit No Refresh + Toastify -->
|
<!-- jQuery Form Submit No Refresh + Toastify -->
|
||||||
<link rel="stylesheet" type="text/css" href="{{ constant('BASE_URL') }}tools/css/toastify.min.css">
|
<link rel="stylesheet" type="text/css" href="{{ constant('BASE_URL') }}tools/css/toastify.min.css">
|
||||||
<script type="text/javascript" src="{{ constant('BASE_URL') }}tools/js/toastify.min.js"></script>
|
<script type="text/javascript" src="{{ constant('BASE_URL') }}tools/js/toastify.min.js"></script>
|
||||||
<script>
|
{{ include('script.ajax-setup.html.twig') }}
|
||||||
$.ajaxSetup({
|
|
||||||
headers: {
|
|
||||||
'X-CSRF-TOKEN': $('meta[name="csrf-token"]').attr('content')
|
|
||||||
}
|
|
||||||
});
|
|
||||||
|
|
||||||
|
<script>
|
||||||
const noChangesText = "No changes has been made";
|
const noChangesText = "No changes has been made";
|
||||||
|
|
||||||
$('form')
|
$('form')
|
||||||
|
|||||||
7
system/templates/script.ajax-setup.html.twig
Normal file
7
system/templates/script.ajax-setup.html.twig
Normal file
@@ -0,0 +1,7 @@
|
|||||||
|
<script>
|
||||||
|
$.ajaxSetup({
|
||||||
|
headers: {
|
||||||
|
'X-CSRF-TOKEN': $('meta[name="csrf-token"]').attr('content')
|
||||||
|
}
|
||||||
|
});
|
||||||
|
</script>
|
||||||
Reference in New Issue
Block a user