Bug 31890: Add surname to PrefillGuaranteeField system pref

To test:
1. Apply patch and restart_all
2. Find the system preference PrefillGuaranteeField
3. Look for the Surname option and add it
4. Go to a patron account and add a gaurantee
5. See that the surname is properly populated for the gaurantor's surname field

Note:
This patch replaces borrower_data.surname with patron.surname. There seems to be a mismatch here so I filed Bug 32458.

Signed-off-by: David Nind <david@davidnind.com>

Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
This commit is contained in:
Lucas Gass 2022-12-19 20:40:57 +00:00 committed by Tomas Cohen Arazi
parent 736805ae5c
commit 13e1e55fb8
Signed by: tomascohen
GPG key ID: 0A272EA1B2F3C15F
2 changed files with 3 additions and 2 deletions

View file

@ -302,6 +302,7 @@ Patrons:
- "When adding a guarantee to a guarantor patron fill the following fields in the guarantee's member entry form from the guarantors record:" - "When adding a guarantee to a guarantor patron fill the following fields in the guarantee's member entry form from the guarantors record:"
- pref: PrefillGuaranteeField - pref: PrefillGuaranteeField
multiple: multiple:
surname: "Surname"
B_streettype: "Alternate address - Street type" B_streettype: "Alternate address - Street type"
B_address: "Alternate address - Address" B_address: "Alternate address - Address"
B_address2: "Alternate address - Address 2" B_address2: "Alternate address - Address 2"

View file

@ -318,9 +318,9 @@ legend:hover {
[% END %] [% END %]
[% IF ( uppercasesurnames ) %] [% IF ( uppercasesurnames ) %]
<input style="text-transform:uppercase;" type="text" id="surname" name="surname" size="20" value="[% borrower_data.surname | html %]" /> <input style="text-transform:uppercase;" type="text" id="surname" name="surname" size="20" value="[% patron.surname | html %]" />
[% ELSE %] [% ELSE %]
<input type="text" id="surname" name="surname" size="20" value="[% borrower_data.surname | html %]" /> <input type="text" id="surname" name="surname" size="20" value="[% patron.surname | html %]" />
[% END %] [% END %]
[% IF ( mandatorysurname ) %] [% IF ( mandatorysurname ) %]
<span class="required">Required</span> <span class="required">Required</span>