Skip to content

Commit 7a898b8

Browse files
pkp/pkp-lib#10820 Add showErrorFooter prop in Form and FormPage components
1 parent bed14c2 commit 7a898b8

File tree

2 files changed

+15
-1
lines changed

2 files changed

+15
-1
lines changed

src/components/Form/Form.vue

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -61,6 +61,7 @@
6161
:visible-locales="visibleLocales"
6262
:available-locales="availableLocales"
6363
:is-saving="isSaving"
64+
:show-error-footer="showErrorFooter"
6465
@change="fieldChanged"
6566
@page-submitted="nextPage"
6667
@previous-page="setCurrentPage(false)"
@@ -135,6 +136,13 @@ export default {
135136
* Async function, receiving data from form and returning {validationError, data} from useFetch
136137
*/
137138
customSubmit: Function,
139+
/** If the error summary is shown in the form's footer. */
140+
showErrorFooter: {
141+
type: Boolean,
142+
default() {
143+
return true;
144+
},
145+
},
138146
},
139147
emits: [
140148
/** When the form props need to be updated. The payload is an object with any keys that need to be modified. */

src/components/Form/FormPage.vue

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@
2020
aria-live="polite"
2121
>
2222
<FormErrors
23-
v-if="Object.keys(errors).length"
23+
v-if="Object.keys(errors).length && showErrorFooter"
2424
:errors="errors"
2525
:fields="fields"
2626
@showField="showField"
@@ -108,6 +108,12 @@ export default {
108108
},
109109
},
110110
isSaving: Boolean,
111+
showErrorFooter: {
112+
type: Boolean,
113+
default() {
114+
return true;
115+
},
116+
},
111117
},
112118
data() {
113119
return {

0 commit comments

Comments
 (0)