]>
Commit | Line | Data |
---|---|---|
f6e6ff79 MT |
1 | {% extends "base.html" %} |
2 | ||
3 | {% block title %}{{ _("Change password") }}{% end block %} | |
4 | ||
5 | {% block body %} | |
f6e6ff79 | 6 | |
c28a3768 JS |
7 | <div class="row"> |
8 | <div class="col-12 col-sm-12 col-md-12 col-lg-12 col-xl-12"> | |
9 | <nav aria-label="breadcrumb" role="navigation"> | |
10 | <ol class="breadcrumb"> | |
11 | <li class="breadcrumb-item"><a href="/">{{ _("Home") }}</a></li> | |
12 | <li class="breadcrumb-item"> | |
13 | <a href="/users">{{ _("Users") }}</a> | |
14 | </li> | |
15 | <li class="breadcrumb-item"> | |
16 | <a href="/user/{{ user.name }}">{{ user.realname }}</a> | |
17 | </li> | |
18 | <li class="breadcrumb-item active"> | |
19 | <a href="/user/{{ user.name }}/passwd">{{ _("Change password") }}</a> | |
20 | </li> | |
21 | </ol> | |
22 | </nav> | |
23 | </div> | |
24 | </div> | |
25 | ||
26 | <div class="row"> | |
27 | <div class="col-12 col-sm-12 col-md-12 col-lg-12 col-xl-12"> | |
28 | <h2 style="word-wrap: break-word;"> | |
29 | {{ _("Change password") }} | |
30 | </h2> | |
31 | </div> | |
f6e6ff79 MT |
32 | </div> |
33 | ||
c28a3768 JS |
34 | {% if error_msg %} |
35 | <div class="row"> | |
36 | <div class="col-12 col-sm-12 col-md-12 col-lg-12 col-xl-12"> | |
37 | <div class="alert alert-danger alert-dismissible fade show" role="alert"> | |
38 | <h3 style="word-wrap: break-word;" class="alert-heading"> | |
39 | {{ _("Oops!") }} | |
40 | </h3> | |
41 | {{ error_msg }} | |
42 | <button type="button" class="close" data-dismiss="alert" aria-label="Close"> | |
43 | <span aria-hidden="true">×</span> | |
44 | </button> | |
45 | </div> | |
46 | </div> | |
47 | </div> | |
48 | {% end %} | |
49 | ||
f6e6ff79 | 50 | <div class="row"> |
c28a3768 | 51 | <div class="col-12 col-sm-12 col-md-12 col-lg-12 col-xl-12"> |
f6e6ff79 | 52 | {% if user == current_user %} |
c28a3768 | 53 | <p> |
f6e6ff79 MT |
54 | {{ _("You are going to change your password.") }} |
55 | </p> | |
56 | <p> | |
57 | {{ _("To do so, you need to enter your current password and the new password twice.") }} | |
58 | </p> | |
59 | {% else %} | |
60 | <p> | |
5aa556bf | 61 | {{ _("In this dialog, you may change the password of %s.") % user.realname }} |
f6e6ff79 MT |
62 | </p> |
63 | {% end %} | |
64 | <hr /> | |
65 | </div> | |
66 | </div> | |
67 | ||
68 | <div class="row"> | |
c28a3768 JS |
69 | <div class="col-12 col-sm-12 col-md-12 col-lg-12 col-xl-12"> |
70 | <form method="POST" action=""> | |
f55d0127 | 71 | {% raw xsrf_form_html() %} |
f6e6ff79 MT |
72 | |
73 | <fieldset> | |
74 | {% if user == current_user %} | |
c28a3768 JS |
75 | <div class="form-group"> |
76 | <label for="pass0">{{ _("Old password") }}</label> | |
77 | <input type="password" class="form-control" | |
78 | id="pass0" name="pass0" aria-describedby="pass0Help" placeholder="{{ _("Old password") }}"> | |
79 | <small id="pass0Help" class="form-text text-muted"> | |
80 | {{ _("Please provide your old password.") }} | |
81 | </small> | |
f6e6ff79 MT |
82 | </div> |
83 | {% end %} | |
84 | ||
c28a3768 JS |
85 | <div class="form-group"> |
86 | <label for="pass1">{{ _("New password") }}</label> | |
87 | <input type="password" class="form-control" | |
88 | id="pass1" name="pass1" aria-describedby="pass1Help" placeholder="{{ _("New password") }}"> | |
89 | <small id="pass1Help" class="form-text text-muted"> | |
90 | {{ _("Choose a new password. Make sure that it is as strong as possible.") }} | |
91 | </small> | |
f6e6ff79 MT |
92 | </div> |
93 | ||
c28a3768 JS |
94 | <div class="form-group"> |
95 | <label for="pass2">{{ _("Confirm new password") }}</label> | |
96 | <input type="password" class="form-control" | |
97 | id="pass2" name="pass2" aria-describedby="pass2Help" placeholder="{{ _("Confirm new password") }}"> | |
98 | <small id="pass2Help" class="form-text text-muted"> | |
99 | {{ _("Confirm the new password.") }} | |
100 | </small> | |
f6e6ff79 MT |
101 | </div> |
102 | ||
c28a3768 JS |
103 | <button type="submit" class="btn btn-primary">{{ _("Change password") }}</button> |
104 | <a class="btn btn-light" href="/user/{{ user.name }}">{{ _("Cancel") }}</a> | |
105 | ||
f6e6ff79 MT |
106 | </fieldset> |
107 | </form> | |
108 | </div> | |
109 | </div> | |
110 | {% end %} |