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/login.html
Ramon Dantas 1968d2ae54 Move translation func to template variables (#652)
* Add T field to template variables

* Remove languages.SetTranslationFromRequest

* Add Tfunc on handlers

* Remove T and Ts from template_functions

* Update templates

Change the templates to use the local Tfunc, instead of the global one.
Also changed the signature of the fields on template_variables.go, so that
they return a template.HTML to avoid escaping problems.

* Remove unnecessary variable
2017-05-21 08:38:28 +10:00

51 lignes
2,1 Kio
HTML

{{define "title"}}{{ call $.T "sign_in_title" }}{{end}}
{{define "contclass"}}cont-view{{end}}
{{define "content"}}
<div class="blockBody">
<div class="row" style="margin-top:20px">
<div class="col-xs-12 col-sm-8 col-md-6 col-sm-offset-2 col-md-offset-3">
{{ with .LoginForm }}
<form role="form" method="POST">
<fieldset>
<h2>{{call $.T "sign_in_box_title"}}</h2>
<hr class="colorgraph">
{{ range (index $.FormErrors "errors")}}
<div class="alert alert-danger">{{ . }}</div>
{{end}}
<div class="form-group">
<input type="text" name="username" id="username" class="form-control input-lg" autofocus placeholder="{{ call $.T "email_address_or_username"}}">
{{ range (index $.FormErrors "username")}}
<p class="text-error">{{ . }}</p>
{{end}}
</div>
<div class="form-group">
<input type="password" name="password" id="password" class="form-control input-lg" placeholder="{{ call $.T "password"}}">
{{ range (index $.FormErrors "password")}}
<p class="text-error">{{ . }}</p>
{{end}}
</div>
<!-- <span class="button-checkbox">
<button type="button" class="btn hidden" data-color="info">{{ call $.T "remember_me"}}</button>
<input type="checkbox" name="remember_me" id="remember_me" checked="checked">
<a href="" class="btn btn-link pull-right">{{ call $.T "forgot_password"}}</a>
</span> -->
<hr class="colorgraph">
<div class="row">
<div class="col-xs-6 col-sm-6 col-md-6">
<input type="submit" class="btn btn-lg btn-success btn-block" value="{{ call $.T "signin"}}">
</div>
<div class="col-xs-6 col-sm-6 col-md-6">
<a href="{{ genRoute "user_register" }}" class="btn btn-lg btn-primary btn-block">{{ call $.T "register"}}</a>
</div>
</div>
</fieldset>
</form>
{{end}}
</div>
</div>
<br />
<br />
</div>
{{end}}
{{define "js_footer"}}<script type="text/javascript" charset="utf-8" src="{{.URL.Parse "/js/registerPage.js"}}"></script>{{end}}