From: Robin Appelman Date: Mon, 23 Jan 2012 16:33:12 +0000 (+0100) Subject: dont show new user when an error occured X-Git-Tag: v3.0~19^2~3 X-Git-Url: https://source.dussan.org/?a=commitdiff_plain;h=76ce8c6c6a993a8dd2dbc70417900983484dc211;p=nextcloud-server.git dont show new user when an error occured --- 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=$('