Skip to content

Commit 7c7c5b3

Browse files
authored
Merge branch 'dev' into 1240-fix-code-scanning-alert-inclusion-of-functionality-from-an-untrusted-source
2 parents abd7ae4 + 3632801 commit 7c7c5b3

File tree

2 files changed

+12
-0
lines changed

2 files changed

+12
-0
lines changed

CHANGELOG.md

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -119,3 +119,9 @@ For each PR made, an entry should be added to this changelog. It should contain
119119
- Changes:
120120
- Replaced protocol‑relative URLs with HTTPS.
121121
- Added SRI (integrity) and crossorigin attributes to external script tags.
122+
123+
- 1246-minor-enhancement-document-type-pattern-form-require-document-type-or-show-appropriate-error
124+
- Description: In the Document Type Pattern Form, if the user does not select a Document Type while filling out the form, an appropriate error message is displayed.
125+
- Changes:
126+
- Added a JavaScript validation check on form submission to ensure the document type (stored in a hidden input) is not empty.
127+
- Display an error message and prevent form submission if the field is empty.

sde_indexing_helper/static/js/delta_url_list.js

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2075,6 +2075,12 @@ $("#document_type_pattern_form").on("submit", function (e) {
20752075
inputs[field.name] = field.value;
20762076
});
20772077

2078+
// Validate that the document_type_pattern field is not empty
2079+
if (!inputs.document_type_pattern) {
2080+
toastr.error("Please select a Document Type");
2081+
return; // Prevent form submission
2082+
}
2083+
20782084
postDocumentTypePatterns(
20792085
inputs.match_pattern,
20802086
inputs.match_pattern_type,

0 commit comments

Comments
 (0)