[stable9.1] 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:
parent
7f486705e0
commit
24f35f9076
|
@ -93,6 +93,7 @@
|
||||||
this.$el.find('.expirationDateContainer').toggleClass('hidden', !state);
|
this.$el.find('.expirationDateContainer').toggleClass('hidden', !state);
|
||||||
if (!state) {
|
if (!state) {
|
||||||
// discard expiration date
|
// discard expiration date
|
||||||
|
this.model.get('linkShare').expiration = '';
|
||||||
this.model.saveLinkShare({
|
this.model.saveLinkShare({
|
||||||
expireDate: ''
|
expireDate: ''
|
||||||
});
|
});
|
||||||
|
@ -106,8 +107,10 @@
|
||||||
$target.tooltip('hide');
|
$target.tooltip('hide');
|
||||||
$target.removeClass('error');
|
$target.removeClass('error');
|
||||||
|
|
||||||
|
expiration = moment($target.val(), 'DD-MM-YYYY').format('YYYY-MM-DD');
|
||||||
|
this.model.get('linkShare').expiration = expiration;
|
||||||
this.model.saveLinkShare({
|
this.model.saveLinkShare({
|
||||||
expiration: moment($target.val(), 'DD-MM-YYYY').format('YYYY-MM-DD')
|
expiration: expiration
|
||||||
}, {
|
}, {
|
||||||
error: function(model, message) {
|
error: function(model, message) {
|
||||||
if (!message) {
|
if (!message) {
|
||||||
|
|
Loading…
Reference in New Issue