Merge pull request #1020 from keriati/feat/nopwsubmit

feat: Prevent password submission when password is not changed.
This commit is contained in:
KodeStar 2022-11-22 17:06:16 +00:00 committed by GitHub
commit cc6e47372e
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
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", "/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'); 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', '');
}
}
});
}); });