Skip to content

Commit

Permalink
refactor: prevent form submittionif requisition id empty
Browse files Browse the repository at this point in the history
  • Loading branch information
im-machakata committed Apr 6, 2024
1 parent 27202a4 commit e42ff27
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions public/static/js/app.js
Original file line number Diff line number Diff line change
@@ -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);
Expand Down

0 comments on commit e42ff27

Please sign in to comment.