In cases where the server dictates the link share expiration the date is not updated on consequitive changes and enable/disable actions

This commit is contained in:
Thomas Müller 2016-08-11 10:11:24 +02:00 committed by Lukas Reschke
parent d2d1508276
commit 5856616d95
No known key found for this signature in database
GPG Key ID: B9F6980CF6E759B1
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: ''
});
@ -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) {