From 9b385133c12a5244d9d5ef23a410c818b68ab529 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 --- .../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 7b523be0fe..3ae82a763c 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 @@ -195,8 +195,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.30.2