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 <david@davidnind.com>
Signed-off-by: Victor Grousset/tuxayo <victor@tuxayo.net>
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
(cherry picked from commit e97dac3cbe)
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
This commit is contained in:
Owen Leonard 2023-12-06 17:25:39 +00:00 committed by Fridolin Somers
parent 41580a0a58
commit 036228a4e0
2 changed files with 6 additions and 1 deletions

View file

@ -299,7 +299,8 @@ Patrons:
- pref: CollapseFieldsPatronAddForm - pref: CollapseFieldsPatronAddForm
multiple: multiple:
identity: "Patron identity" identity: "Patron identity"
guarantor: "Guarantor information" guarantor: "Patron guarantor"
nonpatron_guarantor: "Non-patron guarantor"
primary_address: "Main address" primary_address: "Main address"
primary_contact: "Contact information" primary_contact: "Contact information"
alt_address: "Alternate address" alt_address: "Alternate address"

View file

@ -204,6 +204,7 @@ legend:hover {
[% SWITCH field %] [% SWITCH field %]
[% CASE 'identity' %] <span>Patron identity</span> | [% CASE 'identity' %] <span>Patron identity</span> |
[% CASE 'guarantor' %] <span>Guarantor information</span> | [% CASE 'guarantor' %] <span>Guarantor information</span> |
[% CASE 'nonpatron_guarantor' %] <span>Non-patron guarantor</span> |
[% CASE 'primary_address' %] <span>Main address</span> | [% CASE 'primary_address' %] <span>Main address</span> |
[% CASE 'primary_contact' %] <span>Contact information</span> | [% CASE 'primary_contact' %] <span>Contact information</span> |
[% CASE 'alt_address' %] <span>Alternate address</span> | [% CASE 'alt_address' %] <span>Alternate address</span> |
@ -1700,6 +1701,9 @@ legend:hover {
$("#memberentry_guarantor").find('legend').nextAll().toggle(); $("#memberentry_guarantor").find('legend').nextAll().toggle();
$("#guarantor_template").toggle(); $("#guarantor_template").toggle();
[% END %] [% END %]
[% IF fieldstohide.match('nonpatron_guarantor') %]
$("#non_patron_guarantor").find('legend').nextAll().toggle();
[% END %]
[% END %] [% END %]
[% IF fieldstohide.match('primary_address') %] [% IF fieldstohide.match('primary_address') %]
$("#memberentry_mainaddress").find('legend').nextAll().toggle(); $("#memberentry_mainaddress").find('legend').nextAll().toggle();