blob: 7a38e013461d9bc251701f2237da158b1d9042e0 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
|
[%
SET bclass = 'authpage';
SET bclass = 'fullwidthpage' IF password_changed;
SET title = loc('Set password');
SET title = loc('Change password') IF c.user.password;
INCLUDE 'header.html', title = title bodyclass = bclass
%]
[% IF password_changed %]
<div class="confirmation-header">
<h1>[% loc('Your password has been changed') %]</h1>
<p><a href="/my">[% loc('Your account') %]</a></p>
</div>
[% ELSE %]
<h1>[% title %]</h1>
<form action="[% c.uri_for_action('/auth/profile/change_password') %]" method="post" name="change_password" class="fieldset">
<input type="hidden" name="token" value="[% csrf_token %]">
<fieldset>
[% IF password_error == 'failed' %]
<div class="form-error">[% field_errors.password_register %]</div>
[% ELSIF password_error;
errors = {
missing => loc('Please enter a password'),
mismatch => loc('The passwords do not match'),
other => loc('Please check the passwords and try again'),
};
loc_password_error = errors.$password_error || errors.other; %]
<div class="form-error">[% loc_password_error %]</div>
[% END %]
[% IF c.user.password %]
<div class="form-field">
<label for="current_password">[% loc('Current password:') %]</label>
<input class="form-control" type="password" name="current_password" value="[% current_password | html %]">
</div>
<hr>
[% END %]
<div class="form-field">
<label for="new_password">[% loc('New password:') %]</label>
<input class="form-control" type="password" name="new_password" value="[% new_password | html %]">
</div>
<div class="form-field">
<label for="confirm">[% loc('Again:') %]</label>
<input class="form-control" type="password" name="confirm" value="[% confirm | html %]">
</div>
<div class="final-submit">
<input type="submit" class="btn" value="[% title %]">
</div>
</fieldset>
</form>
[% END %]
[% INCLUDE 'footer.html' %]
|