From fefd07d1692dc1dc628a0f230b5f8b1867ae31b3 Mon Sep 17 00:00:00 2001 From: Liz Rea Date: Thu, 14 May 2015 10:31:01 +1200 Subject: [PATCH] Bug 8753 - Followup - change value text on syspref MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Followup changes text from "The user can reset | can not reset their password on OPAC" to "Library users are allowed | not allowed to recover their password via e-mail in the OPAC" This change more clearly differentiates the purpose of this new preference from OpacPasswordChange. Bug 8753 - followup - update text for link to match common UI paradigms, fixes OpacPublic disabled view Also corrects OpacNav being included on the reset page on private catalogues. Updated the link for forgotten passwords to more closely match common UI paradigms, i.e. Facebook and Twitter To test: apply all patches, link should now be the less verbose "Forgot your password?" disable OpacPublic, anything in opacnav should not appear (you may need to add something to opacnav to test properly) Bug 8753 - [followup] fix the title on opac-password-recovery.tt The title stanza was missing a around it, causing the extra text to appear. To test, apply all patches and make sure it looks ok and there is no extra text at the top or bottom of the page. Bug 8753 - [followup} Correcting spelling mistakes Make sure it all still works Bug 8753 - [followup] fix error when no information is provided To test: All normal checks plus make sure that a nice error is displayed when no data is provided. fixing the deprecated thing Signed-off-by: Marc VĂ©ron --- .../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(-) diff --git a/koha-tmpl/intranet-tmpl/prog/en/modules/admin/preferences/opac.pref b/koha-tmpl/intranet-tmpl/prog/en/modules/admin/preferences/opac.pref index 5dcf5f4..7ade8ff 100644 --- a/koha-tmpl/intranet-tmpl/prog/en/modules/admin/preferences/opac.pref +++ b/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: diff --git a/koha-tmpl/opac-tmpl/bootstrap/en/includes/masthead.inc b/koha-tmpl/opac-tmpl/bootstrap/en/includes/masthead.inc index 365c9be..625ce6a 100644 --- a/koha-tmpl/opac-tmpl/bootstrap/en/includes/masthead.inc +++ b/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' ) %] diff --git a/koha-tmpl/opac-tmpl/bootstrap/en/modules/opac-auth.tt b/koha-tmpl/opac-tmpl/bootstrap/en/modules/opac-auth.tt index 1174f59..60035e7 100644 --- a/koha-tmpl/opac-tmpl/bootstrap/en/modules/opac-auth.tt +++ b/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 %]
diff --git a/koha-tmpl/opac-tmpl/bootstrap/en/modules/opac-main.tt b/koha-tmpl/opac-tmpl/bootstrap/en/modules/opac-main.tt index 87051fb..798c90e 100644 --- a/koha-tmpl/opac-tmpl/bootstrap/en/modules/opac-main.tt +++ b/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' ) %] diff --git a/koha-tmpl/opac-tmpl/bootstrap/en/modules/opac-password-recovery.tt b/koha-tmpl/opac-tmpl/bootstrap/en/modules/opac-password-recovery.tt index 8eedb7d..8ffb3e3 100644 --- a/koha-tmpl/opac-tmpl/bootstrap/en/modules/opac-password-recovery.tt +++ b/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' %] \ No newline at end of file +[% INCLUDE 'opac-bottom.inc' %] diff --git a/opac/opac-password-recovery.pl b/opac/opac-password-recovery.pl index 0013870..e2cd74e 100755 --- a/opac/opac-password-recovery.pl +++ b/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 -- 1.9.1