diff --git a/resources/views/form/rapport-titans/1794479717-1038b2bc-89ba-4885-a446-33112967cf0e.blade.php b/resources/views/form/rapport-titans/1794479717-1038b2bc-89ba-4885-a446-33112967cf0e.blade.php index e7384981..dd826e9b 100644 --- a/resources/views/form/rapport-titans/1794479717-1038b2bc-89ba-4885-a446-33112967cf0e.blade.php +++ b/resources/views/form/rapport-titans/1794479717-1038b2bc-89ba-4885-a446-33112967cf0e.blade.php @@ -220,9 +220,7 @@ console.log(hierarchy) }) - $('#field-contact_id').change(function() { - $('#field-speciality').val($('option:selected', this).attr('speciality')) - }) + $('#field-contact_id').change(function() { $('#field-msl_code').val($('option:selected', this).attr('msl_code')) @@ -232,9 +230,7 @@ $('#field-contact_id').trigger('change'); }); - $('#field-city,#field-state,#field-departmental_head_name').on('input', function () { - this.value = this.value.replace(/[^a-zA-Z\s]/g, ''); - }); + $('#report-form').on('submit', function(event){ @@ -273,15 +269,11 @@ }); }); - var today = new Date(); - var dd = String(today.getDate()).padStart(2, '0'); - var mm = String(today.getMonth() + 1).padStart(2, '0'); - var yyyy = today.getFullYear(); - today = yyyy + '-' + mm + '-' + dd; - - var plandateField = document.getElementById('field-record_date'); - + var plandateField = document.getElementById('field-record_date'); + if (plandateField) { + var today = new Date().toISOString().split('T')[0]; plandateField.setAttribute('max', today); + } });