add: Hidden form parameters
[jelmer/swat.git] / swat / templates / default / component / account-user-form.mako
1 <%doc>
2 #
3 # User Account Editing Form Mako Template file for SWAT
4 #
5 # This program is free software; you can redistribute it and/or modify
6 # it under the terms of the GNU General Public License as published by
7 # the Free Software Foundation; either version 3 of the License, or
8 # (at your option) any later version.
9 #   
10 # This program is distributed in the hope that it will be useful,
11 # but WITHOUT ANY WARRANTY; without even the implied warranty of
12 # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
13 # GNU General Public License for more details.
14 #   
15 # You should have received a copy of the GNU General Public License
16
17 </%doc>
18
19 <%namespace name="field" file="/default/component/form-fields.mako" />
20
21 <%def name="write()">
22     ${h.form('', method="post", id="user-account-form", class_="share-configuration")}
23         <ol class="tab-list">
24             <li id="tab1" class="active">
25                 <h3><a title="${_('Basic User Configuration')}" class="title-icon basic-tab" href="#">${_('Basic')}</a></h3>                           
26             </li>
27             <li id="tab2">
28                 <h3><a title="${_('Account Status')}" class="title-icon basic-tab" href="#">${_('Status')}</a></h3>                           
29             </li>
30             <li id="tab3">
31                 <h3><a title="${_('User Profile Storage')}" class="title-icon basic-tab" href="#">${_('Profile')}</a></h3>                           
32             </li>
33             <li id="tab4">
34                 <h3><a title="${_('Assigned Groups')}" class="title-icon basic-tab" href="#">${_('Groups')}</a></h3>                           
35             </li>
36         </ol>
37     
38         <ul class="tab-list-items"> 
39             <li id="content-tab1" class="active tab">
40                 <ol class="col-1">
41                     <li>${field.put("username", c.user.username)}</li>
42                     <li>${field.put("fullname", c.user.fullname)}</li>
43                     <li>${field.put("description", c.user.description)}</li>
44                     <li>${field.put("password", "")}</li>
45                     <li>${field.put("confirmpassword", "")}</li>
46                 </ol>
47             </li>
48             
49             <li id="content-tab2" class="tab">
50                 <ol class="col-1">
51                     <li>${field.put("mustchange", c.user.must_change_password)}</li>
52                     <li>${field.put("cannotchange", c.user.cannot_change_password)}</li>
53                     <li>${field.put("neverexpires", c.user.password_never_expires)}</li>
54                     <li>${field.put("disabled", c.user.account_disabled)}</li>
55                     <li>${field.put("locked", c.user.account_locked_out)}</li>
56                 </ol>
57             </li>
58             
59             <li id="content-tab3" class="tab">
60                 <ol class="col-1">
61                     <li>${field.put("profilepath", c.user.profile_path)}</li>
62                     <li>${field.put("logonscriptname", c.user.logon_script)}</li>
63                     <li>${field.put("homedirpath", c.user.homedir_path)}</li>
64                     <li>${field.put("maphomedirdrive", c.user.map_homedir_drive)}</li>
65                 </ol>
66             </li>
67
68             <li id="content-tab4" class="tab">
69                 <ol class="col-1">
70                     <%
71                     group_ids = []
72                     for g in c.user.group_list:
73                         group_ids.append(g.rid)
74                     %>
75                     <li>${field.put("groups", group_ids)}</li>
76                 </ol>
77             </li>
78         </ul>
79      
80         <div>
81             ${h.hidden("task", request.environ['pylons.routes_dict']['action'])}
82             ${h.hidden("id", c.user.rid)}
83             ${h.hidden("type", "user")}
84         </div>
85     ${h.end_form()}
86 </%def>