]> source.dussan.org Git - nextcloud-server.git/commitdiff
Allow to delete the email address in user management
authorMorris Jobke <hey@morrisjobke.de>
Fri, 5 Feb 2016 09:27:18 +0000 (10:27 +0100)
committerMorris Jobke <hey@morrisjobke.de>
Fri, 5 Feb 2016 09:27:18 +0000 (10:27 +0100)
settings/js/users/users.js

index 151ab6cdeccd1aae2b06e72748fe2401d8611200..306e3952e534d34e1881cdfbf8243f2d851fae75 100644 (file)
@@ -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 () {