Bug 15928 - Show unlinked guarantor
To test: 1 - Add guarantor data to patron account by typing it in but do not 'Set to patron' 2 - Note it is not displayed on patron details 3 - Apply patch 4 - Note the info is displayed 5 - Test that linked guarantors show as expected Signed-off-by: Marc Véron <veron@veron.ch> Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org> Amended-patch: Correct some indents/spaces Signed-off-by: Brendan Gallagher brendan@bywatersolutions.com
This commit is contained in:
parent
5b909a8269
commit
e4d0363bc7
2 changed files with 12 additions and 1 deletions
|
@ -246,7 +246,11 @@ function validate1(date) {
|
|||
[% ELSIF guarantor %]
|
||||
<li>
|
||||
<span class="label">Guarantor:</span>
|
||||
<a href="/cgi-bin/koha/members/moremember.pl?borrowernumber=[% guarantor.borrowernumber %]">[% guarantor.firstname %] [% guarantor.surname %]</a>
|
||||
[% IF guarantor.borrowernumber %]
|
||||
<a href="/cgi-bin/koha/members/moremember.pl?borrowernumber=[% guarantor.borrowernumber %]">[% guarantor.firstname %] [% guarantor.surname %]</a>
|
||||
[% ELSE %]
|
||||
[% guarantor.firstname %] [% guarantor.surname %]
|
||||
[% END %]
|
||||
</li>
|
||||
[% END %]
|
||||
</ol>
|
||||
|
|
|
@ -169,6 +169,13 @@ if ( my $guarantor = $patron->guarantor ) {
|
|||
$template->param( guarantor => $guarantor );
|
||||
push @relatives, $guarantor->borrowernumber;
|
||||
push @relatives, $_->borrowernumber for $patron->siblings;
|
||||
} elsif ( $patron->contactname || $patron->contactfirstname ) {
|
||||
$template->param(
|
||||
guarantor => {
|
||||
firstname => $patron->contactfirstname,
|
||||
surname => $patron->contactname,
|
||||
}
|
||||
);
|
||||
} else {
|
||||
my @guarantees = $patron->guarantees;
|
||||
$template->param( guarantees => \@guarantees );
|
||||
|
|
Loading…
Reference in a new issue