From 3e0fd7abf931f3ac289d3c308fe48990987d88b1 Mon Sep 17 00:00:00 2001 From: Matt Blenkinsop Date: Fri, 17 Oct 2025 16:48:18 +0100 Subject: [PATCH] Bug 40191: Add split button UI for alternative post-save navigation Introduces a split button pattern allowing users to override the default post-save behavior: - Primary button executes default action - Dropdown menu provides alternative navigation options - Adapts menu options based on resource configuration Components modified: - New DropdownButtons component for split button UI - Updated ButtonSubmit to support dropdown actions - Extended ResourceFormSave with action handlers - Applied to VendorResource and ToolbarButton The UI adapts based on resource configuration: - "show" default: offers "continue editing" and "return to list" - "edit" default: offers "show" and "return to list" - "list" default: offers "show" and "continue editing" Test plan: 1) Enable ERM and navigate to the agreements form 2) At the bottom, there should now be a button for "Submit" and a dropdown with two options - Submit and continue editing - Submit and return to list 3) Fill out the form three times, testing a different button each time 4) Click to edit one of your agreements 5) The buttons should operate the same but now they will start with 'Submit' instead of 'Save' 6) Navigate to licenses - for the purposes of testing the DO NOT PUSH commit has set this to have the behaviour where it returns to the list on save 7) On the form, the list option should be gone from the dropdowns and replaced by "Submit and show" 8) The buttons should all operate as described 9) Navigate to packages - for the purposes of testing they have been set to default to staying on the form when saving 10) The option to continue editing should be gone, replaced with the option to return to the list 11) The buttons should work as described Sponsored-by: Karlsruhe Institute of Technology (KIT) Signed-off-by: Michaela Signed-off-by: Jan Kissig Signed-off-by: Martin Renvoize --- .../prog/js/vue/components/ButtonSubmit.vue | 14 +++-- .../js/vue/components/DropdownButtons.vue | 15 ++++- .../js/vue/components/ResourceFormSave.vue | 55 ++++++++++++++++++- .../prog/js/vue/components/ToolbarButton.vue | 5 +- .../vue/components/Vendors/VendorResource.vue | 5 +- 5 files changed, 77 insertions(+), 17 deletions(-) diff --git a/koha-tmpl/intranet-tmpl/prog/js/vue/components/ButtonSubmit.vue b/koha-tmpl/intranet-tmpl/prog/js/vue/components/ButtonSubmit.vue index cf91b240149..95c3245b878 100644 --- a/koha-tmpl/intranet-tmpl/prog/js/vue/components/ButtonSubmit.vue +++ b/koha-tmpl/intranet-tmpl/prog/js/vue/components/ButtonSubmit.vue @@ -1,8 +1,5 @@