Skip to content

Commit

Permalink
Merge pull request #50891 from nextcloud/backport/50820/stable30
Browse files Browse the repository at this point in the history
[stable30] fix(files_sharing): Fix public share expiration being set when toggle is not enabled
  • Loading branch information
AndyScherzinger authored Feb 19, 2025
2 parents 4c6c93d + 1546873 commit f425dee
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 @@ -85,7 +85,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 @@ -867,9 +867,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/5661-5661.js.map

This file was deleted.

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

This file was deleted.

4 changes: 2 additions & 2 deletions dist/5661-5661.js → dist/7436-7436.js

Large diffs are not rendered by default.

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

Large diffs are not rendered by default.

1 change: 1 addition & 0 deletions dist/7436-7436.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 f425dee

Please sign in to comment.