[Zope3-checkins] CVS: Zope3/src/zope/app/browser/form - add.pt:1.1 add.py:1.3 edit.pt:1.3
Jim Fulton
jim@zope.com
Thu, 26 Dec 2002 17:26:27 -0500
Update of /cvs-repository/Zope3/src/zope/app/browser/form
In directory cvs.zope.org:/tmp/cvs-serv16127/src/zope/app/browser/form
Modified Files:
add.py edit.pt
Added Files:
add.pt
Log Message:
Added a separate add template to be used by add forms. The only thing
that's different about this is that it uses the dialog macro, rather
than the page macro.
=== Added File Zope3/src/zope/app/browser/form/add.pt ===
<html metal:use-macro="views/standard_macros/dialog">
<body>
<div metal:fill-slot="body">
<div metal:define-macro="body">
<form action="." tal:attributes="action request/URL" method="POST"
enctype="multipart/form-data"
>
<div metal:define-macro="formbody">
<h3 tal:condition="view/label"
tal:content="view/label"
metal:define-slot="heading"
>Edit something</h3>
<p tal:define="status view/update"
tal:condition="status"
tal:content="status" />
<div tal:condition="view/errors">
<ul>
<li tal:repeat="error view/errors">
<strong tal:content="error/__class__">
Error Type</strong>:
<span tal:content="error">Error text</span>
</li>
</ul>
</div>
<div metal:define-slot="extra_info" tal:replace="nothing">
</div>
<table width="100%" border="0">
<tr metal:define-slot="extra_top" tal:replace="nothing">
<td>Extra top</td>
<td><input type="text" style="width:100%" /></td>
</tr>
<tr metal:define-macro="widget_rows" tal:repeat="widget view/widgets"
tal:content="structure widget/row">
<td>Name</td>
<td><input type="text" style="width:100%" /></td>
</tr>
<tr metal:define-slot="extra_bottom" tal:replace="nothing">
<td>Extra bottom</td>
<td><input type="text" style="width:100%" /></td>
</tr>
</table>
</div>
<input type="submit" value="Refresh" />
<input type="submit" name="UPDATE_SUBMIT" value="Save Changes" />
</form>
</div>
</div>
</body>
</html>
=== Zope3/src/zope/app/browser/form/add.py 1.2 => 1.3 ===
--- Zope3/src/zope/app/browser/form/add.py:1.2 Wed Dec 25 09:12:32 2002
+++ Zope3/src/zope/app/browser/form/add.py Thu Dec 26 17:26:27 2002
@@ -155,7 +155,7 @@
(schema, for_, bases, template, fields,
) = _normalize(
- _context, schema, for_, class_, template, 'edit.pt', fields, omit,
+ _context, schema, for_, class_, template, 'add.pt', fields, omit,
AddView)
leftover = fields
@@ -205,7 +205,7 @@
Action(
discriminator = ('http://namespaces.zope.org/form/add', name, layer),
callable = AddViewFactory,
- args = (name, schema, label, permission, layer, template, 'edit.pt',
+ args = (name, schema, label, permission, layer, template, 'add.pt',
bases,
IAdding, fields, content_factory, arguments,
keyword_arguments, set_before_add, set_after_add),
=== Zope3/src/zope/app/browser/form/edit.pt 1.2 => 1.3 ===
--- Zope3/src/zope/app/browser/form/edit.pt:1.2 Wed Dec 25 09:12:32 2002
+++ Zope3/src/zope/app/browser/form/edit.pt Thu Dec 26 17:26:27 2002
@@ -1,4 +1,4 @@
-<html metal:use-macro="views/standard_macros/dialog">
+<html metal:use-macro="views/standard_macros/page">
<body>
<div metal:fill-slot="body">