Skip to content

Commit

Permalink
fix(files_sharing): file request form validity check reset
Browse files Browse the repository at this point in the history
Signed-off-by: skjnldsv <skjnldsv@protonmail.com>

Signed-off-by: nextcloud-command <nextcloud-command@users.noreply.github.com>
  • Loading branch information
skjnldsv authored and nextcloud-command committed Jan 30, 2025
1 parent e84a12c commit 46d58ce
Show file tree
Hide file tree
Showing 9 changed files with 16 additions and 11 deletions.
13 changes: 9 additions & 4 deletions apps/files_sharing/src/components/NewFileRequestDialog.vue
Original file line number Diff line number Diff line change
Expand Up @@ -218,10 +218,9 @@ export default defineComponent({
methods: {
onPageNext() {
const form = this.$refs.form as HTMLFormElement
if (!form.checkValidity()) {
form.reportValidity()
return
}

// Reset custom validity
form.querySelectorAll('input').forEach(input => input.setCustomValidity(''))

// custom destination validation
// cannot share root
Expand All @@ -232,6 +231,12 @@ export default defineComponent({
return
}

// If the form is not valid, show the error message
if (!form.checkValidity()) {
form.reportValidity()
return
}

if (this.currentStep === STEP.FIRST) {
this.currentStep = STEP.SECOND
return
Expand Down
1 change: 0 additions & 1 deletion dist/6372-6372.js.map

This file was deleted.

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

This file was deleted.

4 changes: 2 additions & 2 deletions dist/6372-6372.js → dist/8894-8894.js

Large diffs are not rendered by default.

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

Large diffs are not rendered by default.

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

Large diffs are not rendered by default.

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

Large diffs are not rendered by default.

0 comments on commit 46d58ce

Please sign in to comment.