Code

Add "action" attributes to forms.
[roundup.git] / templates / classic / html / _generic.item.html
1 <tal:block metal:use-macro="templates/page/macros/icing">
2 <title metal:fill-slot="head_title"
3        tal:content="python:context._classname.capitalize()+' editing'"></title>
4 <td class="page-header-top" metal:fill-slot="body_title">
5  <h2 tal:content="python:context._classname.capitalize()+' editing'"></h2>
6 </td>
7 <td class="content" metal:fill-slot="content">
9 <span tal:condition="python:not (context.is_view_ok() or context.is_edit_ok())">
10 You are not allowed to view this page.
11 </span>
13 <form method="POST" onSubmit="return submit_once()"
14       enctype="multipart/form-data" tal:condition="context/is_edit_ok"
15       tal:attributes="action context/designator">
17 <input type="hidden" name=":template" value="item">
18 <input type="hidden" name=":required" value="title">
20 <table class="form">
22 <tr tal:repeat="prop python:db[context._classname].properties()">
23  <tal:block tal:condition="python:prop._name not in ('id', 'creator',
24                                   'creation', 'activity')">
25   <th tal:content="prop/_name"></th>
26   <td tal:content="structure python:context[prop._name].field()"></td>
27  </tal:block>
28 </tr>
29 <tr>
30  <td>&nbsp;</td>
31  <td colspan=3 tal:content="structure context/submit">
32   submit button will go here
33  </td>
34 </tr>
35 </table>
37 </form>
39 <table class="form" tal:condition="context/is_only_view_ok">
41 <tr tal:repeat="prop python:db[context._classname].properties()">
42  <tal:block tal:condition="python:prop._name not in ('id', 'creator',
43                                   'creation', 'activity')">
44   <th tal:content="prop/_name"></th>
45   <td tal:content="structure python:context[prop._name].field()"></td>
46  </tal:block>
47 </tr>
48 </table>
51 <tal:block tal:condition="python:context.id and context.is_view_ok()">
52  <tal:block tal:replace="structure context/history" />
53 </tal:block>
55 </td>
57 </tal:block>