diff options
author | Robin Appelman <icewind@owncloud.com> | 2012-01-24 00:24:09 +0100 |
---|---|---|
committer | Robin Appelman <icewind@owncloud.com> | 2012-01-24 00:24:09 +0100 |
commit | cdfb252ceda6a9a97dd6473c472ed21a9948c8cf (patch) | |
tree | 099c7ecf348cb7360c2eb32a449249129399efcc /settings | |
parent | 7ea2923fa8805d91ee7d69dd19d10d450792bafe (diff) | |
parent | 456394d3ec03e2e0d582ded9db1c92d037d13d36 (diff) | |
download | nextcloud-server-cdfb252ceda6a9a97dd6473c472ed21a9948c8cf.tar.gz nextcloud-server-cdfb252ceda6a9a97dd6473c472ed21a9948c8cf.zip |
Merge branch 'master' of gitorious.org:owncloud/owncloud
Diffstat (limited to 'settings')
-rw-r--r-- | settings/js/users.js | 10 |
1 files changed, 8 insertions, 2 deletions
diff --git a/settings/js/users.js b/settings/js/users.js index b45038e5b04..c9b1d855db0 100644 --- a/settings/js/users.js +++ b/settings/js/users.js @@ -127,12 +127,16 @@ $(document).ready(function(){ $('#newuser').submit(function(event){ event.preventDefault(); var username=$('#newusername').val(); + if($('#content table tbody tr').filterAttr('data-uid',username).length>0){ + return; + } if($.trim(username) == '') { alert('Please provide a username!'); return false; } var password=$('#newuserpassword').val(); var groups=$('#newusergroups').prev().children('div').data('settings').checked; + var tr $.post( OC.filePath('settings','ajax','createuser.php'), { @@ -141,10 +145,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">'); |