Skip to content

Commit

Permalink
bugfix: fixed validation errors on invisible elements
Browse files Browse the repository at this point in the history
  • Loading branch information
chilek committed Sep 9, 2022
1 parent a5de189 commit 691a145
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 0 deletions.
4 changes: 4 additions & 0 deletions js/lms-ui-customer-select.js
Original file line number Diff line number Diff line change
Expand Up @@ -129,6 +129,10 @@ function initCustomerList(selector)
}

if (version === 2) {
input.on('invalid', function() {
return false;
});

suggestionInput.one('focus', function() {
new AutoSuggest({
form: suggestionInput[0].form,
Expand Down
1 change: 1 addition & 0 deletions templates/default/node/nodeaddbox.html
Original file line number Diff line number Diff line change
Expand Up @@ -595,6 +595,7 @@
$('#wholenetwork').change(function() {
var wholenetwork = $(this).prop('checked');
$('[name="nodedata[ipaddr]"],[name="nodedata[ipaddr_pub]"]').closest('tr').toggle(!wholenetwork);
$('[name="nodedata[ipaddr]"]').prop('required', !wholenetwork);
}).change();
});

Expand Down
1 change: 1 addition & 0 deletions templates/default/node/nodeeditbox.html
Original file line number Diff line number Diff line change
Expand Up @@ -656,6 +656,7 @@
$('#wholenetwork').change(function() {
var wholenetwork = $(this).prop('checked');
$('[name="nodeedit[ipaddr]"],[name="nodeedit[ipaddr_pub]"]').closest('tr').toggle(!wholenetwork);
$('[name="nodedata[ipaddr]"]').prop('required', !wholenetwork);
}).change();
});

Expand Down

0 comments on commit 691a145

Please sign in to comment.