Skip to content

Commit 7479bb6

Browse files
authored
Merge branch 'dev' into 1196-arrange-the-show-100-csv-customize-columns-boxes-to-be-in-one-line-on-the-delta-urls-page
2 parents a48c9a7 + 3632801 commit 7479bb6

File tree

2 files changed

+13
-0
lines changed

2 files changed

+13
-0
lines changed

CHANGELOG.md

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -119,3 +119,10 @@ For each PR made, an entry should be added to this changelog. It should contain
119119
- Description: Formatting the buttons - 'Show 100','CSV' and 'Customize Columns' to be on a single line for an optimal use of space.
120120
- Changes:
121121
- Updated delta_url_list.css and delta_url_list.js files with necessary modifications
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.
128+

sde_indexing_helper/static/js/delta_url_list.js

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

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

0 commit comments

Comments
 (0)