diff options
author | Joas Schilling <coding@schilljs.com> | 2016-11-03 09:58:47 +0100 |
---|---|---|
committer | Lukas Reschke <lukas@statuscode.ch> | 2016-11-18 12:10:51 +0100 |
commit | a7feb91282744b2f52b1a9a9d4fba99fa1ad4a9a (patch) | |
tree | 82ee166d5cb696f12f2d527041f54ce29da7d156 /settings | |
parent | b2d9c20aac35e92e7a7b6838e02c7170991ef352 (diff) | |
download | nextcloud-server-a7feb91282744b2f52b1a9a9d4fba99fa1ad4a9a.tar.gz nextcloud-server-a7feb91282744b2f52b1a9a9d4fba99fa1ad4a9a.zip |
Confirm on create/delete group
Signed-off-by: Joas Schilling <coding@schilljs.com>
Diffstat (limited to 'settings')
-rw-r--r-- | settings/js/users/groups.js | 15 |
1 files changed, 13 insertions, 2 deletions
diff --git a/settings/js/users/groups.js b/settings/js/users/groups.js index 8f4d95432a8..cfe01c17530 100644 --- a/settings/js/users/groups.js +++ b/settings/js/users/groups.js @@ -128,6 +128,11 @@ GroupList = { }, createGroup: function (groupname) { + if (OC.PasswordConfirmation.requiresPasswordConfirmation()) { + OC.PasswordConfirmation.requirePasswordConfirmation(_.bind(this.createGroup, this, groupname)); + return; + } + $.post( OC.generateUrl('/settings/users/groups'), { @@ -278,10 +283,16 @@ GroupList = { GroupList.show); //when to mark user for delete - $userGroupList.on('click', '.delete', function () { + var deleteAction = function () { + if (OC.PasswordConfirmation.requiresPasswordConfirmation()) { + OC.PasswordConfirmation.requirePasswordConfirmation(_.bind(deleteAction, this)); + return; + } + // Call function for handling delete/undo GroupDeleteHandler.mark(GroupList.getElementGID(this)); - }); + }; + $userGroupList.on('click', '.delete', deleteAction); //delete a marked user when leaving the page $(window).on('beforeunload', function () { |