warn while updating user admin > standar

This commit is contained in:
fbsanchez 2020-11-03 10:14:17 +01:00
parent 5ddb3f4421
commit 8202839888
1 changed files with 9 additions and 1 deletions

View File

@ -1387,7 +1387,7 @@ $(document).ready (function () {
});
});
$('#submit-crtbutton').click(function (e) {
function checkProfiles(e) {
e.preventDefault();
if ($('input[name="is_admin"]:checked').val() == 1) {
// Admin does not require profiles.
@ -1405,6 +1405,14 @@ $(document).ready (function () {
$('#user_profile_form').submit();
}
}
}
$('#submit-crtbutton').click(function (e) {
checkProfiles(e);
});
$('#submit-uptbutton').click(function (e) {
checkProfiles(e);
});
});