-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #19 from RafaelClaumann/17-6-implement-a-change-pa…
…ssword-feature Chapter 17.6 Implement a Change Password Feature
- Loading branch information
Showing
6 changed files
with
158 additions
and
2 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,54 @@ | ||
{{define "title"}}Change Password{{end}} | ||
|
||
{{define "main"}} | ||
<h2>Change Password</h2> | ||
|
||
<form action='/account/password/update' method='POST' novalidate> | ||
|
||
<!-- Include the CSRF token --> | ||
<input type='hidden' name='csrf_token' value='{{.CSRFToken}}'> | ||
|
||
<div> | ||
<label>Current password:</label> | ||
|
||
{{with .Form.FieldErrors.currentPassword}} | ||
<label class='error'>{{.}}</label> | ||
{{end}} | ||
{{with .Form.FieldErrors.current}} | ||
<label class='error'>{{.}}</label> | ||
{{end}} | ||
|
||
<input type='password' name='current'> | ||
</div> | ||
|
||
<div> | ||
<label>New password:</label> | ||
|
||
{{with .Form.FieldErrors.newPasswordEquality}} | ||
<label class='error'>{{.}}</label> | ||
{{end}} | ||
{{with .Form.FieldErrors.new}} | ||
<label class='error'>{{.}}</label> | ||
{{end}} | ||
|
||
<input type='password' name='new'> | ||
</div> | ||
|
||
<div> | ||
<label>Confirm new password:</label> | ||
|
||
{{with .Form.FieldErrors.newPasswordConfirmation}} | ||
<label class='error'>{{.}}</label> | ||
{{end}} | ||
{{with .Form.FieldErrors.confirmation}} | ||
<label class='error'>{{.}}</label> | ||
{{end}} | ||
|
||
<input type='password' name='confirmation'> | ||
</div> | ||
|
||
<div> | ||
<input type='submit' value='Change Password'> | ||
</div> | ||
</form> | ||
{{end}} |