Skip to content

Commit

Permalink
rename method
Browse files Browse the repository at this point in the history
  • Loading branch information
slubwama committed Oct 11, 2024
1 parent 69b4727 commit 6aab342
Showing 1 changed file with 2 additions and 8 deletions.
10 changes: 2 additions & 8 deletions omod/src/main/webapp/admin/editAddressHierarchyLevel.jsp
Original file line number Diff line number Diff line change
Expand Up @@ -31,15 +31,9 @@
});
});
function beforeSubmit() {
function sanitizeAndSubmit() {
const nameField = document.getElementById('fieldTypeName');
const requiredCheckbox = document.getElementById('requiredCheckbox');
nameField.value=html_sanitize(nameField.value);
const requiredField = document.getElementById('required');
requiredField.value = requiredCheckbox.checked ? 'true' : 'false';
return true;
}
-->
Expand All @@ -64,7 +58,7 @@ function beforeSubmit() {
<div><b class="boxHeader"><spring:message code="addresshierarchy.admin.editLevel" /></b>


<form id="editAddressHierarchyLevel" action="updateAddressHierarchyLevel.form" method="post" onSubmit="return beforeSubmit()">
<form id="editAddressHierarchyLevel" action="updateAddressHierarchyLevel.form" method="post" onSubmit="return sanitizeAndSubmit()">
<input type="hidden" name="levelId" value="<c:out value='${level.id}'/>"/>

<table cellspacing="0" cellpadding="0" class="box">
Expand Down

0 comments on commit 6aab342

Please sign in to comment.