Victor Grousset/tuxayo
7758a0248e
And a few minor fixes when they where causing issues for translatability. And rephrased a string about password reset to have it identical to other strings with the same meaning. Simplified via wrapping strings with <span> to split to huge concatenated strings with a lot of %s everywhere. == Test plan == This patch needs mainly proof reading. Still it's possible to do some basic testing to demonstrate that adding a <span> in an IF doesn't break anything. Pick in one of the 110 modified templates a string that you know how to display. Otherwise: 1. acquisitions => vendor => basket => add to basket => search "from existing record" => add order 2. Cancel the order 3. You see without issue "Bibliographic record will not be deleted" 4. administration => Patron categories 5. Try to delete a used and unused category 6. You see as expected Category XXXX is in use. Deletion not possible! and Confirm deletion of category XXXX Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com> Signed-off-by: Paul Derscheid <paul.derscheid@lmscloud.de> Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com> Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
138 lines
7.4 KiB
Text
138 lines
7.4 KiB
Text
[% USE raw %]
|
|
[% USE Asset %]
|
|
[% USE Koha %]
|
|
[% USE AdditionalContents %]
|
|
[% SET OpacNav = AdditionalContents.get( location => "OpacNav", lang => lang, library => logged_in_user.branchcode || default_branch, blocktitle => 0 ) %]
|
|
[% SET OpacNavBottom = AdditionalContents.get( location => "OpacNavBottom", lang => lang, library => logged_in_user.branchcode || default_branch, blocktitle => 0 ) %]
|
|
[% INCLUDE 'doc-head-open.inc' %]
|
|
<title>Change your password › [% IF ( LibraryNameTitle ) %][% LibraryNameTitle | html %][% ELSE %]Koha online[% END %] catalog</title>
|
|
[% INCLUDE 'doc-head-close.inc' %]
|
|
[% BLOCK cssinclude %][% END %]
|
|
</head>
|
|
[% INCLUDE 'bodytag.inc' bodyid='opac-passwd' %]
|
|
[% INCLUDE 'masthead.inc' %]
|
|
|
|
<div class="main">
|
|
<nav id="breadcrumbs" aria-label="Breadcrumb" class="breadcrumbs">
|
|
<ol class="breadcrumb">
|
|
<li class="breadcrumb-item">
|
|
<a href="/cgi-bin/koha/opac-main.pl">Home</a>
|
|
</li>
|
|
<li class="breadcrumb-item">
|
|
<a href="/cgi-bin/koha/opac-user.pl">[% INCLUDE 'patron-title.inc' patron = logged_in_user %]</a>
|
|
</li>
|
|
<li class="breadcrumb-item active">
|
|
<a href="#" aria-current="page">Change your password</a>
|
|
</li>
|
|
</ol>
|
|
</nav> <!-- /#breadcrumbs -->
|
|
|
|
<div class="container-fluid">
|
|
<div class="row">
|
|
<div class="col-lg-2">
|
|
<div id="navigation">
|
|
[% INCLUDE 'navigation.inc' IsPatronPage=1 %]
|
|
</div>
|
|
</div>
|
|
<div class="col-10 order-first order-lg-2">
|
|
<div id="userpasswd" class="maincontent">
|
|
<h1>Change your password </h1>
|
|
|
|
[% IF ( Error_messages ) %]
|
|
<div class="alert alert-warning">
|
|
<h2>There was a problem with your submission</h2>
|
|
<p>
|
|
[% IF ( passwords_mismatch ) %]
|
|
<span>Passwords do not match. Please re-type your new password.</span>
|
|
[% END %]
|
|
[% IF password_too_short %]
|
|
<span>Password must be at least [% minPasswordLength | html %] characters long.</span>
|
|
[% END %]
|
|
[% IF password_too_weak %]
|
|
<span>Password must contain at least one digit, one lowercase and one uppercase.</span>
|
|
[% END %]
|
|
[% IF password_has_whitespaces %]
|
|
<span>Password must not contain leading or trailing whitespaces.</span>
|
|
[% END %]
|
|
|
|
[% IF ( WrongPass ) %]
|
|
<span>Your current password was entered incorrectly. If this problem persists, please ask a librarian to reset your password for you.</span>
|
|
[% END %]
|
|
</p>
|
|
</div>
|
|
[% END # /IF Error_messages %]
|
|
|
|
[% IF logged_in_user.category.effective_change_password %]
|
|
[% IF ( Ask_data ) %]
|
|
<form action="/cgi-bin/koha/opac-passwd.pl" name="mainform" id="mainform" method="post" autocomplete="off">
|
|
<legend class="sr-only">Change your password</legend>
|
|
<fieldset>
|
|
[% IF ( logged_in_user.category.effective_require_strong_password ) %]
|
|
<div class="alert alert-info">Your password must contain at least [% logged_in_user.category.effective_min_password_length | html %] characters, including UPPERCASE, lowercase and numbers.</div>
|
|
[% ELSE %]
|
|
<div class="alert alert-info">Your password must be at least [% logged_in_user.category.effective_min_password_length | html %] characters long.</div>
|
|
[% END %]
|
|
<div class="form-group">
|
|
<label for="Oldkey">Current password:</label>
|
|
<input class="form-control focus" type="password" id="Oldkey" size="25" name="Oldkey" />
|
|
</div>
|
|
<div class="form-group">
|
|
<label for="Newkey">New password:</label>
|
|
<input class="form-control" type="password" id="Newkey" size="25" name="Newkey" />
|
|
</div>
|
|
<div class="form-group">
|
|
<label for="Confirm">Re-type new password:</label>
|
|
<input class="form-control" type="password" id="Confirm" size="25" name="Confirm" />
|
|
</div>
|
|
</fieldset>
|
|
<fieldset class="action">
|
|
<input type="submit" value="Change password" class="btn btn-primary" />
|
|
<a href="/cgi-bin/koha/opac-user.pl" class="cancel">Cancel</a>
|
|
</fieldset>
|
|
</form>
|
|
[% END # /IF Ask_data %]
|
|
[% ELSE %]
|
|
<div class="alert alert-warning">You can't change your password.</div>
|
|
[% END # /IF logged_in_user.category.effective_change_password %]
|
|
|
|
[% IF ( password_updated ) %]
|
|
<div class="alert alert-info">
|
|
<strong>Password updated</strong>
|
|
<br />
|
|
Your password has been changed
|
|
</div>
|
|
<form action="/cgi-bin/koha/opac-user.pl" method="post" autocomplete="off">
|
|
<input type="hidden" name="borrowernumber" value="[% borrowernumber | html %]" />
|
|
<p><input type="submit" class="btn btn-primary" value="Return to my account" /></p>
|
|
</form>
|
|
[% END # /IF password_updated %]
|
|
</div> <!-- / #userpasswd -->
|
|
</div> <!-- / .col-10 -->
|
|
</div> <!-- / .row -->
|
|
</div> <!-- / .container-fluid -->
|
|
</div> <!-- / .main -->
|
|
|
|
|
|
|
|
[% INCLUDE 'opac-bottom.inc' %]
|
|
[% BLOCK jsinclude %]
|
|
[% Asset.js("lib/jquery/plugins/jquery.validate.min.js") | $raw %]
|
|
[% PROCESS 'password_check.inc' new_password => 'Newkey', minPasswordLength => logged_in_user.category.effective_min_password_length, RequireStrongPassword => logged_in_user.category.effective_require_strong_password %]
|
|
<script>
|
|
$(document).ready(function() {
|
|
$("#mainform").validate({
|
|
rules: {
|
|
Newkey: {
|
|
required: true,
|
|
password_strong: true,
|
|
password_no_spaces: true
|
|
},
|
|
Confirm: {
|
|
required: true,
|
|
password_match: true
|
|
}
|
|
}
|
|
});
|
|
});
|
|
</script>
|
|
[% END %]
|