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('changeBirthday') %]" method="post"><fieldset> <legend>Birthday</legend>
14 <input type="text" name="birthday" value="[% birthday %]" id="birthday">
15 <br><input type="submit" value="Change">
17 <form action="[% c.uri_for('changePassword') %]" method="post"> <fieldset> <legend>Change password</legend>
19 <input type="password" name="oldpass" value="">
21 <input type="password" name="pass" value="">
22 <input type="submit" value="Submit">
26 <fieldset> <legend>Timezone</legend>
27 <select name="category" id="tzcategory">
28 [% FOR cat IN tzcategories %]
29 <option value="[% cat %]" [% IF cat == timezone.0 %]selected[% END %]>[% cat %]</option>
32 <select name="country" id="tzcountry">
33 [% FOR country IN tzcountries %]
34 <option value="[% country %]" [% IF country == timezone.1 %]selected[% END %]>[% country %]</option>
37 <form action="[% c.uri_for('changeTimezone') %]" method="post">
38 <p><input type="text" name="timezone" value="[% timezone.join("/") %]" id="timezone">
39 <input type="submit" value="Change"></p>
40 <p>Remember that GMT stays the same all year, so if you're in the UK you should pick Europe/London.</p>
42 [%- site.stylesheets = ['ui/ui.datepicker.css'] %]
43 <script type="text/javascript" src="/static/ui/ui.core.min.js"></script>
44 <script type="text/javascript" src="/static/ui/ui.datepicker.min.js"></script>
46 <script type="text/javascript">
47 $(document).ready(function(){
48 $("#birthday").datepicker({
50 dateFormat: $.datepicker.ATOM,
54 $("#tzcategory").change(function(){
55 if ($(this).val() == 'GMT'){
56 $("#timezone").val($(this).val());
57 $("#tzcountry").empty();
59 $.get("/jsrpc/tzcountries/" + $(this).val(),function(xml){
60 $("#tzcountry").empty();
61 $("country",xml).each(function(i){
62 var opt = $('<option>');
63 $("#tzcountry").append(opt);
64 opt.attr('value',$(this).text()).text($(this).text());
69 $("#tzcountry").change(function(){
70 $("#timezone").val($("#tzcategory").val() + '/' + $(this).val());