diff options
author | Morris Jobke <hey@morrisjobke.de> | 2016-02-05 10:27:18 +0100 |
---|---|---|
committer | Morris Jobke <hey@morrisjobke.de> | 2016-02-05 10:27:18 +0100 |
commit | f0752d7ba1bb879803c97e6f6519f4d2400932ab (patch) | |
tree | cd3ce4945908d48928e575736e67c0e7ef766e35 /settings | |
parent | 342c2aac98961f91f0fd38423a217cb980dd95b8 (diff) | |
download | nextcloud-server-f0752d7ba1bb879803c97e6f6519f4d2400932ab.tar.gz nextcloud-server-f0752d7ba1bb879803c97e6f6519f4d2400932ab.zip |
Allow to delete the email address in user management
Diffstat (limited to 'settings')
-rw-r--r-- | settings/js/users/users.js | 32 |
1 files changed, 14 insertions, 18 deletions
diff --git a/settings/js/users/users.js b/settings/js/users/users.js index 151ab6cdecc..306e3952e53 100644 --- a/settings/js/users/users.js +++ b/settings/js/users/users.js @@ -732,24 +732,20 @@ $(document).ready(function () { .focus() .keypress(function (event) { if (event.keyCode === 13) { - if ($(this).val().length > 0) { - $tr.data('mailAddress', $input.val()); - $input.blur(); - $.ajax({ - type: 'PUT', - url: OC.generateUrl('/settings/users/{id}/mailAddress', {id: uid}), - data: { - mailAddress: $(this).val() - } - }).fail(function (result) { - OC.Notification.show(result.responseJSON.data.message); - // reset the values - $tr.data('mailAddress', mailAddress); - $tr.children('.mailAddress').children('span').text(mailAddress); - }); - } else { - $input.blur(); - } + $tr.data('mailAddress', $input.val()); + $input.blur(); + $.ajax({ + type: 'PUT', + url: OC.generateUrl('/settings/users/{id}/mailAddress', {id: uid}), + data: { + mailAddress: $(this).val() + } + }).fail(function (result) { + OC.Notification.show(result.responseJSON.data.message); + // reset the values + $tr.data('mailAddress', mailAddress); + $tr.children('.mailAddress').children('span').text(mailAddress); + }); } }) .blur(function () { |