From 5fe16b6dc48298e3f03f0d4704d645f60edb44de Mon Sep 17 00:00:00 2001 From: Pedro Amorim Date: Wed, 9 Aug 2023 08:37:57 +0000 Subject: [PATCH] Bug 34497: [DO NOT PUSH] Test patch only Test plan (Apply both patches, including TEST PATCH): 1) Go to ERM /cgi-bin/koha/erm/agreements 2) Add a new agreement, with whatever values 3) Go back to agreements list, click 'delete' on that agreement 4) Verify the confirmation dialog now shows 2 inputs from the test patch 5) Change the values in the inputs and confirm the dialog 6) Notice that not only the agreement gets deleted, but console now shows the values submitted 7) Bonus: Test both Text and Date input types and required: true or false Signed-off-by: Jessica Zairo Signed-off-by: Martin Renvoize --- .../js/vue/components/ERM/AgreementsList.vue | 19 ++++++++++++++++++- 1 file changed, 18 insertions(+), 1 deletion(-) diff --git a/koha-tmpl/intranet-tmpl/prog/js/vue/components/ERM/AgreementsList.vue b/koha-tmpl/intranet-tmpl/prog/js/vue/components/ERM/AgreementsList.vue index 50305dc21ab..d6b2758e3be 100644 --- a/koha-tmpl/intranet-tmpl/prog/js/vue/components/ERM/AgreementsList.vue +++ b/koha-tmpl/intranet-tmpl/prog/js/vue/components/ERM/AgreementsList.vue @@ -196,8 +196,25 @@ export default { message: agreement.name, accept_label: this.$__("Yes, delete"), cancel_label: this.$__("No, do not delete"), + inputs: [ + { + id: "text_input", + type: "Text", + value: "this is dummy text", + required: true, + label: this.$__("Text input"), + }, + { + id: "date_input", + type: "Date", + value: "2023-08-09", + required: true, + label: this.$__("Date input"), + }, + ], }, - () => { + callback_result => { + console.log(callback_result) const client = APIClient.erm client.agreements.delete(agreement.agreement_id).then( success => { -- 2.41.0