Added Theme field in user settings
Cette révision appartient à :
Parent
a7d621f048
révision
c570557477
3 fichiers modifiés avec 15 ajouts et 4 suppressions
|
@ -67,6 +67,7 @@ type UserForm struct {
|
|||
Password string `form:"password" len_min:"6" len_max:"72" equalInput:"ConfirmPassword"`
|
||||
ConfirmPassword string `form:"password_confirmation" omit:"true"`
|
||||
Status int `form:"status" default:"0"`
|
||||
Theme string `form:"theme"`
|
||||
}
|
||||
|
||||
// UserSettingsForm is used when updating a user.
|
||||
|
|
|
@ -45,6 +45,16 @@
|
|||
<p class="text-error">{{ . }}</p>
|
||||
{{end}}
|
||||
<h3>{{ call $.T "preferences"}}</h3>
|
||||
<label class="input-label" for="theme">{{call $.T "theme"}}</label> <br>
|
||||
<select id="theme-selector" name="theme" class="form-input up-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>
|
||||
{{ range (index $.FormErrors "theme")}}
|
||||
<p class="text-error">{{ . }}</p>
|
||||
{{end}}
|
||||
{{ with .Settings }}
|
||||
{{ if DefaultUserSettings "new_torrent"}}
|
||||
<label class="input-label">{{ call $.T "new_torrent_settings" }}:</label> <br>
|
||||
|
|
|
@ -13,10 +13,10 @@
|
|||
</select>
|
||||
<h3>{{call $.T "theme"}}</h3>
|
||||
<select id="theme-selector" name="theme" class="form-input" onchange="switchThemes()">
|
||||
<option value="{{$.Theme}}" selected>{{call $.T "theme_select"}}</option>
|
||||
<option value="g">/g/</option>
|
||||
<option value="tomorrow">Tomorrow</option>
|
||||
<option value="">{{call $.T "theme_none"}}</option>
|
||||
<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>
|
||||
|
|
Référencer dans un nouveau ticket