Skip to content

Commit

Permalink
fix(files_sharing): Fix public share expiration being set when toggle…
Browse files Browse the repository at this point in the history
… is not enabled

Signed-off-by: Christopher Ng <[email protected]>
  • Loading branch information
Pytal committed Feb 14, 2025
1 parent 228ac86 commit 5bd8243
Showing 1 changed file with 7 additions and 2 deletions.
9 changes: 7 additions & 2 deletions apps/files_sharing/src/components/SharingEntryLink.vue
Original file line number Diff line number Diff line change
Expand Up @@ -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>

Expand Down Expand Up @@ -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)
Expand Down

0 comments on commit 5bd8243

Please sign in to comment.