diff --git a/resources/views/training/exam/create.blade.php b/resources/views/training/exam/create.blade.php index 967e42a51..6f8095f5b 100644 --- a/resources/views/training/exam/create.blade.php +++ b/resources/views/training/exam/create.blade.php @@ -155,7 +155,9 @@ class="form-control" - + @@ -187,6 +189,13 @@ class="form-control" var defaultDate = "{{ old('date') }}" document.querySelector('.datepicker').flatpickr({ disableMobile: true, minDate: "{!! date('Y-m-d', strtotime('-1 months')) !!}", maxDate: "{!! date('Y-m-d') !!}", dateFormat: "d/m/Y", defaultDate: defaultDate, locale: {firstDayOfWeek: 1 } }); }) + + function handleSubmit(event) { + event.preventDefault(); + document.querySelector('.submit-spinner').style.display = 'inherit'; + event.target.disabled = true; + event.target.closest('form').submit(); + } @endsection