mirror of
https://github.com/nextcloud/server.git
synced 2026-04-21 06:08:46 -04:00
fix(files_sharing): Fix public share expiration being set when toggle is not enabled
Signed-off-by: Christopher Ng <chrng8@gmail.com>
This commit is contained in:
parent
4a4cfa00f1
commit
9ded1e3c63
1 changed files with 7 additions and 2 deletions
|
|
@ -86,7 +86,7 @@
|
|||
:checked.sync="defaultExpirationDateEnabled"
|
||||
:disabled="pendingEnforcedExpirationDate || saving"
|
||||
class="share-link-expiration-date-checkbox"
|
||||
@change="onExpirationDateToggleChange">
|
||||
@update:model-value="onExpirationDateToggleUpdate">
|
||||
{{ config.isDefaultExpireDateEnforced ? t('files_sharing', 'Enable link expiration (enforced)') : t('files_sharing', 'Enable link expiration') }}
|
||||
</NcActionCheckbox>
|
||||
|
||||
|
|
@ -875,9 +875,14 @@ export default {
|
|||
this.onPasswordSubmit()
|
||||
this.onNoteSubmit()
|
||||
},
|
||||
onExpirationDateToggleChange(enabled) {
|
||||
|
||||
/**
|
||||
* @param enabled True if expiration is enabled
|
||||
*/
|
||||
onExpirationDateToggleUpdate(enabled) {
|
||||
this.share.expireDate = enabled ? this.formatDateToString(this.config.defaultExpirationDate) : ''
|
||||
},
|
||||
|
||||
expirationDateChanged(event) {
|
||||
const date = event.target.value
|
||||
this.onExpirationChange(date)
|
||||
|
|
|
|||
Loading…
Reference in a new issue