1 [% META title = 'Site preferences' %]
3 <form action="[% c.uri_for('changeStylesheet') %]" method="post"><fieldset> <legend>Style</legend>
4 Stylesheet: <select name="stylesheet">
5 [% FOR style IN stylesheets %]
6 <option value="[% style %]" [% IF style == user.css %]selected[% END %]>[% style %]</option>
10 <input type="submit" value="Change">
12 <form action="[% c.uri_for('changeDiscordId') %]" method="post"><fieldset> <legend>Discord ID</legend>
13 <input type="text" name="discord_id" value="[% discord_id | html %]" class="discord_id">
14 <br><input type="submit" value="Change">
16 <form action="[% c.uri_for('changeEmail') %]" method="post"><fieldset> <legend>Email</legend>
17 <input type="text" name="email" value="[% email | html %]" class="email">
18 <br><input type="submit" value="Change">
20 <form action="[% c.uri_for('changeBirthday') %]" method="post"><fieldset> <legend>Birthday</legend>
22 <input type="text" name="birthday" value="[% birthday %]" id="birthday">
23 <br><input type="submit" value="Change">
25 <form action="[% c.uri_for('changePassword') %]" method="post"> <fieldset> <legend>Change password</legend>
27 <input type="password" name="oldpass" value="">
29 <input type="password" name="pass" value="">
30 <input type="submit" value="Submit">
34 <fieldset> <legend>Timezone</legend>
35 <select name="category" id="tzcategory">
36 [% FOR cat IN tzcategories %]
37 <option value="[% cat %]" [% IF cat == timezone.0 %]selected[% END %]>[% cat %]</option>
40 <select name="country" id="tzcountry">
41 [% FOR country IN tzcountries %]
42 <option value="[% country %]" [% IF country == timezone.1 %]selected[% END %]>[% country %]</option>
45 <form action="[% c.uri_for('changeTimezone') %]" method="post">
46 <p><input type="text" name="timezone" value="[% timezone.join("/") %]" id="timezone">
47 <input type="submit" value="Change"></p>
48 <p>Remember that GMT stays the same all year, so if you're in the UK you should pick Europe/London.</p>
50 [%- site.stylesheets = ['ui/ui.datepicker.css'] %]
51 <script type="text/javascript" src="/static/ui/ui.core.min.js"></script>
52 <script type="text/javascript" src="/static/ui/ui.datepicker.min.js"></script>
54 <script type="text/javascript">
55 $(document).ready(function(){
56 $("#birthday").datepicker({
58 dateFormat: $.datepicker.ATOM,
62 $("#tzcategory").change(function(){
63 if ($(this).val() == 'GMT'){
64 $("#timezone").val($(this).val());
65 $("#tzcountry").empty();
67 $.get("/jsrpc/tzcountries/" + $(this).val(),function(xml){
68 $("#tzcountry").empty();
69 $("country",xml).each(function(i){
70 var opt = $('<option>');
71 $("#tzcountry").append(opt);
72 opt.attr('value',$(this).text()).text($(this).text());
74 $("#tzcountry").change();
78 $("#tzcountry").change(function(){
79 $("#timezone").val($("#tzcategory").val() + '/' + $(this).val());