1 <html
2 tal:define="form request/form/form/value;
3 field request/form/property/value"
4 >
5 <head>
6 <title>Search input for user helper</title>
7 <script language="Javascript" type="text/javascript"
8 tal:content="structure string:<!--
9 // this is the name of the field in the original form that we're working on
10 form = parent.opener.document.${form};
11 field = '${field}';
12 //-->">
13 </script>
14 <script type="text/javascript" src="@@file/help_controls.js"></script>
15 <link rel="stylesheet" type="text/css" href="@@file/style.css" />
16 </head>
17 <body onload="parent.submit.url='...'"
18 tal:define="
19 qs request/env/QUERY_STRING;
20 qs python:'&'.join([a for a in qs.split('&') if not a.startswith('@template=')])"
21 >
22 <pre tal:content="request/env/QUERY_STRING" tal:condition=false />
23 <form method="GET" name="itemSynopsis"
24 target="list"
25 tal:attributes="action request/classname"
26 tal:define="
27 property request/form/property/value;
28 cols python:request.columns or 'id username address realname roles'.split();
29 sort_on request/sort | nothing;
30 sort_desc python:sort_on and request.sort[0][0] == '-';
31 sort_on python:sort_on and request.sort[0][1] or 'lastname';
33 search_input templates/page/macros/search_input;
34 search_select templates/page/macros/search_select;
35 search_select_roles templates/page/macros/search_select_roles;
36 required python:[];
37 th_label templates/page/macros/th_label;
38 ">
39 <input type="hidden" name="@template" value="help-list">
40 <input type="hidden" name="property" value="" tal:attributes="value property">
41 <input type="hidden" name="form" value="" tal:attributes="value request/form/form/value">
42 <table>
43 <tr tal:define="name string:username; label string:Username:">
44 <th metal:use-macro="th_label">Name</th>
45 <td metal:use-macro="search_input"><input type=text></td>
46 </tr>
48 <tr tal:define="name string:phone; label string:Phone number">
49 <th metal:use-macro="th_label">Phone</th>
50 <td metal:use-macro="search_input"><input type=text></td>
51 </tr>
53 <tr tal:define="name string:roles;
54 onchange string:this.form.submit();
55 label string:Roles:"
56 >
57 <th metal:use-macro="th_label">role</th>
58 <td metal:use-macro="search_select_roles">
59 <select>
60 <option value="">jokester</option>
61 </select>
62 </td>
63 </tr>
65 <tr>
66 <td> </td>
67 <td>
68 <input type="hidden" name="@action" value="search">
69 <input type="submit" value="Search" i18n:attributes="value">
70 <input type="reset">
71 <input type="hidden" value="username,realname,phone,organisation,roles" name="properties">
72 <input type="text" name="@pagesize" id="sp-pagesize" value="25" size="2">
73 <label for="sp-pagesize" i18n:translate="">Pagesize</label>
74 </td>
75 </tr>
77 </table>
79 </form>
80 <pre tal:content="request" tal:condition=false />
81 <script type="text/javascript"><!--
82 focus2id('username');
83 //--></script>
84 </body>
85 </html>