1
0
mirror of https://github.com/osmarks/mycorrhiza.git synced 2024-12-04 18:19:54 +00:00
mycorrhiza/settings/view_change_password.html

38 lines
1.3 KiB
HTML
Raw Normal View History

{{/* 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}}