diff options
author | Michael Gapczynski <GapczynskiM@gmail.com> | 2012-05-06 18:04:31 -0400 |
---|---|---|
committer | Michael Gapczynski <GapczynskiM@gmail.com> | 2012-05-06 18:04:48 -0400 |
commit | e0db22cc0741abaebe44e245f2da6ca1a34f7cac (patch) | |
tree | 94d9765246bb305d0b34b194e7d0edaa61fec3f2 /settings/js | |
parent | 333345d20190212200b10ae01d925807e1b10ece (diff) | |
download | nextcloud-server-e0db22cc0741abaebe44e245f2da6ca1a34f7cac.tar.gz nextcloud-server-e0db22cc0741abaebe44e245f2da6ca1a34f7cac.zip |
Provide feedback when user creation fails
Diffstat (limited to 'settings/js')
-rw-r--r-- | settings/js/users.js | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/settings/js/users.js b/settings/js/users.js index eed93d3b303..e6eee4ce4fa 100644 --- a/settings/js/users.js +++ b/settings/js/users.js @@ -158,10 +158,11 @@ $(document).ready(function(){ event.preventDefault(); var username=$('#newusername').val(); if($('#content table tbody tr').filterAttr('data-uid',username).length>0){ + OC.dialogs.alert('The username is already being used', 'Error creating user'); return; } if($.trim(username) == '') { - alert('Please provide a username!'); + OC.dialogs.alert('A valid username must be provided', 'Error creating user'); return false; } var password=$('#newuserpassword').val(); @@ -177,6 +178,7 @@ $(document).ready(function(){ function(result){ if(result.status!='success'){ tr.remove(); + OC.dialogs.alert(result.data.message, 'Error creating user'); } } ); |