45 lines
1.8 KiB
PHP
45 lines
1.8 KiB
PHP
<!-- Bootstrap & Jquery App -->
|
|
<script type="text/javascript" src="https://cdnjs.cloudflare.com/ajax/libs/jquery/3.6.0/jquery.min.js" integrity="sha512-894YE6QWD5I59HgZOGReFYm4dnWc1Qt5NtvYSaNcOP+u1T9qYdvdihz0PPSiiqn/+/3e7Jo4EaG7TubfWGUrMQ==" crossorigin="anonymous"></script>
|
|
<script type="text/javascript" src="https://cdnjs.cloudflare.com/ajax/libs/lodash.js/4.17.21/lodash.min.js" integrity="sha512-WFN04846sdKMIP5LKNphMaWzU7YpMyCU245etK3g/2ARYbPK9Ub18eG+ljU96qKRCWh+quCY7yefSmlkQw1ANQ==" crossorigin="anonymous"></script>
|
|
|
|
<!-- JavaScript Bundle with Popper -->
|
|
<script type="text/javascript" src="https://cdn.jsdelivr.net/npm/bootstrap@5.0.2/dist/js/bootstrap.bundle.min.js" integrity="sha384-MrcW6ZMFYlzcLA8Nl+NtUVF0sA7MsXsP1UyJoMp4YLEuNSfAP+JcXn/tWtIaxVXM" crossorigin="anonymous"></script>
|
|
|
|
<!-- Additional Utilities -->
|
|
<script src="{{ asset('plugin/bootstrap3-typeahead/bootstrap3-typeahead.min.js') }}"></script>
|
|
|
|
<script type="text/javascript">
|
|
// Example starter JavaScript for disabling form submissions if there are invalid fields
|
|
(function () {
|
|
'use strict'
|
|
|
|
// Our CSRF token to each interaction
|
|
$.ajaxSetup({
|
|
headers: {
|
|
'X-CSRF-TOKEN': $('meta[name="csrf-token"]').attr('content')
|
|
}
|
|
});
|
|
|
|
// Fetch all the forms we want to apply custom Bootstrap validation styles to
|
|
var forms = document.querySelectorAll('.needs-validation')
|
|
|
|
// Loop over them and prevent submission
|
|
Array.prototype.slice.call(forms)
|
|
.forEach(function (form) {
|
|
form.addEventListener('submit', function (event) {
|
|
if (!form.checkValidity()) {
|
|
event.preventDefault()
|
|
event.stopPropagation()
|
|
}
|
|
|
|
form.classList.add('was-validated')
|
|
}, false)
|
|
});
|
|
})()
|
|
</script>
|
|
|
|
<!-- Page Script Assets -->
|
|
{!! PageAssets::js() !!}
|
|
|
|
<!-- Page Scripts -->
|
|
@yield('page-scripts') |