diff --git a/core/js/share.js b/core/js/share.js
index 9f71f1bb66..df5ebf008b 100644
--- a/core/js/share.js
+++ b/core/js/share.js
@@ -170,7 +170,7 @@ OC.Share={
html += '';
html += '
';
}
html += '';
@@ -564,7 +564,14 @@ $(document).ready(function() {
var file = $('tr').filterAttr('data-id', String(itemSource)).data('file');
var email = $('#email').val();
if (email != '') {
- $.post(OC.filePath('core', 'ajax', 'share.php'), { action: 'email', toaddress: email, link: link, itemType: itemType, itemSource: itemSource, file: file}, function(result) {
+ $('#email').attr('disabled', "disabled");
+ $('#email').val(t('core', 'Sending ...'));
+ $('#emailButton').attr('disabled', "disabled");
+
+ $.post(OC.filePath('core', 'ajax', 'share.php'), { action: 'email', toaddress: email, link: link, itemType: itemType, itemSource: itemSource, file: file},
+ function(result) {
+ $('#email').attr('disabled', "false");
+ $('#emailButton').attr('disabled', "false");
if (result && result.status == 'success') {
$('#email').css('font-weight', 'bold');
$('#email').animate({ fontWeight: 'normal' }, 2000, function() {