From 966803d3a36506ab39e6db917e4836bb8a17c196 Mon Sep 17 00:00:00 2001 From: saikumarjetti Date: Mon, 17 Mar 2025 02:09:02 +0530 Subject: [PATCH] oninvalid event is added to common drag and drop component --- .../resources/templates/fragments/common.html | 2 +- src/main/resources/templates/misc/stamp.html | 18 +----------------- 2 files changed, 2 insertions(+), 18 deletions(-) diff --git a/src/main/resources/templates/fragments/common.html b/src/main/resources/templates/fragments/common.html index 1e801d06f..d1567833e 100644 --- a/src/main/resources/templates/fragments/common.html +++ b/src/main/resources/templates/fragments/common.html @@ -232,7 +232,7 @@ th:name="${name}+'-input'" th:id="${name}+'-input-container'" th:data-text="#{fileChooser.hoveredDragAndDrop}">
diff --git a/src/main/resources/templates/misc/stamp.html b/src/main/resources/templates/misc/stamp.html index 8b4756842..36c549adb 100644 --- a/src/main/resources/templates/misc/stamp.html +++ b/src/main/resources/templates/misc/stamp.html @@ -28,7 +28,7 @@
-
+

@@ -194,22 +194,6 @@ alphabetGroup.style.display = 'none'; } } - document.addEventListener('DOMContentLoaded', function() { - const form = document.getElementById('stampFormGroup'); - if (form) { - form.addEventListener('submit', function(event) { - const fileInput = document.getElementById('fileInput-input'); - if (!fileInput || fileInput.files.length === 0) { - // Prevent the form from submitting - event.preventDefault(); - event.stopPropagation(); - alert('Please select a PDF file before submitting.'); - return false; - } - return true; - }, true); - } - });