From 35dd04e9cb1d8b881b75504a55a253c5cd74f3cd Mon Sep 17 00:00:00 2001 From: Jonathan Druart Date: Thu, 9 Feb 2023 14:56:43 +0100 Subject: [PATCH] Bug 32925: Display loading info when a form is submitted With this new ButtonSubmit component all our submit buttons will look and behave identically. Here we need a "submitting" information to be displayed, and the form to be "deactivated". This patch is a POC and use the new component on the add agreement and delete agreement forms Test plan: It's easier to test if you add a sleep in the relevant place (Koha/REST/V1/ERM/Agreements.pm for list and add/update) Confirm that you see a "Submitting..." in the middle of the screen Signed-off-by: Matt Blenkinsop Signed-off-by: Nick Clemens Signed-off-by: Tomas Cohen Arazi --- .../prog/js/vue/components/ButtonSubmit.vue | 44 +++++++++++++++++++ .../vue/components/ERM/AgreementsFormAdd.vue | 4 +- .../ERM/AgreementsFormConfirmDelete.vue | 10 ++--- 3 files changed, 52 insertions(+), 6 deletions(-) create mode 100644 koha-tmpl/intranet-tmpl/prog/js/vue/components/ButtonSubmit.vue diff --git a/koha-tmpl/intranet-tmpl/prog/js/vue/components/ButtonSubmit.vue b/koha-tmpl/intranet-tmpl/prog/js/vue/components/ButtonSubmit.vue new file mode 100644 index 0000000000..87e055e47a --- /dev/null +++ b/koha-tmpl/intranet-tmpl/prog/js/vue/components/ButtonSubmit.vue @@ -0,0 +1,44 @@ + + + + + \ No newline at end of file diff --git a/koha-tmpl/intranet-tmpl/prog/js/vue/components/ERM/AgreementsFormAdd.vue b/koha-tmpl/intranet-tmpl/prog/js/vue/components/ERM/AgreementsFormAdd.vue index a8c4c09148..7720370b00 100644 --- a/koha-tmpl/intranet-tmpl/prog/js/vue/components/ERM/AgreementsFormAdd.vue +++ b/koha-tmpl/intranet-tmpl/prog/js/vue/components/ERM/AgreementsFormAdd.vue @@ -166,7 +166,7 @@ />
- +
- + import { APIClient } from "../../fetch/api-client.js" import { setMessage } from "../../messages" +import ButtonSubmit from "../ButtonSubmit.vue" export default { data() { @@ -72,6 +69,9 @@ export default { ) }, }, + components: { + ButtonSubmit, + }, name: "AgreementsFormConfirmDelete", } -- 2.39.5