1968d2ae54
* 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
50 lignes
2,1 Kio
HTML
50 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}}
|