diff options
Diffstat (limited to 'apps/files_sharing/src/components/SharingEntry.vue')
-rw-r--r-- | apps/files_sharing/src/components/SharingEntry.vue | 23 |
1 files changed, 11 insertions, 12 deletions
diff --git a/apps/files_sharing/src/components/SharingEntry.vue b/apps/files_sharing/src/components/SharingEntry.vue index d31c7ef6e3f..e07654a19c1 100644 --- a/apps/files_sharing/src/components/SharingEntry.vue +++ b/apps/files_sharing/src/components/SharingEntry.vue @@ -84,16 +84,14 @@ </ActionCheckbox> <!-- expiration date --> - <ActionCheckbox - v-if="canHaveExpirationDate" - :checked.sync="hasExpirationDate" + <ActionCheckbox :checked.sync="hasExpirationDate" :disabled="config.isDefaultInternalExpireDateEnforced || saving" @uncheck="onExpirationDisable"> {{ config.isDefaultInternalExpireDateEnforced ? t('files_sharing', 'Expiration date enforced') : t('files_sharing', 'Set expiration date') }} </ActionCheckbox> - <ActionInput v-if="canHaveExpirationDate && hasExpirationDate" + <ActionInput v-if="hasExpirationDate" ref="expireDate" v-tooltip.auto="{ content: errors.expireDate, @@ -224,14 +222,10 @@ export default { }, canHaveNote() { - return !this.isRemoteShare - }, - - canHaveExpirationDate() { - return !this.isRemoteShare + return !this.isRemote }, - isRemoteShare() { + isRemote() { return this.share.type === this.SHARE_TYPES.SHARE_TYPE_REMOTE || this.share.type === this.SHARE_TYPES.SHARE_TYPE_REMOTE_GROUP }, @@ -358,8 +352,13 @@ export default { }, dateMaxEnforced() { - return this.config.isDefaultInternalExpireDateEnforced - && moment().add(1 + this.config.defaultInternalExpireDate, 'days') + if (!this.isRemote) { + return this.config.isDefaultInternalExpireDateEnforced + && moment().add(1 + this.config.defaultInternalExpireDate, 'days') + } else { + return this.config.isDefaultRemoteExpireDateEnforced + && moment().add(1 + this.config.defaultRemoteExpireDate, 'days') + } }, /** |