Commit ec45f260 authored by ale's avatar ale
Browse files

Move new password forms to a common template

parent a4594af1
Pipeline #420 failed with stages
in 42 seconds
......@@ -13,24 +13,7 @@
{{.CSRF}}
<input type="hidden" name="action" value="{{.Action}}">
<div class="form-group">
<label for="inputPassword">
New password:
</label>
<input class="form-control" type="password" name="password" id="inputPassword">
{{template "field_error" .FormError.FieldError "password"}}
</div>
<div class="form-group">
<label for="inputPasswordConfirm">
Confirm:
</label>
<input class="form-control" type="password" name="password_confirm" id="inputPasswordConfirm">
<small id="passwordConfirmHelp" class="form-text text-muted">
Type again your password for confirmation.
</small>
{{template "field_error" .FormError.FieldError "password_confirm"}}
</div>
{{template "new_password_form" .}}
<button type="submit" class="btn btn-primary">Set password</button>
</form>
......
......@@ -13,21 +13,7 @@
{{.CSRF}}
<input type="hidden" name="action" value="{{.Action}}">
<div class="form-group">
<label for="inputPassword">
New password:
</label>
<input class="form-control" id="inputPassword" type="password" name="password">
{{template "field_error" .FormError.FieldError "password"}}
</div>
<div class="form-group">
<label for="inputPasswordConfirm">
Confirm:
</label>
<input class="form-control" id="inputPasswordConfirm" type="password" name="password_confirm">
{{template "field_error" .FormError.FieldError "password_confirm"}}
</div>
{{template "new_password_form" .}}
<button type="submit" class="btn btn-primary">Set password</button>
</form>
......
......@@ -16,21 +16,7 @@
{{template "field_error" .FormError.FieldError "cur_password"}}
</div>
<div class="form-group">
<label for="inputPassword">
New password:
</label>
<input class="form-control" id="inputPassword" type="password" name="password">
{{template "field_error" .FormError.FieldError "password"}}
</div>
<div class="form-group">
<label for="inputPasswordConfirm">
Confirm:
</label>
<input class="form-control" id="inputPasswordConfirm" type="password" name="password_confirm">
{{template "field_error" .FormError.FieldError "password_confirm"}}
</div>
{{template "new_password_form" .}}
<button type="submit" class="btn btn-primary">Change password</button>
</form>
......
{{define "new_password_form"}}
<div class="form-group">
<label for="inputPassword">
New password:
</label>
<input class="form-control" type="password" name="password" id="inputPassword">
{{template "field_error" .FormError.FieldError "password"}}
</div>
<div class="form-group">
<label for="inputPasswordConfirm">
Confirm:
</label>
<input class="form-control" type="password" name="password_confirm" id="inputPasswordConfirm">
<small id="passwordConfirmHelp" class="form-text text-muted">
Type again your password for confirmation.
</small>
{{template "field_error" .FormError.FieldError "password_confirm"}}
</div>
{{end}}
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment