diff options
Diffstat (limited to 'core/js/share.js')
-rw-r--r-- | core/js/share.js | 9 |
1 files changed, 8 insertions, 1 deletions
diff --git a/core/js/share.js b/core/js/share.js index e45dc7dd424..36ee39d8eab 100644 --- a/core/js/share.js +++ b/core/js/share.js @@ -482,7 +482,14 @@ $(document).ready(function() { if (this.checked) { OC.Share.showExpirationDate(''); } else { - $('#expirationDate').hide(); + var itemType = $('#dropdown').data('item-type'); + var itemSource = $('#dropdown').data('item-source'); + $.post(OC.filePath('core', 'ajax', 'share.php'), { action: 'setExpirationDate', itemType: itemType, itemSource: itemSource, date: '' }, function(result) { + if (!result || result.status !== 'success') { + OC.dialogs.alert(t('core', 'Error'), t('core', 'Error unsetting expiration date')); + } + $('#expirationDate').hide(); + }); } }); |