summaryrefslogtreecommitdiffstats
path: root/core/js
diff options
context:
space:
mode:
authorThomas Müller <thomas.mueller@tmit.eu>2016-08-11 10:11:24 +0200
committerLukas Reschke <lukas@statuscode.ch>2016-08-19 10:24:52 +0200
commit497ae34e885067226401f5c5f3fa0b3e6736d1eb (patch)
tree94817b9630e748a4496650a617b0eda51d9b82ad /core/js
parent3ccd69707e75c3d99156c41d8107621e07a01ded (diff)
downloadnextcloud-server-497ae34e885067226401f5c5f3fa0b3e6736d1eb.tar.gz
nextcloud-server-497ae34e885067226401f5c5f3fa0b3e6736d1eb.zip
[master] In cases where the server dictates the link share expiration the date is not updated on consequitive changes and enable/disable actions
Diffstat (limited to 'core/js')
-rw-r--r--core/js/sharedialogexpirationview.js5
1 files changed, 4 insertions, 1 deletions
diff --git a/core/js/sharedialogexpirationview.js b/core/js/sharedialogexpirationview.js
index 1770bdd5a7b..d1b326a56bc 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) {