summaryrefslogtreecommitdiffstats
path: root/settings
diff options
context:
space:
mode:
authorRobin Appelman <icewind@owncloud.com>2012-01-23 17:33:12 +0100
committerRobin Appelman <icewind@owncloud.com>2012-01-23 17:33:12 +0100
commit76ce8c6c6a993a8dd2dbc70417900983484dc211 (patch)
tree378625b7f200d24140d6fba44564431eb3f56ce0 /settings
parentb8e01939e9940a53fc3125b2d1f04671e94fb8bd (diff)
downloadnextcloud-server-76ce8c6c6a993a8dd2dbc70417900983484dc211.tar.gz
nextcloud-server-76ce8c6c6a993a8dd2dbc70417900983484dc211.zip
dont show new user when an error occured
Diffstat (limited to 'settings')
-rw-r--r--settings/js/users.js7
1 files changed, 5 insertions, 2 deletions
diff --git a/settings/js/users.js b/settings/js/users.js
index b45038e5b04..46ab12b857a 100644
--- a/settings/js/users.js
+++ b/settings/js/users.js
@@ -133,6 +133,7 @@ $(document).ready(function(){
}
var password=$('#newuserpassword').val();
var groups=$('#newusergroups').prev().children('div').data('settings').checked;
+ var tr
$.post(
OC.filePath('settings','ajax','createuser.php'),
{
@@ -141,10 +142,12 @@ $(document).ready(function(){
groups:groups,
},
function(result){
-
+ if(result.status!='success'){
+ tr.remove();
+ }
}
);
- var tr=$('#content table tbody tr').first().clone();
+ tr=$('#content table tbody tr').first().clone();
tr.attr('data-uid',username);
tr.find('td.name').text(username);
var select=$('<select multiple="multiple" data-placehoder="Groups" title="Groups">');