diff options
Diffstat (limited to 'settings/js')
-rw-r--r-- | settings/js/users/groups.js | 18 |
1 files changed, 17 insertions, 1 deletions
diff --git a/settings/js/users/groups.js b/settings/js/users/groups.js index 3234d6911e4..3ac8d3f36e3 100644 --- a/settings/js/users/groups.js +++ b/settings/js/users/groups.js @@ -64,7 +64,23 @@ $(document).ready( function () { // Call function for handling delete/undo on Groups GroupList.delete_group(gid); }); - $('#newgroup').submit(function (event) { + + // Display or hide of Create Group List Element + $('#newgroup-form').hide(); + $('#newgroup-init').on('click', function (e) { + e.stopPropagation(); + $('#newgroup-form').show(); + $('#newgroup-init').hide(); + $(document).click( function (e) { + if (e.target.id !== 'newgroup-form') { + $("#newgroup-form").hide(); + $("#newgroup-init").show(); + } + }); + }); + + // Responsible for Creating Groups. + $('#newgroup-form form').submit(function (event) { event.preventDefault(); var groupname = $('#newgroupname').val(); if ($.trim(groupname) === '') { |