Skip to content

Commit

Permalink
Merge pull request #25860 from owncloud/stable9.1-aedae12db5ebfaf56be…
Browse files Browse the repository at this point in the history
…c91b736fb8a569cecf16f

[stable9.1] In cases where the server dictates the link share expirat…
  • Loading branch information
Vincent Petry authored Aug 19, 2016
2 parents 8b9536c + 554e96c commit 80a4940
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion core/js/sharedialogexpirationview.js
Original file line number Diff line number Diff line change
Expand Up @@ -93,6 +93,7 @@
this.$el.find('.expirationDateContainer').toggleClass('hidden', !state);
if (!state) {
// discard expiration date
this.model.get('linkShare').expiration = '';
this.model.saveLinkShare({
expireDate: ''
});
Expand All @@ -104,8 +105,10 @@
$target.tooltip('hide');
$target.removeClass('error');

expiration = moment($target.val(), 'DD-MM-YYYY').format('YYYY-MM-DD');
this.model.get('linkShare').expiration = expiration;
this.model.saveLinkShare({
expiration: moment($target.val(), 'DD-MM-YYYY').format('YYYY-MM-DD')
expiration: expiration
}, {
error: function(model, message) {
if (!message) {
Expand Down

0 comments on commit 80a4940

Please sign in to comment.