From 9b3a98e26f95bb66fdaa351390a9ecc2be96ef4a Mon Sep 17 00:00:00 2001
From: Javier Segarra <jsegarra@verdnatura.es>
Date: Wed, 12 Mar 2025 11:34:37 +0100
Subject: [PATCH] fix: refs #8725 submit or button

---
 src/components/FormModelPopup.vue | 6 ++++--
 1 file changed, 4 insertions(+), 2 deletions(-)

diff --git a/src/components/FormModelPopup.vue b/src/components/FormModelPopup.vue
index 4e5ceb9e7..34aec96d8 100644
--- a/src/components/FormModelPopup.vue
+++ b/src/components/FormModelPopup.vue
@@ -97,12 +97,13 @@ defineExpose({
                     :flat="showSaveAndContinueBtn"
                     :label="t('globals.save')"
                     :title="t('globals.save')"
-                    type="submit"
+                    :type="!showSaveAndContinueBtn ? 'submit' : 'button'"
                     color="primary"
                     class="q-ml-sm"
                     :disabled="isLoading"
                     :loading="isLoading"
                     data-cy="FormModelPopup_save"
+                    @click="showSaveAndContinueBtn ? onClick(false) : null"
                     z-max
                 />
                 <QBtn
@@ -110,11 +111,12 @@ defineExpose({
                     :label="t('globals.isSaveAndContinue')"
                     :title="t('globals.isSaveAndContinue')"
                     color="primary"
-                    type="submit"
+                    :type="showSaveAndContinueBtn ? 'submit' : 'button'"
                     class="q-ml-sm"
                     :disabled="isLoading"
                     :loading="isLoading"
                     data-cy="FormModelPopup_isSaveAndContinue"
+                    @click="showSaveAndContinueBtn ? onClick(true) : null"
                     z-max
                 />
             </div>