Skip to content

Commit

Permalink
Merge pull request #50892 from nextcloud/backport/50820/stable31
Browse files Browse the repository at this point in the history
[stable31] fix(files_sharing): Fix public share expiration being set when toggle is not enabled
  • Loading branch information
AndyScherzinger authored Feb 19, 2025
2 parents c7e84f9 + 9f2a770 commit 29b7364
Show file tree
Hide file tree
Showing 9 changed files with 14 additions and 9 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
1 change: 0 additions & 1 deletion dist/1031-1031.js.map

This file was deleted.

1 change: 0 additions & 1 deletion dist/1031-1031.js.map.license

This file was deleted.

4 changes: 2 additions & 2 deletions dist/1031-1031.js → dist/9699-9699.js

Large diffs are not rendered by default.

File renamed without changes.
1 change: 1 addition & 0 deletions dist/9699-9699.js.map

Large diffs are not rendered by default.

1 change: 1 addition & 0 deletions dist/9699-9699.js.map.license
4 changes: 2 additions & 2 deletions dist/files_sharing-files_sharing_tab.js

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion dist/files_sharing-files_sharing_tab.js.map

Large diffs are not rendered by default.

0 comments on commit 29b7364

Please sign in to comment.