feat: Prevent password submission when password is not changed.

This commit is contained in:
Attila Kerekes
2022-11-22 17:49:02 +01:00
committed by Attila Jozsef Kerekes
parent 756ab353f3
commit 0299ee6fa9
3 changed files with 10 additions and 2 deletions

View File

@@ -258,5 +258,13 @@ $.when( $.ready ).then(function() {
current.toggleClass('active');
});
});
$('#itemform').on('submit', function(e) {
var passwordField = $('input[name="config[password]"]').first();
if (passwordField.length > 0) {
if (passwordField.attr('value') === fakePassword) {
passwordField.attr('value', '');
}
}
});
});