mirror of
https://github.com/osmarks/mycorrhiza.git
synced 2024-10-30 03:36:16 +00:00
5f592acc55
similar to the admin password change, but with a few changes: - require current password verification the following still included: - empty password check - confirm password check
38 lines
1.3 KiB
HTML
38 lines
1.3 KiB
HTML
{{/* TODO: translate title? */}}
|
|
{{define "title"}}Change password{{end}}
|
|
{{define "body"}}
|
|
<main class="main-width form-wrap">
|
|
{{if .Form.HasError}}
|
|
<div class="notice notice--error">
|
|
<strong>{{template "error"}}:</strong>
|
|
{{.Form.Error}}
|
|
</div>
|
|
{{end}}
|
|
|
|
<h2>{{block "change password" .}}Change password{{end}}</h2>
|
|
|
|
{{if eq .U.Source "local"}}
|
|
<form action="/settings/change-password" method="post">
|
|
<div class="form-field">
|
|
<label for="current_pass">{{block "current password" .}}Current password{{end}}</label>
|
|
<input required type="password" autocomplete="current-password" id="current_pass" name="current_password">
|
|
<br>
|
|
<br>
|
|
<label for="pass">{{block "password" .}}Password{{end}}</label>
|
|
<input required type="password" autocomplete="new-password" id="pass" name="password">
|
|
<br>
|
|
<br>
|
|
<label for="pass_confirm">{{block "confirm password" .}}Confirm password{{end}}</label>
|
|
<input required type="password" autocomplete="new-password" id="pass_confirm" name="password_confirm">
|
|
</div>
|
|
|
|
<div class="form-field">
|
|
<input class="btn" type="submit" value='{{block "submit" .}}Submit{{end}}'>
|
|
</div>
|
|
</form>
|
|
{{else}}
|
|
<p>{{block "non local password change" .}}Non-local accounts cannot have their passwords changed.{{end}}</p>
|
|
{{end}}
|
|
</main>
|
|
{{end}}
|