closes #53
This commit is contained in:
@@ -15,6 +15,9 @@
|
||||
<li class="expand"></li>
|
||||
{{ if .Context.User }}
|
||||
<li>
|
||||
<a hx-get="/user/info" hx-headers='{"REQUEST-TYPE": "htmlfull"}' hx-push-url="true" hx-swap="outerHTML" hx-target=".app">
|
||||
User Info
|
||||
</a>
|
||||
<a hx-get="/logout" hx-headers='{"REQUEST-TYPE": "htmlfull"}' hx-push-url="true" hx-swap="outerHTML" hx-target=".app">
|
||||
Logout
|
||||
</a>
|
||||
|
||||
50
views/users/edit.html
Normal file
50
views/users/edit.html
Normal file
@@ -0,0 +1,50 @@
|
||||
{{ define "title" }}
|
||||
User Info
|
||||
{{ end }}
|
||||
|
||||
{{define "mainbody"}}
|
||||
<div class="login-page">
|
||||
<div>
|
||||
<h1>
|
||||
User Infomation
|
||||
</h1>
|
||||
<form method="post" action="/user/info/email" {{if .Submited}}class="submitted"{{end}} >
|
||||
<fieldset>
|
||||
<label for="email">Email</label>
|
||||
<input type="email" required name="email" {{if .Email}} value="{{.Email}}" {{end}} />
|
||||
</fieldset>
|
||||
<button>
|
||||
Update
|
||||
</button>
|
||||
</form>
|
||||
<form method="post" action="/user/info/password" {{if .Submited}}class="submitted"{{end}} >
|
||||
<fieldset>
|
||||
<label for="old_password">Old Password</label>
|
||||
<input required name="old_password" type="password" />
|
||||
{{if .NoUserOrPassword}}
|
||||
<span class="form-msg error">
|
||||
Either the password is incorrect
|
||||
</span>
|
||||
{{end}}
|
||||
</fieldset>
|
||||
<fieldset>
|
||||
<label for="password">New Password</label>
|
||||
<input required name="password" type="password" />
|
||||
</fieldset>
|
||||
<fieldset>
|
||||
<label for="password2">Repeat New Password</label>
|
||||
<input required name="password2" type="password" />
|
||||
{{if .PasswordNotTheSame}}
|
||||
<span class="form-msg error">
|
||||
Either the passwords are not the same
|
||||
</span>
|
||||
{{end}}
|
||||
</fieldset>
|
||||
<button>
|
||||
Update
|
||||
</button>
|
||||
</form>
|
||||
</div>
|
||||
</div>
|
||||
{{end}}
|
||||
|
||||
Reference in New Issue
Block a user