slitaz-forge view bugs/templates/slitaz/html/user.item.html @ rev 73

Tiny edits
author Paul Issott <paul@slitaz.org>
date Thu Apr 14 20:59:10 2011 +0100 (2011-04-14)
parents
children
line source
1 <!-- dollarId: user.item,v 1.7 2002/08/16 04:29:04 richard Exp dollar-->
2 <tal:doc metal:use-macro="templates/page/macros/icing"
3 define="edit_ok context/is_edit_ok"
4 >
5 <title metal:fill-slot="head_title">
6 <tal:if condition="context/id" i18n:translate=""
7 >User <tal:x content="context/id" i18n:name="id"
8 />: <tal:x content="context/username" i18n:name="title"
9 /> - <tal:x content="config/TRACKER_NAME" i18n:name="tracker"
10 /></tal:if>
11 <tal:if condition="not:context/id" i18n:translate=""
12 >New User - <span tal:replace="config/TRACKER_NAME" i18n:name="tracker"
13 /></tal:if>
14 </title>
15 <metal:slot fill-slot="more-javascript">
16 <script metal:use-macro="templates/page/macros/user_utils"></script>
17 <script type="text/javascript" src="@@file/help_controls.js"></script>
18 </metal:slot>
19 <tal:block metal:fill-slot="body_title"
20 define="edit_ok context/is_edit_ok">
21 <span tal:condition="python: not (context.id or edit_ok)"
22 tal:omit-tag="python:1" i18n:translate="">New User</span>
23 <span tal:condition="python: not context.id and edit_ok"
24 tal:omit-tag="python:1" i18n:translate="">New User Editing</span>
25 <span tal:condition="python: context.id and not edit_ok"
26 tal:omit-tag="python:1" i18n:translate="">User<tal:x
27 replace="context/id" i18n:name="id" /></span>
28 <span tal:condition="python: context.id and edit_ok"
29 tal:omit-tag="python:1" i18n:translate="">User<tal:x
30 replace="context/id" i18n:name="id" /> Editing</span>
31 </tal:block>
33 <td class="content" metal:fill-slot="content">
35 <p tal:condition="python:not (context.is_view_ok()
36 or request.user.hasRole('Anonymous'))" i18n:translate="">
37 You are not allowed to view this page.</p>
39 <p tal:condition="python:not context.is_view_ok()
40 and request.user.hasRole('Anonymous')" i18n:translate="">
41 Please login with your username and password.</p>
43 <div tal:condition="context/is_view_ok">
45 <form method="post"
46 name="itemSynopsis"
47 tal:define="required python:'username address'.split()"
48 enctype="multipart/form-data"
49 tal:attributes="action context/designator;
50 onSubmit python:'return checkRequiredFields(\'%s\')'%'\', \''.join(required);
51 ">
52 <table class="form" tal:define="
53 th_label templates/page/macros/th_label;
54 src_input templates/page/macros/user_src_input;
55 normal_input templates/page/macros/user_normal_input;
56 pw_input templates/page/macros/user_pw_input;
57 confirm_input templates/page/macros/user_confirm_input;
58 edit_ok context/is_edit_ok;
59 ">
60 <tr tal:define="name string:realname; label string:Name; value context/realname; edit_ok edit_ok">
61 <th metal:use-macro="th_label">Name</th>
62 <td><input name="realname" metal:use-macro="src_input"></td>
63 </tr>
64 <tr tal:define="name string:username; label string:Login Name; value context/username">
65 <th metal:use-macro="th_label">Login Name</th>
66 <td><input metal:use-macro="src_input"></td>
67 </tr>
68 <tal:if condition="edit_ok">
69 <tr tal:define="name string:password; label string:Login Password">
70 <th metal:use-macro="th_label">Login Password</th>
71 <td><input metal:use-macro="pw_input" type="password"></td>
72 </tr>
73 <tr tal:define="name string:password; label string:Confirm Password">
74 <th metal:use-macro="th_label">Confirm Password</th>
75 <td><input metal:use-macro="confirm_input" type="password"></td>
76 </tr>
77 </tal:if>
78 <tal:if condition="python:request.user.hasPermission('Web Roles')">
79 <tr tal:define="name string:roles; label string:Roles;">
80 <th><label for="roles" i18n:translate="">Roles</label></th>
81 <td tal:define="gips context/id">
82 <tal:subif condition=gips define="value context/roles">
83 <input metal:use-macro="normal_input">
84 </tal:subif>
85 <tal:subif condition="not:gips" define="value db/config/NEW_WEB_USER_ROLES">
86 <input metal:use-macro="normal_input">
87 </tal:subif>
88 <tal:block i18n:translate="">(to give the user more than one role,
89 enter a comma,separated,list)</tal:block>
90 </td>
91 </tr>
92 </tal:if>
94 <tr tal:define="name string:website; label string:Website; value context/website">
95 <th metal:use-macro="th_label">Website</th>
96 <td><input name="website" metal:use-macro="normal_input"></td>
97 </tr>
99 <tr tal:condition="python:edit_ok or context.timezone"
100 tal:define="name string:timezone; label string:Timezone; value context/timezone">
101 <th metal:use-macro="th_label">Timezone</th>
102 <td><input name="timezone" metal:use-macro="normal_input">
103 <tal:block tal:condition="edit_ok" i18n:translate="">(this is a numeric hour offset, the default is
104 <span tal:replace="db/config/DEFAULT_TIMEZONE" i18n:name="zone"
105 />)</tal:block>
106 </td>
107 </tr>
109 <tr tal:define="name string:address; label string:E-mail address; value context/address">
110 <th metal:use-macro="th_label">E-mail address</th>
111 <td tal:define="mailto python:context.address.field(id='address');
112 mklink python:mailto and not edit_ok">
113 <a href="mailto:calvin@the-z.org"
114 tal:attributes="href string:mailto:$value"
115 tal:content="value"
116 tal:condition="python:mklink">calvin@the-z.org</a>
117 <tal:if condition=edit_ok>
118 <input metal:use-macro="src_input" value="calvin@the-z.org">
119 </tal:if>
120 &nbsp;
121 </td>
122 </tr>
124 <tr>
125 <th><label for="alternate_addresses" i18n:translate="">Alternate E-mail addresses<br>One address per line</label></th>
126 <td>
127 <textarea rows=5 cols=40 tal:replace="structure context/alternate_addresses/multiline">nobody@nowhere.org
128 anybody@everywhere.net
129 (alternate_addresses)
130 </textarea>
131 </td>
132 </tr>
134 <tr tal:condition="edit_ok">
135 <td>
136 &nbsp;
137 <input type="hidden" name="@template" value="item">
138 <input type="hidden" name="@required" value="username,address"
139 tal:attributes="value python:','.join(required)">
140 </td>
141 <td><input type="submit" value="save" tal:replace="structure context/submit"><!--submit button here-->
142 <input type=reset>
143 </td>
144 </tr>
145 </table>
146 </form>
148 <tal:block tal:condition="not:context/id" i18n:translate="">
149 <table class="form">
150 <tr>
151 <td>Note:&nbsp;</td>
152 <th class="required">highlighted</th>
153 <td>&nbsp;fields are required.</td>
154 </tr>
155 </table>
156 </tal:block>
158 <tal:block tal:condition="context/id" tal:replace="structure context/history" />
160 </div>
162 </td>
164 </tal:doc>
165 <!-- SHA: bfc3a0fd9a3a54b3b1d1d7bfeb43191237af5184 -->