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 2773fe200d Golint friendly (#747)
* Making the code Golint friendly

* No exported variables when not needed
* Same for functions
* Simplifying Templates variables with a form basic template variable
and a modelList basic template variable

* Adapted templates to new template variables

* use of .Models instead of model list
* use of .Form instead of modelform

* Small fix

* Small fix 2

Forgot $.Form

* Reverting templateDir as a var
2017-05-25 21:54:58 +02:00

44 lignes
2,2 Kio
HTML

{{define "title"}}{{ call $.T "register_title" }}{{end}}
{{define "contclass"}}cont-view{{end}}
{{define "content"}}
{{ with .Form }}
<div class="box">
<form role="form" method="POST">
<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>
<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}}