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('changeEmail') %]" method="post"><fieldset> <legend>Email</legend>
13 <input type="text" name="email" value="[% email | html %]" class="email">
14 <br><input type="submit" value="Change">
16 <form action="[% c.uri_for('changeBirthday') %]" method="post"><fieldset> <legend>Birthday</legend>
18 <input type="text" name="birthday" value="[% birthday %]" id="birthday">
19 <br><input type="submit" value="Change">
21 <form action="[% c.uri_for('changePassword') %]" method="post"> <fieldset> <legend>Change password</legend>
23 <input type="password" name="oldpass" value="">
25 <input type="password" name="pass" value="">
26 <input type="submit" value="Submit">
30 <fieldset> <legend>Timezone</legend>
31 <select name="category" id="tzcategory">
32 [% FOR cat IN tzcategories %]
33 <option value="[% cat %]" [% IF cat == timezone.0 %]selected[% END %]>[% cat %]</option>
36 <select name="country" id="tzcountry">
37 [% FOR country IN tzcountries %]
38 <option value="[% country %]" [% IF country == timezone.1 %]selected[% END %]>[% country %]</option>
41 <form action="[% c.uri_for('changeTimezone') %]" method="post">
42 <p><input type="text" name="timezone" value="[% timezone.join("/") %]" id="timezone">
43 <input type="submit" value="Change"></p>
44 <p>Remember that GMT stays the same all year, so if you're in the UK you should pick Europe/London.</p>
46 [%- site.stylesheets = ['ui/ui.datepicker.css'] %]
47 <script type="text/javascript" src="/static/ui/ui.core.min.js"></script>
48 <script type="text/javascript" src="/static/ui/ui.datepicker.min.js"></script>
50 <script type="text/javascript">
51 $(document).ready(function(){
52 $("#birthday").datepicker({
54 dateFormat: $.datepicker.ATOM,
58 $("#tzcategory").change(function(){
59 if ($(this).val() == 'GMT'){
60 $("#timezone").val($(this).val());
61 $("#tzcountry").empty();
63 $.get("/jsrpc/tzcountries/" + $(this).val(),function(xml){
64 $("#tzcountry").empty();
65 $("country",xml).each(function(i){
66 var opt = $('<option>');
67 $("#tzcountry").append(opt);
68 opt.attr('value',$(this).text()).text($(this).text());
70 $("#tzcountry").change();
74 $("#tzcountry").change(function(){
75 $("#timezone").val($("#tzcategory").val() + '/' + $(this).val());