Koha/koha-tmpl/opac-tmpl/bootstrap/en/modules/opac-password-recovery.tt
Liz Rea 563688050c Bug 8753 - Various little things - removing new dependency, changes to errors, textual updates
Koha already has a sub that creates salts, so lets use that instead of math::Random::secure, so as not to add a new dependency.

Made the references to "Forgotten password" consistent, including adding it to the title of the page.

Also removed the individual error for "this email doesn't belong to this account" as that could expose the existence of a login, which I think we'd rather not do.

Made some of the text more grammatically correct, and more library specific.

To test:

Apply on top of all of the other patches.

All the usual checks, plus make sure there are no typos in any text references.

Signed-off-by: Marc Veron <veron@veron.ch>
Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
2016-01-27 06:40:54 +00:00

127 lines
6.5 KiB
Text

[% USE Koha %]
[% INCLUDE 'doc-head-open.inc' %]
<title>[% IF ( LibraryNameTitle ) %][% LibraryNameTitle %] - Forgotten password recovery[% ELSE %]Koha online[% END %] catalog - Forgotten password recovery</title>
[% INCLUDE 'doc-head-close.inc' %]
[% BLOCK cssinclude %][% END %]
[% BLOCK jsinclude %]
<script type="text/javascript" language="javascript">
$(function() {
$("#CheckAll").click(function(){
$("[name=deleteRequest]").attr('checked', true);
return false;
});
$("#CheckNone").click(function(){
$("[name=deleteRequest]").attr('checked', false);
return false;
});
$("select#type").change(function() {
$("fieldset#serial, fieldset#book, fieldset#chapter").hide()
$("fieldset#" + $(this).val() ).show();
});
});
</script>
[% END %]
</head>
[% INCLUDE 'bodytag.inc' bodyid='opac-password-recovery' %]
[% INCLUDE 'masthead.inc' %]
<div class="main">
<ul class="breadcrumb">
<li><a href="/cgi-bin/koha/opac-main.pl">Home</a> <span class="divider">&rsaquo;</span></li>
<li><a href="#">Forgotten password recovery</a></li>
</ul>
<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>Forgotten password recovery</h3>
[% IF (hasError) %]
<div class="alert alert-warning">
<h3>Oops!</h3>
<p>
[% IF (sendmailError) %]
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.
[% ELSIF (errAlreadyStartRecovery) %]
The process of password recovery has already been started for this account ("<strong>[% username %]</strong>")
<br/>You should have received an email with a link to reset your password.
<br/>If you did not receive this email, you can <a href="/cgi-bin/koha/opac-password-recovery.pl?resendEmail=true&email=[% email %]&username=[% username %]">request a new password recovery link.</a>
[% ELSIF (errPassNotMatch) %]
Oops! The passwords must match.
[% ELSIF (errPassTooShort) %]
Your chosen password is too short.
<br/>The password must contain at least [% minPassLength %] characters.
[% ELSIF (errLinkNotValid) %]
The link you clicked is either invalid, or expired.
<br/>Be sure you used the link from the email, or contact library staff for assistance.
[% END %]
</p>
<p>Please contact the library if you need further assistance.</p>
</div>
[% END %]
<div id="password-recovery">
[% IF (!Koha.Preference('OpacResetPassword')) %]
<div class="alert alert-info">You can't reset your password.</div>
[% ELSIF (password_recovery) %]
<form action="/cgi-bin/koha/opac-password-recovery.pl" method="post">
<input type="hidden" name="koha_login_context" value="opac" />
<fieldset>
<p>To reset your password, enter your login and email address.
<label for="username">Login:</label>
<input type="text" id="username" size="40" name="username" value="[% username %]" />
<label for="email">Email:</label>
<input type="text" id="email" size="40" name="email" value="[% email %]" />
<fieldset class="action">
<input type="submit" value="Submit" class="btn" name="sendEmail" />
</fieldset>
</fieldset>
</form>
[% ELSIF (new_password) %]
<form action="/cgi-bin/koha/opac-password-recovery.pl" method="post">
<input type="hidden" name="koha_login_context" value="opac" />
<fieldset>
<div class="alert alert-info">The password must contain at least [% minPassLength %] characters.</div>
<label for="password">New password:</label>
<input type="password" id="password" size="40" name="password" />
<label for="repeatPassword">Confirm new password:</label>
<input type="password" id="repeatPassword" size="40" name="repeatPassword" />
<fieldset class="action">
<input type="hidden" name="username" value="[% username %]" />
<input type="hidden" name="uniqueKey" value="[% uniqueKey %]" />
<input type="submit" value="Submit" class="btn" name="passwordReset" />
</fieldset>
</fieldset>
</form>
[% ELSIF (mail_sent) %]
<div class="alert alert-info">
<p>
An email has been sent to "[% email %]".
<br/>Please click the link in this email to finish the process of resetting your password.
<br/>This link is valid for 2 days starting now.
</p>
<a href="/cgi-bin/koha/opac-main.pl"">Return to the main page</a>
</div>
[% ELSIF (password_reset_done) %]
<div class="alert alert-success">
<p>The password has been changed for user "[% username %]".</p>
Click <a href="/cgi-bin/koha/opac-user.pl">here</a> to login.
</div>
[% END %]
</div><!-- / #password-recovery -->
</div><!-- / .span10 -->
</div><!-- / .row-fluid -->
</div><!-- / .container-fluid -->
</div><!-- / .main -->
[% INCLUDE 'opac-bottom.inc' %]