From 83933dafe50a45632adf20abc4cf8b0516ea994b Mon Sep 17 00:00:00 2001 From: Owen Leonard Date: Wed, 6 Dec 2023 17:25:39 +0000 Subject: [PATCH] Bug 35510: Non-patron guarantor missing from CollapseFieldsPatronAddForm options This patch adds a missing option to the CollapseFieldsPatronAddForm system preference so that the "Non-patron guarantor" section can be collapsed by default. To test, apply the patch and go to Administration -> System preferences. - Search for CollapseFieldsPatronAddForm. - In the dropdown of options you should see an entry for "Non-patron guarantor." - Click "Select all" and save your changes. - Go to Patrons -> New patron and choose a patron category which can have a guarantor (for example J - Juvenile) - The patron entry page should load with all sections collapsed, including the Non-patron guarantor section. - Uncheck all options in the CollapseFieldsPatronAddForm preference and return to the patron entry form. All sections should now appear. Signed-off-by: David Nind Signed-off-by: Victor Grousset/tuxayo Signed-off-by: Katrin Fischer (cherry picked from commit e97dac3cbe43c7a8c2d5b340b29354bf112f3a36) Signed-off-by: Fridolin Somers (cherry picked from commit 036228a4e0781a116988a6666755aba2fbf1c177) Signed-off-by: Lucas Gass --- .../prog/en/modules/admin/preferences/patrons.pref | 3 ++- .../intranet-tmpl/prog/en/modules/members/memberentrygen.tt | 4 ++++ 2 files changed, 6 insertions(+), 1 deletion(-) diff --git a/koha-tmpl/intranet-tmpl/prog/en/modules/admin/preferences/patrons.pref b/koha-tmpl/intranet-tmpl/prog/en/modules/admin/preferences/patrons.pref index 32cd34f706..0185f7be81 100644 --- a/koha-tmpl/intranet-tmpl/prog/en/modules/admin/preferences/patrons.pref +++ b/koha-tmpl/intranet-tmpl/prog/en/modules/admin/preferences/patrons.pref @@ -287,7 +287,8 @@ Patrons: - pref: CollapseFieldsPatronAddForm multiple: identity: "Patron identity" - guarantor: "Guarantor information" + guarantor: "Patron guarantor" + nonpatron_guarantor: "Non-patron guarantor" primary_address: "Main address" primary_contact: "Contact information" alt_address: "Alternate address" diff --git a/koha-tmpl/intranet-tmpl/prog/en/modules/members/memberentrygen.tt b/koha-tmpl/intranet-tmpl/prog/en/modules/members/memberentrygen.tt index 6aa7f546fa..3c76faf4ab 100644 --- a/koha-tmpl/intranet-tmpl/prog/en/modules/members/memberentrygen.tt +++ b/koha-tmpl/intranet-tmpl/prog/en/modules/members/memberentrygen.tt @@ -193,6 +193,7 @@ legend:hover { [% SWITCH field %] [% CASE 'identity' %] Patron identity | [% CASE 'guarantor' %] Guarantor information | + [% CASE 'nonpatron_guarantor' %] Non-patron guarantor | [% CASE 'primary_address' %] Main address | [% CASE 'primary_contact' %] Contact information | [% CASE 'alt_address' %] Alternate address | @@ -1666,6 +1667,9 @@ legend:hover { $("#memberentry_guarantor").find('legend').nextAll().toggle(); $("#guarantor_template").toggle(); [% END %] + [% IF fieldstohide.match('nonpatron_guarantor') %] + $("#non_patron_guarantor").find('legend').nextAll().toggle(); + [% END %] [% END %] [% IF fieldstohide.match('primary_address') %] $("#memberentry_mainaddress").find('legend').nextAll().toggle(); -- 2.39.2