Merge pull request #966 from nextcloud/stable9-1-link-share

[stable10] In cases where the server dictates the link share expirat…
This commit is contained in:
Roeland Jago Douma 2016-08-19 12:39:17 +02:00 committed by GitHub
commit 1f473c11a1
1 changed files with 4 additions and 1 deletions

View File

@ -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: ''
});
@ -106,8 +107,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) {