From 497ae34e885067226401f5c5f3fa0b3e6736d1eb Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Thomas=20M=C3=BCller?= Date: Thu, 11 Aug 2016 10:11:24 +0200 Subject: [PATCH] [master] In cases where the server dictates the link share expiration the date is not updated on consequitive changes and enable/disable actions --- core/js/sharedialogexpirationview.js | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/core/js/sharedialogexpirationview.js b/core/js/sharedialogexpirationview.js index 1770bdd5a7..d1b326a56b 100644 --- a/core/js/sharedialogexpirationview.js +++ b/core/js/sharedialogexpirationview.js @@ -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) {