Hide expiration date field for remote shares
Remote shares currently do not support expiration date. Signed-off-by: Vincent Petry <vincent@nextcloud.com> Signed-off-by: npmbuildbot-nextcloud[bot] <npmbuildbot-nextcloud[bot]@users.noreply.github.com>
This commit is contained in:
parent
791868fa25
commit
aad21777d4
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
|
@ -81,14 +81,16 @@
|
||||||
</ActionCheckbox>
|
</ActionCheckbox>
|
||||||
|
|
||||||
<!-- expiration date -->
|
<!-- expiration date -->
|
||||||
<ActionCheckbox :checked.sync="hasExpirationDate"
|
<ActionCheckbox
|
||||||
|
v-if="canHaveExpirationDate"
|
||||||
|
:checked.sync="hasExpirationDate"
|
||||||
:disabled="config.isDefaultInternalExpireDateEnforced || saving"
|
:disabled="config.isDefaultInternalExpireDateEnforced || saving"
|
||||||
@uncheck="onExpirationDisable">
|
@uncheck="onExpirationDisable">
|
||||||
{{ config.isDefaultInternalExpireDateEnforced
|
{{ config.isDefaultInternalExpireDateEnforced
|
||||||
? t('files_sharing', 'Expiration date enforced')
|
? t('files_sharing', 'Expiration date enforced')
|
||||||
: t('files_sharing', 'Set expiration date') }}
|
: t('files_sharing', 'Set expiration date') }}
|
||||||
</ActionCheckbox>
|
</ActionCheckbox>
|
||||||
<ActionInput v-if="hasExpirationDate"
|
<ActionInput v-if="canHaveExpirationDate && hasExpirationDate"
|
||||||
ref="expireDate"
|
ref="expireDate"
|
||||||
v-tooltip.auto="{
|
v-tooltip.auto="{
|
||||||
content: errors.expireDate,
|
content: errors.expireDate,
|
||||||
|
@ -219,8 +221,16 @@ export default {
|
||||||
},
|
},
|
||||||
|
|
||||||
canHaveNote() {
|
canHaveNote() {
|
||||||
return this.share.type !== this.SHARE_TYPES.SHARE_TYPE_REMOTE
|
return !this.isRemoteShare
|
||||||
&& this.share.type !== this.SHARE_TYPES.SHARE_TYPE_REMOTE_GROUP
|
},
|
||||||
|
|
||||||
|
canHaveExpirationDate() {
|
||||||
|
return !this.isRemoteShare
|
||||||
|
},
|
||||||
|
|
||||||
|
isRemoteShare() {
|
||||||
|
return this.share.type === this.SHARE_TYPES.SHARE_TYPE_REMOTE
|
||||||
|
|| this.share.type === this.SHARE_TYPES.SHARE_TYPE_REMOTE_GROUP
|
||||||
},
|
},
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|
Loading…
Reference in New Issue