From e97dac3cbe43c7a8c2d5b340b29354bf112f3a36 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 --- .../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 568743b510..09991d64b4 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 @@ -299,7 +299,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 f1d08729cf..39080c7389 100644 --- a/koha-tmpl/intranet-tmpl/prog/en/modules/members/memberentrygen.tt +++ b/koha-tmpl/intranet-tmpl/prog/en/modules/members/memberentrygen.tt @@ -204,6 +204,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 | @@ -1700,6 +1701,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.5