source: main/waeup.sirp/branches/ulif-fasttables/src/waeup/sirp/jambtables/dictwidget.pt @ 5274

Last change on this file since 5274 was 5274, checked in by uli, 14 years ago

Add a dict widget. This is not in a very usable state, as it does not preserve order of fields and can't, because dicts have no order.

File size: 1.5 KB
Line 
1<table border="0" class="sequencewidget"
2  i18n:domain="zope">
3  <div tal:repeat="widget view/widgets"
4       tal:omit-tag="">
5    <tr tal:condition="repeat/widget/start">
6      <th></th>
7      <th>
8        <span tal:replace="python: widget[0].label">Key Label</span>
9      </th>
10      <th>
11        <span tal:replace="python: widget[1].label">Value Label</span>
12      </th>
13    </tr>
14    <tr>
15      <td>
16        <input class="editcheck" type="checkbox"
17               tal:attributes="
18                  name string:${view/name}.remove_${repeat/widget/index}"
19               tal:condition="view/need_delete" />
20      </td>
21      <td>
22        <span tal:define="error python: widget[0].error"
23              tal:replace="structure error" tal:condition="error" />
24        <input tal:replace="structure python: widget[0]()" />
25      </td>
26      <td>
27        <span tal:define="error python: widget[1].error"
28              tal:replace="structure error" tal:condition="error" />
29        <input tal:replace="structure python: widget[1]()" />
30      </td>
31    </tr>
32  </div>
33  <tr>
34    <td colspan="3">
35      <input type="submit" value="Remove selected items"
36             tal:condition="view/need_delete"
37             tal:attributes="name string:${view/name}.remove"
38             i18n:attributes="value remove-selected-items" />
39      <input type="submit" value="Add foo"
40             tal:condition="view/need_add"
41             tal:attributes="name string:${view/name}.add;
42                             value view/addButtonLabel" />
43    </td>
44  </tr>
45</table>
46<input tal:replace="structure view/marker" />
Note: See TracBrowser for help on using the repository browser.