diff --git a/koha-tmpl/opac-tmpl/prog/en/modules/opac-memberentry.tt b/koha-tmpl/opac-tmpl/prog/en/modules/opac-memberentry.tt index 95149b37da..8eda35232f 100644 --- a/koha-tmpl/opac-tmpl/prog/en/modules/opac-memberentry.tt +++ b/koha-tmpl/opac-tmpl/prog/en/modules/opac-memberentry.tt @@ -34,12 +34,13 @@
-
- [% IF action == 'edit' %] -
- [% ELSE %] -
- [% END %] +
+ [% IF action == 'edit' %] +
+ [% ELSE %] +
+ [% END %] +
[% IF action == 'edit' %]

[% borrower.firstname %] [% borrower.surname %]'s account ⇢ Personal details

[% ELSE %] @@ -60,8 +61,6 @@
You typed in the wrong characters in the box before submitting. Please try again.
[% END %] - - [% UNLESS hidden.defined('branchcode') %] @@ -93,12 +92,16 @@ [% END %] - +
[% UNLESS hidden.defined('title') && hidden.defined('surname') && hidden.defined('firstname') && hidden.defined('dateofbirth') && hidden.defined('initials') && hidden.defined('othernames') && hidden.defined('sex') %] +
+ [% IF ( display_patron_image ) %] +
+ [% END %]
Identity @@ -228,8 +231,18 @@ [% END %]
+ [% IF ( display_patron_image ) %] +
+
+

+ +

+
+ [% END %] +
[% END %] +
[% UNLESS hidden.defined('streetnumber') && hidden.defined('address') && hidden.defined('address2') && hidden.defined('city') && hidden.defined('state') && hidden.defined('zipcode') && @@ -741,11 +754,9 @@ [% END %] - - - +
-
+
diff --git a/opac/opac-memberentry.pl b/opac/opac-memberentry.pl index 7f8230d414..112d405fb2 100755 --- a/opac/opac-memberentry.pl +++ b/opac/opac-memberentry.pl @@ -195,8 +195,19 @@ elsif ( $action eq 'update' ) { } } elsif ( $action eq 'edit' ) { #Display logged in borrower's data + my $borrower = GetMember( borrowernumber => $borrowernumber ); $template->param( - borrower => GetMember( borrowernumber => $borrowernumber ), ); + borrower => $borrower, ); + + if (C4::Context->preference('OPACpatronimages')) { + my ($image, $dberror) = GetPatronImage($borrower->{cardnumber}); + if ($image) { + $template->param( + display_patron_image => 1 + ); + } + } + } my $captcha = random_string("CCCCC");