Koha/koha-tmpl/opac-tmpl/bootstrap/en/modules/opac-registration-confirmation.tt
Tomas Cohen Arazi e155e6d5bb Bug 10796: Use $category->effective_change_password in the OPAC
This patch makes the OPAC pages that rely on OpacPasswordChange use the
current patron's category to make the decision to allow password change
or not.

It does so by making sure all the places in which OpacPasswordChange was
used, use $logged_in_user->category->effective_change_password instead.

Special attention is required on the case of opac-registration-verify.pl
in which the use of an unblessed Koha::Patron object is changed in
favour of the blessed object, so we can actually use the new method to
make a decision on the text to display.

To test:
- Go through the OPAC pages, check that the password change strings and
links are displayed only whne appropriate.
- Sign off :-D

Signed-off-by: Liz Rea <wizzyrea@gmail.com>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>

Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
2019-04-12 02:32:07 +00:00

115 lines
6.5 KiB
Text

[% USE raw %]
[% USE Koha %]
[% INCLUDE 'doc-head-open.inc' %]
<title>[% IF ( LibraryNameTitle ) %][% LibraryNameTitle | html %][% ELSE %]Koha online[% END %] catalog</title>
[% INCLUDE 'doc-head-close.inc' %]
[% BLOCK cssinclude %][% END %]
</head>
[% INCLUDE 'bodytag.inc' bodyid='opac-main' %]
[% 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="#">Registration complete</a></li>
</ul>
<div class="container-fluid">
<div class="row-fluid">
[% IF ( OpacNav || OpacNavBottom ) %]
<div class="span2">
<div id="navigation">
[% INCLUDE 'navigation.inc' %]
</div>
</div>
[% END %]
[% IF ( OpacNav || OpacNavBottom ) %]
<div class="span7">
[% ELSE %]
<div class="span9">
[% END %]
<div id="registration-complete">
<h1>Registration Complete!</h1>
<p>You have successfully registered your new account.</p>
[% IF Koha.Preference('PatronSelfRegistrationPrefillForm') %]
<p>To log in, use the following credentials:</p>
<p id="patron-userid-p">
<span id="patron-userid-label">Username:</span>
<span id="patron-userid">[% borrower.userid | html %]</span>
</p>
<p id="patron-password-p">
<span id="patron-password-label">Password:</span>
<span id="patron-password">[% password_cleartext | html %]</span>
</p>
[% IF borrower.cardnumber %]
<p id="patron-cardnumber-p">
<span id="patron-cardnumber-label">Card number:</span>
<span id="patron-cardnumber">[% borrower.cardnumber | html %]</span>
</p>
[% END %]
<p id="patron-instructions">
[% IF borrower.category.effective_change_password %]
<span>For your convenience, the login box on this page has been pre-filled with this data. Please log in and change your password.</span>
[% ELSE %]
<span>For your convenience, the login box on this page has been pre-filled with this data. Please log in.</span>
[% END %]
</p>
[% END %]
<div id="PatronSelfRegistrationAdditionalInstructions">[% PatronSelfRegistrationAdditionalInstructions | $raw %]</div>
</div>
</div> <!-- / .span7/9 -->
[% IF ( ( Koha.Preference( 'opacuserlogin' ) == 1 ) || OpacNavRight ) %]
<div class="span3">
[% IF Koha.Preference( 'opacuserlogin' ) == 1 %]
[% UNLESS ( loggedinusername ) %]
[% UNLESS ( casAuthentication ) %]
<div id="login">
<form action="/cgi-bin/koha/opac-user.pl" method="post" name="auth" id="auth" autocomplete="off">
<input type="hidden" name="koha_login_context" value="opac" />
<fieldset class="brief">
<legend>Log in to your account:</legend>
<label for="userid">Login:</label>
[% IF Koha.Preference('PatronSelfRegistrationPrefillForm') %]
<input type="text" id="userid" size="10" name="userid" value="[% borrower.userid | html %]" />
[% ELSE %]
<input type="text" id="userid" size="10" name="userid" value="" />
[% END %]
<label for="password">Password:</label>
[% IF Koha.Preference('PatronSelfRegistrationPrefillForm') %]
<input type="password" id="password" size="10" name="password" value="[% password_cleartext | html %]" />
[% ELSE %]
<input type="password" id="password" size="10" name="password" value="" />
[% END %]
<fieldset class="action">
<input type="submit" value="Log in" class="btn" />
</fieldset>
[% IF PatronSelfRegistration && PatronSelfRegistrationDefaultCategory %]<div id="patronregistration"><p>Don't have an account? <a href="/cgi-bin/koha/opac-memberentry.pl">Register here.</a></p></div>[% END %]
</fieldset>
</form>
</div> <!-- /#login -->
[% END # /casAuthentication %]
[% END # / loggedinusername %]
[% END # /opacuserlogin %]
[% IF ( OpacNavRight ) %]
<div id="opacnavright">
[% OpacNavRight | $raw %]
</div>
[% END # /OpacNavRight %]
</div> <!-- / .span3 -->
[% END # /opacuserlogin || OpacNavRight %]
</div> <!-- /.row-fluid -->
</div> <!-- /.container-fluid -->
</div> <!-- /.main -->
[% INCLUDE 'opac-bottom.inc' %]
[% BLOCK jsinclude %][% END %]