@@ -, +, @@
- Create a kid from your library group
- With a superlibrarian staff user create a guarantor that is outside of
- Login with a limited staff user and confirm that on the patron detail
---
.../intranet-tmpl/prog/en/modules/members/memberentrygen.tt | 9 ++++++++-
koha-tmpl/intranet-tmpl/prog/en/modules/members/moremember.tt | 8 ++++++--
members/memberentry.pl | 5 ++++-
3 files changed, 18 insertions(+), 4 deletions(-)
--- a/koha-tmpl/intranet-tmpl/prog/en/modules/members/memberentrygen.tt
+++ a/koha-tmpl/intranet-tmpl/prog/en/modules/members/memberentrygen.tt
@@ -460,7 +460,14 @@ $(document).ready(function() {
[% ELSE %]
[% END %]
- Patron #: [% IF ( guarantorid ) %] [% guarantorid |html %][% END %]
+ Patron #:
+ [% IF guarantorid %]
+ [% IF logged_in_user.can_see_patron_infos( guarantor ) %]
+ [% guarantorid | html %]
+ [% ELSE %]
+ [% guarantorid | html %]
+ [% END %]
+ [% END %]
[% UNLESS nocontactname %]
--- a/koha-tmpl/intranet-tmpl/prog/en/modules/members/moremember.tt
+++ a/koha-tmpl/intranet-tmpl/prog/en/modules/members/moremember.tt
@@ -271,14 +271,18 @@ function validate1(date) {
Guarantees:
[% ELSIF guarantor %]
Guarantor:
- [% IF guarantor.borrowernumber %]
+ [% IF guarantor.borrowernumber AND logged_in_user.can_see_patron_infos( guarantor ) %]
[% guarantor.firstname | html %] [% guarantor.surname | html %]
[% ELSE %]
[% guarantor.firstname | html %] [% guarantor.surname | html %]
--- a/members/memberentry.pl
+++ a/members/memberentry.pl
@@ -755,10 +755,13 @@ $template->param(
check_member => $check_member,#to know if the borrower already exist(=>1) or not (=>0)
"op$op" => 1);
+$guarantorid = $borrower_data->{'guarantorid'} || $guarantorid;
+my $guarantor = $guarantorid ? Koha::Patrons->find( $guarantorid ) : undef;
$template->param(
nodouble => $nodouble,
borrowernumber => $borrowernumber, #register number
- guarantorid => ($borrower_data->{'guarantorid'} || $guarantorid),
+ guarantor => $guarantor,
+ guarantorid => $guarantorid,
relshiploop => \@relshipdata,
btitle=> $default_borrowertitle,
guarantorinfo => $guarantorinfo,
--