diff options
-rw-r--r-- | apps/files_sharing/src/components/SharingEntryLink.vue | 8 |
1 files changed, 6 insertions, 2 deletions
diff --git a/apps/files_sharing/src/components/SharingEntryLink.vue b/apps/files_sharing/src/components/SharingEntryLink.vue index cda056a4dca..f6e162b7d87 100644 --- a/apps/files_sharing/src/components/SharingEntryLink.vue +++ b/apps/files_sharing/src/components/SharingEntryLink.vue @@ -96,9 +96,9 @@ </NcActionCheckbox> <!-- expiration date --> - <NcActionInput v-if="pendingExpirationDate" + <NcActionInput v-if="(hasDefaultExpirationDate || pendingEnforcedExpirationDate) && defaultExpirationDateEnabled" class="share-link-expire-date" - :label="t('files_sharing', 'Expiration date (enforced)')" + :label="pendingEnforcedExpirationDate ? t('files_sharing', 'Enter expiration date (enforced)') : t('files_sharing', 'Enter expiration date')" :disabled="saving" :is-native-picker="true" :hide-label="true" @@ -538,6 +538,10 @@ export default { this.share.expireDate = this.defaultExpirationDateEnabled ? this.formatDateToString(this.config.defaultExpirationDate) : '' } }, + mounted() { + this.defaultExpirationDateEnabled = this.config.defaultExpirationDate instanceof Date + this.share.expireDate = this.defaultExpirationDateEnabled ? this.formatDateToString(this.config.defaultExpirationDate) : '' + }, methods: { /** |