Permalink
Browse files

fixed form view

  • Loading branch information...
1 parent b0c9404 commit d36ab032e99b49f1fb1ca682af45d47f93ad6dfc @ddokter ddokter committed Dec 22, 2011
Showing with 17 additions and 5 deletions.
  1. +9 −5 w20e/pycms/templates/form.pt
  2. +8 −0 w20e/pycms/views/form.py
@@ -4,13 +4,17 @@
metal:use-macro="content.macros['master']">
<metal:content fill-slot="content">
-
- <div class="status" tal:condition="status">${status}</div>
- <div class="error" tal:condition="errors">${errors}</div>
- <div id="content" tal:replace="structure view.renderform()">
- </div>
+ <div tal:replace="structure view.header"/>
+
+ <div class="status" tal:condition="status">${status}</div>
+ <div class="error" tal:condition="errors">${errors}</div>
+
+ <div id="content" tal:replace="structure view.renderform()">
+ </div>
+ <div tal:replace="structure view.footer"/>
+
</metal:content>
</html>
View
@@ -20,3 +20,11 @@ def __call__(self):
res.update(pyramidformview.__call__(self))
return res
+
+ @property
+ def header(self):
+ return self.context.__data__['header_text']
+
+ @property
+ def footer(self):
+ return self.context.__data__['footer_text']

0 comments on commit d36ab03

Please sign in to comment.