53 lines
2.5 KiB
HTML
53 lines
2.5 KiB
HTML
{{define "title"}}Register{{end}}
|
|
|
|
{{define "content"}}
|
|
<div class="mx-auto max-w-sm">
|
|
<h2 class="text-2xl font-bold text-gray-900 text-center">Create your account</h2>
|
|
|
|
{{with .Data}}
|
|
{{if .Error}}
|
|
<div class="mt-4 rounded-md bg-red-50 p-4">
|
|
<p class="text-sm text-red-800">{{.Error}}</p>
|
|
</div>
|
|
{{end}}
|
|
{{end}}
|
|
|
|
<form method="POST" action="/register" class="mt-8 space-y-6">
|
|
<input type="hidden" name="gorilla.csrf.Token" value="{{.CSRFToken}}">
|
|
|
|
<div>
|
|
<label for="name" class="block text-sm font-medium text-gray-700">Name</label>
|
|
<input type="text" name="name" id="name" required
|
|
value="{{with .Data}}{{.Name}}{{end}}"
|
|
class="mt-1 block w-full rounded-md border border-gray-300 px-3 py-2 shadow-sm focus:border-blue-500 focus:outline-none focus:ring-1 focus:ring-blue-500">
|
|
</div>
|
|
|
|
<div>
|
|
<label for="email" class="block text-sm font-medium text-gray-700">Email</label>
|
|
<input type="email" name="email" id="email" required
|
|
value="{{with .Data}}{{.Email}}{{end}}"
|
|
class="mt-1 block w-full rounded-md border border-gray-300 px-3 py-2 shadow-sm focus:border-blue-500 focus:outline-none focus:ring-1 focus:ring-blue-500">
|
|
</div>
|
|
|
|
<div>
|
|
<label for="password" class="block text-sm font-medium text-gray-700">Password</label>
|
|
<input type="password" name="password" id="password" required minlength="8"
|
|
class="mt-1 block w-full rounded-md border border-gray-300 px-3 py-2 shadow-sm focus:border-blue-500 focus:outline-none focus:ring-1 focus:ring-blue-500">
|
|
<p class="mt-1 text-xs text-gray-500">Must be at least 8 characters</p>
|
|
</div>
|
|
|
|
<div>
|
|
<label for="confirm_password" class="block text-sm font-medium text-gray-700">Confirm Password</label>
|
|
<input type="password" name="confirm_password" id="confirm_password" required
|
|
class="mt-1 block w-full rounded-md border border-gray-300 px-3 py-2 shadow-sm focus:border-blue-500 focus:outline-none focus:ring-1 focus:ring-blue-500">
|
|
</div>
|
|
|
|
<button type="submit" class="w-full rounded-md bg-blue-600 px-4 py-2 text-sm font-semibold text-white shadow hover:bg-blue-500">Create account</button>
|
|
</form>
|
|
|
|
<p class="mt-6 text-center text-sm text-gray-500">
|
|
Already have an account? <a href="/login" class="font-medium text-blue-600 hover:text-blue-500">Sign in</a>
|
|
</p>
|
|
</div>
|
|
{{end}}
|