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
No known key found for this signature in database
GPG key ID: E1121565A016ADFD
3 changed files with 10 additions and 2 deletions

2
public/js/app.js vendored

File diff suppressed because one or more lines are too long

View file

@ -1,4 +1,4 @@
{
"/css/app.css": "/css/app.css?id=fb9e13c65ffee8ba7340",
"/js/app.js": "/js/app.js?id=7f1d4778de811d7fc901"
"/js/app.js": "/js/app.js?id=6ae33b54881f793f30af"
}

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', '');
}
}
});
});