diff options
author | Thomas Müller <thomas.mueller@tmit.eu> | 2016-02-05 11:54:12 +0100 |
---|---|---|
committer | Thomas Müller <thomas.mueller@tmit.eu> | 2016-02-05 11:54:12 +0100 |
commit | 7dde2c773f4efee0094176fe76b2c64f4f74a1ea (patch) | |
tree | 82d4c46d3f55fc7e080bda83dd0c4c5e966fc360 /settings | |
parent | e6bab280a6eb72332058e97c5188d440b3be4c6a (diff) | |
parent | f0752d7ba1bb879803c97e6f6519f4d2400932ab (diff) | |
download | nextcloud-server-7dde2c773f4efee0094176fe76b2c64f4f74a1ea.tar.gz nextcloud-server-7dde2c773f4efee0094176fe76b2c64f4f74a1ea.zip |
Merge pull request #22146 from owncloud/delete-email-address
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 () { |