diff options
author | Vincent Petry <pvince81@owncloud.com> | 2015-10-07 17:50:51 +0200 |
---|---|---|
committer | Roeland Jago Douma <rullzer@owncloud.com> | 2015-10-08 16:39:12 +0200 |
commit | 4bf19d4472c5dbaa22c0f365cf6d39bc74b3538a (patch) | |
tree | 15a441171c63a3568aa11eda53f6071d4d4532a9 /core/js/sharedialoglinkshareview.js | |
parent | 33cf1c3c92f6d9b4fcf2375a894e2922b948c6e3 (diff) | |
download | nextcloud-server-4bf19d4472c5dbaa22c0f365cf6d39bc74b3538a.tar.gz nextcloud-server-4bf19d4472c5dbaa22c0f365cf6d39bc74b3538a.zip |
Fix share email sending feedback
Redisplay email address after failure
Diffstat (limited to 'core/js/sharedialoglinkshareview.js')
-rw-r--r-- | core/js/sharedialoglinkshareview.js | 10 |
1 files changed, 8 insertions, 2 deletions
diff --git a/core/js/sharedialoglinkshareview.js b/core/js/sharedialoglinkshareview.js index 792062f0e16..1bbd10d5724 100644 --- a/core/js/sharedialoglinkshareview.js +++ b/core/js/sharedialoglinkshareview.js @@ -194,13 +194,19 @@ $emailField.prop('disabled', true); $emailButton.prop('disabled', true); $emailField.val(t('core', 'Sending ...')); - this.model.sendEmailPrivateLink(email).then(function() { + this.model.sendEmailPrivateLink(email).done(function() { $emailField.css('font-weight', 'bold').val(t('core','Email sent')); setTimeout(function() { - $emailField.css('font-weight', 'normal').val(''); + $emailField.val(''); + $emailField.css('font-weight', 'normal'); $emailField.prop('disabled', false); $emailButton.prop('disabled', false); }, 2000); + }).fail(function() { + $emailField.val(email); + $emailField.css('font-weight', 'normal'); + $emailField.prop('disabled', false); + $emailButton.prop('disabled', false); }); } return false; |