From 3c76bf5a76b55b362211839fa8c19f59fcc23049 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 MIME-Version: 1.0 Content-Type: text/plain; charset=utf8 Content-Transfer-Encoding: 8bit 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 (cherry picked from commit bebb61739f4460295151a37d44cc1a2d6f956d26) Signed-off-by: Frédéric Demians --- .../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 f8354ee3a3..070a9a9c60 100644 --- a/koha-tmpl/intranet-tmpl/prog/en/modules/members/moremember.tt +++ b/koha-tmpl/intranet-tmpl/prog/en/modules/members/moremember.tt @@ -243,6 +243,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 2f2a18e608..f3f2ec25af 100755 --- a/members/moremember.pl +++ b/members/moremember.pl @@ -197,6 +197,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