Albirew/nyaa-pantsu
Archivé
1
0
Bifurcation 0
Ce dépôt a été archivé le 2022-05-07. Vous pouvez voir ses fichiers ou le cloner, mais pas ouvrir de ticket ou de demandes d'ajout, ni soumettre de changements.
nyaa-pantsu/templates/user/register.html
akuma06 3ec367a759 CSRF Support + better key for context
* Added new dep: gorilla/csrf
* CSRF field in forms
* CSRF variable in commontemplatevariables
* New key for messages and user context

Please change EnableSecureCSRF to false when testing locally and don't
merge config/env.go with the changes
2017-05-29 17:07:18 +02:00

47 lignes
2,3 Kio
HTML

{{define "title"}}{{ call $.T "register_title" }}{{end}}
{{define "contclass"}}cont-view{{end}}
{{define "content"}}
{{ with .Form }}
<div class="box">
<div class="user-form">
<form role="form" method="POST">
{{ block "csrf_field" $ }}{{end}}
<h2>{{call $.T "signup_box_title" }}</h2>
{{ range (index $.FormErrors "errors")}}
<div class="alert alert-danger">{{ . }}</div>
{{end}}
<input type="text" name="username" id="display_name" class="form-input up-input" placeholder="{{call $.T "username" }}" value="{{ .Username }}" autofocus> <br>
{{ range (index $.FormErrors "username")}}
<p class="text-error">{{ . }}</p>
{{end}}
<input type="email" name="email" id="email" class="form-input up-input" placeholder="{{call $.T "email_address" }}" value="{{ .Email }}"> <br>
{{ range (index $.FormErrors "email")}}
<p class="text-error">{{ . }}</p>
{{end}}
<input type="password" name="password" id="password" class="form-input up-input" placeholder="{{call $.T "password" }}" value="{{ .Password }}"> <br>
{{ range (index $.FormErrors "password")}}
<p class="text-error">{{ . }}</p>
{{end}}
<input type="password" name="password_confirmation" id="password_confirmation" class="form-input up-input" placeholder="{{call $.T "confirm_password" }}"> <br>
{{ range (index $.FormErrors "password_confirmation")}}
<p class="text-error">{{ . }}</p>
{{end}}
<span class="button-checkbox">
<input type="checkbox" name="t_and_c" id="t_and_c" value="1">
{{ range (index $.FormErrors "t_and_c")}}
<p class="text-error">{{ . }}</p>
{{end}}
</span>
<p>By checking this box, you agree to the <a onclick="terms()">terms and conditions</a></p>
<!-- {{call $.T "terms_conditions_confirm" }} -->
{{block "captcha" (makeCaptchaData .CaptchaID $.T)}}{{end}}
<input type="submit" value="{{call $.T "register" }}" class="form-input"></input>
</form>
</div>
</div>
<script type="text/javascript" charset="utf-8">function terms() {alert("just don't be a dick thx");}</script>
{{end}}
<!--<p>{{call $.T "terms_conditions_full" }}</p> -->
{{end}}