ch11.7
This commit is contained in:
@@ -2,6 +2,7 @@
|
||||
|
||||
{{define "main"}}
|
||||
<form action='/snippet/create' method='POST'>
|
||||
<input type='hidden' name='csrf_token' value='{{.CSRFToken}}'>
|
||||
<div>
|
||||
<label>Title:</label>
|
||||
{{with .Form.FieldErrors.title}}
|
||||
|
||||
@@ -2,6 +2,7 @@
|
||||
|
||||
{{define "main"}}
|
||||
<form action='/user/login' method='POST' novalidate>
|
||||
<input type='hidden' name='csrf_token' value='{{.CSRFToken}}'>
|
||||
{{range .Form.NonFieldErrors}}
|
||||
<div class='error'>{{.}}</div>
|
||||
{{end}}
|
||||
|
||||
@@ -2,6 +2,7 @@
|
||||
|
||||
{{define "main"}}
|
||||
<form action='/user/signup' method='POST' novalidate>
|
||||
<input type='hidden' name='csrf_token' value='{{.CSRFToken}}'>
|
||||
<div>
|
||||
<label>Name:</label>
|
||||
{{with .Form.FieldErrors.name}}
|
||||
|
||||
@@ -9,6 +9,7 @@
|
||||
<div>
|
||||
{{if .IsAuthenticated}}
|
||||
<form action='/user/logout' method='POST'>
|
||||
<input type='hidden' name='csrf_token' value='{{.CSRFToken}}'>
|
||||
<button>Logout</button>
|
||||
</form>
|
||||
{{else}}
|
||||
|
||||
Reference in New Issue
Block a user