From d97298e8efc6fcb6bf15bd384c70da1bcb635637 Mon Sep 17 00:00:00 2001 From: Lucas Gass Date: Tue, 12 Nov 2024 21:59:38 +0000 Subject: [PATCH] Bug 38429: Add dropdown to Add gaurantee button if multiple categories are allowed To test: 1. Have multiple patron categories that are set to 'Can be guarantee'. 2. Go to a patron record and click '+ Add guarantee' 3. Look at how the patron category is set. 4. It defaults to the first one alphabetically, by code. 5. APPLY PATCH 6. Try steps 1 -2 again, this time you should get a dropdown to pick which category of guarantee you want. 7. Add some patron categories that can be gaurantees with library limitations. Make sure they only show for the correct libraries. 8. Set only patron category to be a gaurantee. The dropdown should now be a button. Signed-off-by: Laura ONeil --- .../prog/en/includes/members-toolbar.inc | 17 ++++++++++++++--- 1 file changed, 14 insertions(+), 3 deletions(-) diff --git a/koha-tmpl/intranet-tmpl/prog/en/includes/members-toolbar.inc b/koha-tmpl/intranet-tmpl/prog/en/includes/members-toolbar.inc index 7ffde08165..1c8c1847d2 100644 --- a/koha-tmpl/intranet-tmpl/prog/en/includes/members-toolbar.inc +++ b/koha-tmpl/intranet-tmpl/prog/en/includes/members-toolbar.inc @@ -9,13 +9,24 @@ [% IF CAN_user_borrowers_edit_borrowers %] Edit [% END %] - + [% SET guarantee_categories = Categories.limited( can_be_guarantee => 1 ).unblessed %] [% IF CAN_user_borrowers_edit_borrowers %] [% IF patron.is_adult AND Koha.Preference("borrowerRelationship") %] - Add guarantee - [% END %] + [% IF guarantee_categories.size > 1 %] +
+ + +
+ [% ELSE %] + Add guarantee + [% END %] Change password Duplicate + [% END %] [% END %] [% IF CAN_user_circulate_circulate_remaining_permissions %] -- 2.39.5