added registeration and started user login
This commit is contained in:
parent
3f2cbcea33
commit
7ec8dbc211
14 changed files with 327 additions and 1 deletions
24
templates/user_register.html
Normal file
24
templates/user_register.html
Normal file
|
@ -0,0 +1,24 @@
|
|||
{{define "header"}}
|
||||
<h1 class="mb-0">Register</h1>
|
||||
{{end}}
|
||||
|
||||
{{define "content"}}
|
||||
<form action="/register" method="POST">
|
||||
{{.CSRF}}
|
||||
<div class="form-group">
|
||||
<label>Username</label>
|
||||
<input name="username" type="text" class="form-control {{with .Form.Errors.Title}}is-invalid{{end}}" placeholder="Choose a username" value="{{with .Form.Username}}{{.}}{{end}}">
|
||||
{{with .Form.Errors.Username}}
|
||||
<div class="invalid-feedack">{{.}}</div>
|
||||
{{end}}
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label>Password</label>
|
||||
<input name="password" type="password" class="form-control {{with .Form.Errors.Password}}is-invalid{{end}}" placeholder="Please enter your password" value="{{with .Form.Password}}{{.}}{{end}}">
|
||||
{{with .Form.Errors.Password}}
|
||||
<div class="invalid-feedack">{{.}}</div>
|
||||
{{end}}
|
||||
</div>
|
||||
<button type="submit" class="btn btn-primary">Register</button>
|
||||
</form>
|
||||
{{end}}
|
Reference in a new issue