From bebb61739f4460295151a37d44cc1a2d6f956d26 Mon Sep 17 00:00:00 2001 From: Nick Clemens Date: Fri, 26 Feb 2016 21:08:55 +0000 Subject: [PATCH] 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: Julian Maurice --- .../intranet-tmpl/prog/en/modules/members/moremember.tt | 2 ++ members/moremember.pl | 5 +++++ 2 files changed, 7 insertions(+) diff --git a/koha-tmpl/intranet-tmpl/prog/en/modules/members/moremember.tt b/koha-tmpl/intranet-tmpl/prog/en/modules/members/moremember.tt index fec89abf8e..c0517b1cbc 100644 --- a/koha-tmpl/intranet-tmpl/prog/en/modules/members/moremember.tt +++ b/koha-tmpl/intranet-tmpl/prog/en/modules/members/moremember.tt @@ -241,6 +241,8 @@ function validate1(date) { [% ELSE %] [% IF ( guarantorborrowernumber ) %]
  • Guarantor:[% guarantorsurname %][%IF ( guarantorfirstname ) %], [% guarantorfirstname %] [% END %]
  • + [% ELSIF (guarantorsurname || guarantorfirstname) %] +
  • Guarantor:[% guarantorsurname %][%IF ( guarantorfirstname ) %], [% guarantorfirstname %][% END %]
  • [% END %] [% END %] diff --git a/members/moremember.pl b/members/moremember.pl index 2fc9de7885..7166499fba 100755 --- a/members/moremember.pl +++ b/members/moremember.pl @@ -190,6 +190,11 @@ else { foreach (qw(borrowernumber cardnumber firstname surname)) { $template->param("guarantor$_" => $guarantor->{$_}); } + } elsif ($data->{contactname} || $data->{contactfirstname}) { + $template->param( + guarantorfirstname => $data->{contactfirstname}, + guarantorsurname => $data->{contactname}, + ); } if ($category_type eq 'C'){ $template->param('C' => 1); -- 2.39.5