Skip to content

Commit 4382364

Browse files
authored
Merge pull request #1155 from nextcloud/fix-server-side-share-expiration-setting-stable9
In cases where the server dictates the link share expiration the date…
2 parents 9b29ed0 + 5856616 commit 4382364

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

core/js/sharedialogexpirationview.js

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -93,6 +93,7 @@
9393
this.$el.find('.expirationDateContainer').toggleClass('hidden', !state);
9494
if (!state) {
9595
// discard expiration date
96+
this.model.get('linkShare').expiration = '';
9697
this.model.saveLinkShare({
9798
expireDate: ''
9899
});
@@ -104,8 +105,10 @@
104105
$target.tooltip('hide');
105106
$target.removeClass('error');
106107

108+
expiration = moment($target.val(), 'DD-MM-YYYY').format('YYYY-MM-DD');
109+
this.model.get('linkShare').expiration = expiration;
107110
this.model.saveLinkShare({
108-
expiration: moment($target.val(), 'DD-MM-YYYY').format('YYYY-MM-DD')
111+
expiration: expiration
109112
}, {
110113
error: function(model, message) {
111114
if (!message) {

0 commit comments

Comments
 (0)