Premiere version : mise en route du suivi.
[auf_roundup.git] / share / roundup / templates / minimal / html / user.item.html
1 <tal:doc metal:use-macro="templates/page/macros/icing"
2 define="edit_ok context/is_edit_ok"
3 >
4 <title metal:fill-slot="head_title">
5 <tal:if condition="context/id" i18n:translate=""
6 >User <tal:x content="context/id" i18n:name="id"
7 />: <tal:x content="context/username" i18n:name="title"
8 /> - <tal:x content="config/TRACKER_NAME" i18n:name="tracker"
9 /></tal:if>
10 <tal:if condition="not:context/id" i18n:translate=""
11 >New User - <span tal:replace="config/TRACKER_NAME" i18n:name="tracker"
12 /></tal:if>
13 </title>
14 <metal:slot fill-slot="more-javascript">
15 <script metal:use-macro="templates/page/macros/user_utils"></script>
16 <script type="text/javascript" src="@@file/help_controls.js"></script>
17 </metal:slot>
18 <tal:block metal:fill-slot="body_title"
19 define="edit_ok context/is_edit_ok">
20 <span tal:condition="python: not (context.id or edit_ok)"
21 tal:omit-tag="python:1" i18n:translate="">New User</span>
22 <span tal:condition="python: not context.id and edit_ok"
23 tal:omit-tag="python:1" i18n:translate="">New User Editing</span>
24 <span tal:condition="python: context.id and not edit_ok"
25 tal:omit-tag="python:1" i18n:translate="">User<tal:x
26 replace="context/id" i18n:name="id" /></span>
27 <span tal:condition="python: context.id and edit_ok"
28 tal:omit-tag="python:1" i18n:translate="">User<tal:x
29 replace="context/id" i18n:name="id" /> Editing</span>
30 </tal:block>
31
32 <td class="content" metal:fill-slot="content">
33
34 <p tal:condition="python:not (context.is_view_ok()
35 or request.user.hasRole('Anonymous'))" i18n:translate="">
36 You are not allowed to view this page.</p>
37
38 <p tal:condition="python:not context.is_view_ok()
39 and request.user.hasRole('Anonymous')" i18n:translate="">
40 Please login with your username and password.</p>
41
42 <div tal:condition="context/is_view_ok">
43
44 <form method="POST"
45 name="itemSynopsis"
46 tal:define="required python:'username address'.split()"
47 enctype="multipart/form-data"
48 tal:attributes="action context/designator;
49 onSubmit python:'return checkRequiredFields(\'%s\')'%'\', \''.join(required);
50 ">
51 <table class="form" tal:define="
52 th_label templates/page/macros/th_label;
53 src_input templates/page/macros/user_src_input;
54 normal_input templates/page/macros/user_normal_input;
55 pw_input templates/page/macros/user_pw_input;
56 confirm_input templates/page/macros/user_confirm_input;
57 edit_ok context/is_edit_ok;
58 ">
59 <tr tal:define="name string:username; label string:Login Name; value context/username">
60 <th metal:use-macro="th_label">Login Name</th>
61 <td><input metal:use-macro="src_input"></td>
62 </tr>
63 <tal:if condition="edit_ok">
64 <tr tal:define="name string:password; label string:Login Password">
65 <th metal:use-macro="th_label">Login Password</th>
66 <td><input metal:use-macro="pw_input" type="password"></td>
67 </tr>
68 <tr tal:define="name string:password; label string:Confirm Password">
69 <th metal:use-macro="th_label">Confirm Password</th>
70 <td><input metal:use-macro="confirm_input" type="password"></td>
71 </tr>
72 </tal:if>
73 <tal:if condition="python:request.user.hasPermission('Web Roles')">
74 <tr tal:define="name string:roles; label string:Roles;">
75 <th><label for="roles" i18n:translate="">Roles</label></th>
76 <td tal:define="gips context/id">
77 <tal:subif condition=gips define="value context/roles">
78 <input metal:use-macro="normal_input">
79 </tal:subif>
80 <tal:subif condition="not:gips" define="value db/config/NEW_WEB_USER_ROLES">
81 <input metal:use-macro="normal_input">
82 </tal:subif>
83 <tal:block i18n:translate="">(to give the user more than one role,
84 enter a comma,separated,list)</tal:block>
85 </td>
86 </tr>
87 </tal:if>
88
89 <tr tal:condition="edit_ok">
90 <td>
91 &nbsp;
92 <input type="hidden" name="@template" value="item">
93 <input type="hidden" name="@required" value="username,address"
94 tal:attributes="value python:','.join(required)">
95 </td>
96 <td><input type="submit" value="save" tal:replace="structure context/submit"><!--submit button here-->
97 <input type=reset>
98 </td>
99 </tr>
100 </table>
101 </form>
102
103 <tal:block tal:condition="not:context/id" i18n:translate="">
104 <table class="form">
105 <tr>
106 <td>Note:&nbsp;</td>
107 <th class="required">highlighted</th>
108 <td>&nbsp;fields are required.</td>
109 </tr>
110 </table>
111 </tal:block>
112
113 <tal:block tal:condition="context/id" tal:replace="structure context/history" />
114
115 </div>
116
117 </td>
118
119 </tal:doc>