~ubuntu-branches/ubuntu/gutsy/prewikka/gutsy

« back to all changes in this revision

Viewing changes to prewikka/templates/UserSettings.tmpl

  • Committer: Bazaar Package Importer
  • Author(s): Pierre Chifflier
  • Date: 2007-04-11 14:41:09 UTC
  • Revision ID: james.westby@ubuntu.com-20070411144109-2hh7zx3amwd27b4l
Tags: upstream-0.9.10
ImportĀ upstreamĀ versionĀ 0.9.10

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
#extends prewikka.templates.ClassicLayout
 
2
 
 
3
#block main_content
 
4
#filter CleanOutput
 
5
 
 
6
<div id="fieldset_page" style="width: 430px;">
 
7
 
 
8
<form action="?" method="post">
 
9
#if $user.login
 
10
<input type="hidden" name="view" value="user_settings_modify"/>
 
11
#else
 
12
<input type="hidden" name="view" value="user_settings_add"/>
 
13
#end if
 
14
 
 
15
<input type="hidden" name="login" value="$user.login"/>
 
16
 
 
17
<fieldset class="fieldset_heading">
 
18
 <legend>$_("Account informations")</legend>
 
19
 
 
20
  <table>
 
21
#if $user.login
 
22
   <tr>
 
23
    <th style="vertical-align: middle;">$_("Login:")</th>
 
24
    <td style="text-align:right; vertical-align: middle;">
 
25
     <h2 style="vertical-align: middle; padding:0px; margin:0px;"><b>$user.login</b></h2>
 
26
    </td>
 
27
   </tr>
 
28
#else
 
29
 
 
30
   #if $errmsg
 
31
   <tr>
 
32
        <td colspan=2><font style="color: red;">$errmsg</font></td>
 
33
   </tr>
 
34
   #end if
 
35
 
 
36
   <tr>
 
37
    <th>Login:</th>
 
38
    <td style="text-align: right;"><input type="text" name="login"/></td>
 
39
   </tr>
 
40
#end if
 
41
 
 
42
 
 
43
#set $row_classes = ("table_row_even", "table_row_odd")
 
44
 
 
45
<tr class="nodash" style="padding:0; margin:0;">
 
46
 <th class="nodash">$_("Permissions:")</th>
 
47
 <td class="nodash"></td>
 
48
</tr>
 
49
 
 
50
<tr style="padding:0; margin:0;">
 
51
 <td colspan=2>
 
52
 <table>
 
53
 
 
54
#set $cnt = 0
 
55
#set $checked_cnt = 0
 
56
 
 
57
#if $can_manage_user
 
58
 #set $disabled = ""
 
59
#else
 
60
 #set $disabled = "disabled=\"disabled\""
 
61
#end if
 
62
 
 
63
      #for $perm, $value in $user.permissions
 
64
      <tr class="$row_classes[$cnt%2]">
 
65
       <td style="text-align: left;">$perm</td>
 
66
       <td style="text-align: right;">
 
67
        #if $value
 
68
         #set $checked_cnt += 1
 
69
         #set $checked = "checked=\"checked\""
 
70
        #else
 
71
         #set $checked = ""
 
72
        #end if
 
73
        <input class="checkbox" type="checkbox" name="permissions" value="$perm" $checked $disabled />
 
74
       </td>
 
75
      </tr>
 
76
      #set $cnt += 1
 
77
      #end for
 
78
<tr class="nodash">
 
79
 <td class="nodash">&nbsp;</td>
 
80
 
 
81
#if $cnt == $checked_cnt
 
82
 #set $checked = "checked=\"checked\""
 
83
#else
 
84
  #set $checked = ""
 
85
#end if
 
86
 
 
87
 <td class="nodash"style="text-align: right;"><b>Check All</b>
 
88
  <input $checked $disabled class="checkbox" type="checkbox" id="allbox" onclick="checkBoxByName('permissions', document.forms[0].allbox.checked);"/>
 
89
 </td>
 
90
</tr>
 
91
 
 
92
     </table>
 
93
</td></tr>
 
94
 
 
95
</table>
 
96
</fieldset>
 
97
<br/>
 
98
 
 
99
#if $can_change_password
 
100
<fieldset>
 
101
  <legend>$_("Change password")</legend>
 
102
  <table>
 
103
    #if $ask_current_password
 
104
    <tr>
 
105
      <th>$_("Current password:")</th>
 
106
      <td><input type="password" name="password_current"/></td>
 
107
    </tr>
 
108
    #end if
 
109
    <tr>
 
110
      <th>$_("New password:")</th>
 
111
      <td><input type="password" name="password_new"/></td>
 
112
    </tr>
 
113
    <tr>
 
114
      <th>$_("Confirm new password:")</th>
 
115
      <td><input type="password" name="password_new_confirmation"/></td>
 
116
    </tr>
 
117
  </table>
 
118
</fieldset>
 
119
<br/>
 
120
#end if
 
121
 
 
122
<input type="submit" value="$_("Submit Changes")"/>
 
123
 
 
124
</form>
 
125
</div>
 
126
 
 
127
#end filter
 
128
#end block main_content