@@ -, +, @@ --- .../intranet-tmpl/prog/en/modules/admin/preferences/opac.pref | 8 ++++---- koha-tmpl/opac-tmpl/bootstrap/en/includes/masthead.inc | 3 +-- koha-tmpl/opac-tmpl/bootstrap/en/modules/opac-auth.tt | 3 +-- koha-tmpl/opac-tmpl/bootstrap/en/modules/opac-main.tt | 3 +-- .../opac-tmpl/bootstrap/en/modules/opac-password-recovery.tt | 11 +++++++---- opac/opac-password-recovery.pl | 10 ++++++---- 6 files changed, 20 insertions(+), 18 deletions(-) --- a/koha-tmpl/intranet-tmpl/prog/en/modules/admin/preferences/opac.pref +++ a/koha-tmpl/intranet-tmpl/prog/en/modules/admin/preferences/opac.pref @@ -346,13 +346,13 @@ OPAC: no: "Don't allow" - patrons to change their own password on the OPAC. Note that this must be off to use LDAP authentication. - - - "The user " + - "Library users are " - pref: OpacResetPassword default: 1 choices: - yes: "can reset" - no: "can not reset" - - " their password on OPAC." + yes: "allowed" + no: "not allowed" + - " to recover their password via e-mail in the OPAC" - - pref: OPACPatronDetails choices: --- a/koha-tmpl/opac-tmpl/bootstrap/en/includes/masthead.inc +++ a/koha-tmpl/opac-tmpl/bootstrap/en/includes/masthead.inc @@ -318,8 +318,7 @@ [% IF Koha.Preference('OpacPasswordChange') && Koha.Preference('OpacResetPassword') %]
-
Forgot your password?
-

If you do not remember your password, click here to create a new one.

+ Forgot your password?
[% END %] [% IF Koha.Preference( 'NoLoginInstructions' ) %] --- a/koha-tmpl/opac-tmpl/bootstrap/en/modules/opac-auth.tt +++ a/koha-tmpl/opac-tmpl/bootstrap/en/modules/opac-auth.tt @@ -152,8 +152,7 @@ [% IF Koha.Preference('OpacPasswordChange') && Koha.Preference('OpacResetPassword') %]
-
Forgot your password?
-

If you do not remember your password, click here to create a new one.

+ Forgot your password?
[% END %]
--- a/koha-tmpl/opac-tmpl/bootstrap/en/modules/opac-main.tt +++ a/koha-tmpl/opac-tmpl/bootstrap/en/modules/opac-main.tt @@ -87,8 +87,7 @@ [% IF Koha.Preference('OpacPasswordChange') && Koha.Preference('OpacResetPassword') %]
-
Forgot your password?
-

If you do not remember your password, click here to create a new one.

+ Forgot your password?
[% END %] [% IF Koha.Preference( 'NoLoginInstructions' ) %] --- a/koha-tmpl/opac-tmpl/bootstrap/en/modules/opac-password-recovery.tt +++ a/koha-tmpl/opac-tmpl/bootstrap/en/modules/opac-password-recovery.tt @@ -1,6 +1,6 @@ [% USE Koha %] [% INCLUDE 'doc-head-open.inc' %] -[% IF (LibraryNameTitle) %][% LibraryNameTitle %][% ELSE %]Koha online[% END %] catalog › +[% IF ( LibraryNameTitle ) %][% LibraryNameTitle %][% ELSE %]Koha online[% END %] catalog [% INCLUDE 'doc-head-close.inc' %] [% BLOCK cssinclude %][% END %] [% BLOCK jsinclude %] @@ -36,18 +36,21 @@
+ [% IF ( OpacPublic ) %] + + [% END %]

Password recovery

[% IF (hasError) %]
-

An error occured

+

An error occurred

[% IF (sendmailError) %] - An error has occured while sending you the password recovery link. + An error has occurred while sending you the password recovery link.
Please try again later. [% ELSIF (errNoBorrowerFound) %] No account was found with the provided information. @@ -131,4 +134,4 @@

-[% INCLUDE 'opac-bottom.inc' %] +[% INCLUDE 'opac-bottom.inc' %] --- a/opac/opac-password-recovery.pl +++ a/opac/opac-password-recovery.pl @@ -54,7 +54,6 @@ if ( $query->param('sendEmail') || $query->param('resendEmail') ) { $email ||= ''; # avoid undef my $borrower; my $search_results; - # Find the borrower by his userid or email if( $username ){ $search_results = Search({ userid => $username }); @@ -62,8 +61,11 @@ if ( $query->param('sendEmail') || $query->param('resendEmail') ) { elsif ( $email ){ $search_results = Search({ '' => $email }, undef, undef, undef, ['emailpro', 'email', 'B_email']); } - - if(scalar @$search_results > 1){ # Many matching borrowers + if ( not $search_results ){ + $hasError = 1; + $errNoBorrowerFound = 1; + } + elsif(scalar @$search_results > 1){ # Many matching borrowers $hasError = 1; $errTooManyEmailFound = 1; } @@ -112,7 +114,7 @@ if ( $query->param('sendEmail') || $query->param('resendEmail') ) { email => $email ); } - else {# if it doesnt work.... + else {# if it doesn't work.... $template->param( password_recovery => 1, sendmailError => 1 --