From 3c7032bf81c5d73bb2bbf5462595664d2e9e4cfd 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 2 - Note it is not displayed on patorn details 3 - Apply patch 4 - Note the info is displayed 5 - Test with combos of firstname/surname individually, you should see either but only a comma if both are present --- koha-tmpl/intranet-tmpl/prog/en/modules/members/moremember.tt | 5 ++++- members/moremember.pl | 8 ++++++++ 2 files changed, 12 insertions(+), 1 deletion(-) 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 adaedb5..1ca5467 100644 --- a/koha-tmpl/intranet-tmpl/prog/en/modules/members/moremember.tt +++ b/koha-tmpl/intranet-tmpl/prog/en/modules/members/moremember.tt @@ -236,8 +236,11 @@ function validate1(date) {
  • Guarantees:
  • [% END %] [% ELSE %] + [% IF ( !guarantorborrowernumber && (guarantorsurname || guarantorfirstname) ) %] +
  • Guarantor:[% guarantorsurname %][%IF ( guarantorfirstname && guarantorsurname ) %], [% END %][% guarantorfirstname %]
  • + [% END %] [% IF ( guarantorborrowernumber ) %] -
  • Guarantor:[% guarantorsurname %][%IF ( guarantorfirstname ) %], [% guarantorfirstname %] [% END %]
  • +
  • Guarantor:[% guarantorsurname %][%IF ( guarantorfirstname ) %], [% guarantorfirstname %] [% END %]
  • [% END %] [% END %] diff --git a/members/moremember.pl b/members/moremember.pl index e233b46..cd9f2cc 100755 --- a/members/moremember.pl +++ b/members/moremember.pl @@ -192,6 +192,14 @@ else { $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.1.4