Add showResetButton prop to FormDisplay.vue

- Introduced `showResetButton` prop to toggle visibility of reset button in `FormDisplay.vue`.
- Updated `PosDepartmentStepMobilePopupCompleteBooking.vue` to set `showResetButton` to `false` as part of form customization.
This commit is contained in:
Jeppe Bundgaard
2025-09-16 13:01:39 +02:00
parent ff4e5f3a82
commit db802f0958
2 changed files with 10 additions and 2 deletions
+9 -2
View File
@@ -63,7 +63,14 @@ const props = defineProps({
showSuccessSubmitAlert: {
type: Boolean,
default: true
}
},
/**
* Show the reset button
*/
showResetButton: {
type: Boolean,
default: true
},
})
const default_validator_options = {
@@ -727,7 +734,7 @@ const debugGetForm = () => {
<div class="field">
<p class="control buttons">
<button class="button is-link" type="submit">{{ meta.submit_button_text }}</button>
<button class="button is-light" type="reset">{{ SessionUser.objects.global.language.reset }}</button>
<button v-show="props.showResetButton" class="button is-light" type="reset">{{ SessionUser.objects.global.language.reset }}</button>
<button class="button is-warning is-inverted" @click="debugGetForm" v-if="IS_DEV">Debug</button>
</p>
</div>
@@ -21,6 +21,7 @@ const onSuccessfulCertificateSubmission = (response: any) => {
v-bind:validator_options="{validateBookingId: {default: metadata.getBookingId(), locked: true, visible: false}}"
:onSuccessfulSubmission="onSuccessfulCertificateSubmission"
:showSuccessSubmitAlert="false"
:showResetButton="false"
/>
</div>
</template>