Bugzilla – Attachment 174812 Details for
Bug 38429
Ambiguous patron category when adding a new guarantee
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
Bug 38429: Add dropdown to Add gaurantee button if multiple categories are allowed
Bug-38429-Add-dropdown-to-Add-gaurantee-button-if-.patch (text/plain), 3.52 KB, created by
ByWater Sandboxes
on 2024-11-19 21:22:24 UTC
(
hide
)
Description:
Bug 38429: Add dropdown to Add gaurantee button if multiple categories are allowed
Filename:
MIME Type:
Creator:
ByWater Sandboxes
Created:
2024-11-19 21:22:24 UTC
Size:
3.52 KB
patch
obsolete
>From d97298e8efc6fcb6bf15bd384c70da1bcb635637 Mon Sep 17 00:00:00 2001 >From: Lucas Gass <lucas@bywatersolutions.com> >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 <laura@bywatersolutions.com> >--- > .../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 %] > <a id="editpatron" class="btn btn-default" href="/cgi-bin/koha/members/memberentry.pl?op=edit_form&destination=circ&borrowernumber=[% patron.borrowernumber | html %]"><i class="fa-solid fa-pencil" aria-hidden="true"></i> Edit</a> > [% 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") %] >- <a id="addchild" class="btn btn-default" href="/cgi-bin/koha/members/memberentry.pl?op=add_form&guarantor_id=[% patron.borrowernumber | html %]"><i class="fa fa-plus"></i> Add guarantee</a> >- [% END %] >+ [% IF guarantee_categories.size > 1 %] >+ <div id="addchild" class="btn-group"> >+ <button class="btn btn-default dropdown-toggle" data-bs-toggle="dropdown" aria-expanded="false"><i class="fa fa-plus"></i> Add guarantee</button> >+ <ul class="dropdown-menu"> >+ [% FOREACH cat IN guarantee_categories %] >+ <li><a class="dropdown-item" href="/cgi-bin/koha/members/memberentry.pl?op=add_form&guarantor_id=[% patron.borrowernumber | html %]&categorycode=[% cat.categorycode | html %]">[% cat.description | html%]</a></li> >+ [% END %] >+ </ul> >+ </div> >+ [% ELSE %] >+ <a id="addchild" class="btn btn-default" href="/cgi-bin/koha/members/memberentry.pl?op=add_form&guarantor_id=[% patron.borrowernumber | html %]"><i class="fa fa-plus"></i> Add guarantee</a> >+ [% END %] > <a id="changepassword" class="btn btn-default" href="/cgi-bin/koha/members/member-password.pl?member=[% patron.borrowernumber | html %]"><i class="fa fa-lock"></i> Change password</a> > <a id="duplicate" class="btn btn-default" href="/cgi-bin/koha/members/memberentry.pl?op=duplicate&borrowernumber=[% patron.borrowernumber | html %]"><i class="fa fa-copy"></i> Duplicate</a> >+ [% END %] > [% END %] > > [% IF CAN_user_circulate_circulate_remaining_permissions %] >-- >2.39.5
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Diff
View Attachment As Raw
Actions:
View
|
Diff
|
Splinter Review
Attachments on
bug 38429
:
174440
| 174812