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 <title></title> 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 Veron <veron@veron.ch>
Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
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:
<label for="mpassword">Password:</label><input type="password" id="mpassword" name="password" />
[% IF Koha.Preference('OpacPasswordChange') && Koha.Preference('OpacResetPassword') %]
<div id="forgotpassword-modal">
- <h5>Forgot your password?</h5>
- <p>If you do not remember your password, click <a href="/cgi-bin/koha/opac-password-recovery.pl">here</a> to create a new one.</p>
+ <a href="/cgi-bin/koha/opac-password-recovery.pl">Forgot your password?</a>
</div>
[% END %]
[% IF Koha.Preference( 'NoLoginInstructions' ) %]
<input type="submit" value="Log in" class="btn" />
[% IF Koha.Preference('OpacPasswordChange') && Koha.Preference('OpacResetPassword') %]
<div id="forgotpassword">
- <h5>Forgot your password?</h5>
- <p>If you do not remember your password, click <a href="/cgi-bin/koha/opac-password-recovery.pl">here</a> to create a new one.</p>
+ <a href="/cgi-bin/koha/opac-password-recovery.pl">Forgot your password?</a>
</div>
[% END %]
<div id="nologininstructions">
</fieldset>
[% IF Koha.Preference('OpacPasswordChange') && Koha.Preference('OpacResetPassword') %]
<div id="forgotpassword">
- <h5>Forgot your password?</h5>
- <p>If you do not remember your password, click <a href="/cgi-bin/koha/opac-password-recovery.pl">here</a> to create a new one.</p>
+ <a href="/cgi-bin/koha/opac-password-recovery.pl">Forgot your password?</a>
</div>
[% END %]
[% IF Koha.Preference( 'NoLoginInstructions' ) %]
[% USE Koha %]
[% INCLUDE 'doc-head-open.inc' %]
-[% IF (LibraryNameTitle) %][% LibraryNameTitle %][% ELSE %]Koha online[% END %] catalog ›
+<title>[% IF ( LibraryNameTitle ) %][% LibraryNameTitle %][% ELSE %]Koha online[% END %] catalog</title>
[% INCLUDE 'doc-head-close.inc' %]
[% BLOCK cssinclude %][% END %]
[% BLOCK jsinclude %]
<div class="container-fluid">
<div class="row-fluid">
<div class="span2">
+ [% IF ( OpacPublic ) %]
+
<div id="navigation">
[% INCLUDE 'navigation.inc' IsPatronPage=0 %]
</div>
+ [% END %]
</div>
<div class="span10">
<h3>Password recovery</h3>
[% IF (hasError) %]
<div class="alert alert-warning">
- <h3>An error occured</h3>
+ <h3>An error occurred</h3>
<p>
[% IF (sendmailError) %]
- An error has occured while sending you the password recovery link.
+ An error has occurred while sending you the password recovery link.
<br/>Please try again later.
[% ELSIF (errNoBorrowerFound) %]
No account was found with the provided information.
</div><!-- / .row-fluid -->
</div><!-- / .container-fluid -->
</div><!-- / .main -->
-[% INCLUDE 'opac-bottom.inc' %]
\ No newline at end of file
+[% INCLUDE 'opac-bottom.inc' %]
$email ||= ''; # avoid undef
my $borrower;
my $search_results;
-
# Find the borrower by his userid or email
if( $username ){
$search_results = Search({ userid => $username });
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;
}
email => $email
);
}
- else {# if it doesnt work....
+ else {# if it doesn't work....
$template->param(
password_recovery => 1,
sendmailError => 1