fyp/views/users/edit.html
2023-10-25 14:22:45 +01:00

51 lines
1.8 KiB
HTML

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