3ec367a759
* 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
32 lignes
1,1 Kio
HTML
32 lignes
1,1 Kio
HTML
{{define "title"}}{{call $.T "change_language"}}{{end}}
|
|
{{define "content"}}
|
|
<div class="blockBody">
|
|
<hr>
|
|
<form role="form" method="POST">
|
|
{{ block "csrf_field" $ }}{{end}}
|
|
<div class="form-group">
|
|
<h3>{{call $.T "language"}}</h3>
|
|
<select id="language" name="language" class="form-input">
|
|
{{ $currentLanguage := .Language }}
|
|
{{ range $tag, $translatedName := $.Languages }}
|
|
<option value="{{ $tag }}" {{ if eq $currentLanguage $tag }}selected{{end}}>{{ $translatedName }}</option>
|
|
{{ end }}
|
|
</select>
|
|
<h3>{{call $.T "theme"}}</h3>
|
|
<select id="theme-selector" name="theme" class="form-input" onchange="switchThemes()">
|
|
<option value="">{{call $.T "theme_select"}}</option>
|
|
<option value="g"{{ if eq $.Theme "g" }} selected{{end}}>/g/</option>
|
|
<option value="tomorrow"{{ if eq $.Theme "tomorrow" }} selected{{end}}>Tomorrow</option>
|
|
<option value=""{{ if eq $.Theme "" }} selected{{end}}>{{call $.T "theme_none"}}</option>
|
|
</select>
|
|
</br>
|
|
</br>
|
|
<button type="submit" class="form-input btn">{{call $.T "save_changes"}}</button>
|
|
</div>
|
|
|
|
</form>
|
|
<div style="padding-bottom: 1em"></div>
|
|
</div>
|
|
{{end}}
|
|
|
|
|