From e42ff271520788a3c598a29381fa5c6e15ad0de2 Mon Sep 17 00:00:00 2001 From: Isaac Machakata Date: Sat, 6 Apr 2024 21:13:06 +0200 Subject: [PATCH] refactor: prevent form submittionif requisition id empty --- public/static/js/app.js | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/public/static/js/app.js b/public/static/js/app.js index 26c152f..5c5bc14 100644 --- a/public/static/js/app.js +++ b/public/static/js/app.js @@ -1,4 +1,9 @@ $(function () { + // prevent form submittion if id is empty + $('#UpdateRequisition').on('click', function (event) { + if (!$('#ID').val()) event.preventDefault(); + }); + // register bootstrap tooltips $(document).find('[data-bs-toggle=tooltip]').map(function () { new bootstrap.Tooltip(this);