From 2244e0eba796de61ed9a279d824f9bc6d1e1d916 Mon Sep 17 00:00:00 2001 From: Sugaroverdose Date: Tue, 20 Jan 2015 19:12:58 +0300 Subject: [PATCH] do not clear fields until request return success --- settings/js/users/users.js | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/settings/js/users/users.js b/settings/js/users/users.js index 87d8b1801c1..f21c660b41f 100644 --- a/settings/js/users/users.js +++ b/settings/js/users/users.js @@ -773,7 +773,6 @@ $(document).ready(function () { return false; } var groups = $('#newusergroups').val() || []; - $('#newuser').get(0).reset(); $.post( OC.generateUrl('/settings/users/users'), { @@ -801,6 +800,8 @@ $(document).ready(function () { GroupList.incEveryoneCount(); }).fail(function(result, textStatus, errorThrown) { OC.dialogs.alert(result.responseJSON.message, t('settings', 'Error creating user')); + }).success(function(){ + $('#newuser').get(0).reset(); }); });