[Zope3-checkins] SVN: Zope3/trunk/src/zope/formlib/pageform.pt This
template is actually quiet powerful also when used as a macro
Stephan Richter
srichter at cosmos.phy.tufts.edu
Mon Apr 3 08:00:49 EDT 2006
Log message for revision 66351:
This template is actually quiet powerful also when used as a macro
provider. I have added a few more slots and macro definitions, so that it
is even more flexible.
Changed:
U Zope3/trunk/src/zope/formlib/pageform.pt
-=-
Modified: Zope3/trunk/src/zope/formlib/pageform.pt
===================================================================
--- Zope3/trunk/src/zope/formlib/pageform.pt 2006-04-03 08:23:14 UTC (rev 66350)
+++ Zope3/trunk/src/zope/formlib/pageform.pt 2006-04-03 12:00:49 UTC (rev 66351)
@@ -71,61 +71,65 @@
<div metal:define-slot="extra_info" tal:replace="nothing">
</div>
- <table class="form-fields">
- <tr class="row" metal:define-slot="extra_top" tal:replace="nothing">
- <td class="label">Extra top</td>
+ <div metal:define-slot="main_form">
+ <table class="form-fields" metal:define-macro="formtable">
+ <tr class="row" metal:define-slot="extra_top" tal:replace="nothing">
+ <td class="label">Extra top</td>
+ <td class="field"><input type="text" /></td>
+ </tr>
+ <tbody metal:define-slot="formbody" tal:omit-tag="">
+ <tal:block omit-tag="" repeat="widget view/widgets">
+ <tr metal:define-macro="formrow">
+ <td class="label" tal:define="hint widget/hint"
+ metal:define-macro="labelcell">
+ <label tal:condition="python:hint"
+ tal:attributes="for widget/name"
+ onmousedown="toggleFormFieldHelp(this,1)"
+ onmouseup="toggleFormFieldHelp(this,0)"
+ onmouseout="toggleFormFieldHelp(this,0)"
+ style="cursor: help">
+ <span class="required" tal:condition="widget/required"
+ >*</span><span i18n:translate=""
+ tal:content="widget/label">label</span>
+ </label>
+ <label tal:condition="python:not hint"
+ tal:attributes="for widget/name">
+ <span class="required" tal:condition="widget/required"
+ >*</span><span i18n:translate=""
+ tal:content="widget/label">label</span>
+ </label>
+ </td>
+ <td class="field" tal:define="hint widget/hint"
+ metal:define-macro="widgetcell">
+ <div class="form-fields-help"
+ i18n:translate=""
+ tal:content="hint"
+ tal:condition="hint"
+ tal:attributes="id string:field-help-for-${widget/name}"
+ onclick="this.style.visibility='hidden';"
+ style="visibility: hidden; position: absolute;"
+ >Title of this content object.</div>
+ <div class="widget" tal:content="structure widget">
+ <input type="text" /></div>
+ <div class="error"
+ tal:condition="widget/error"
+ >
+ <!-- TODO Put this back, the Zope3 way.
+ <img src="alert.gif" alt="Error"
+ tal:replace="structure context/alert.gif" />
+ -->
+ <span tal:replace="structure widget/error">error</span>
+ </div>
+ </td>
+ </tr>
+ </tal:block>
+ </tbody>
+ <tr class="row" metal:define-slot="extra_bottom" tal:replace="nothing">
+ <td class="label">Extra bottom</td>
<td class="label"><input type="text" /></td>
- </tr>
- <tbody metal:define-slot="formbody" tal:omit-tag="">
- <tr tal:repeat="widget view/widgets">
- <td class="label" tal:define="hint widget/hint"
- metal:define-macro="labelcell">
- <label tal:condition="python:hint"
- tal:attributes="for widget/name"
- onmousedown="toggleFormFieldHelp(this,1)"
- onmouseup="toggleFormFieldHelp(this,0)"
- onmouseout="toggleFormFieldHelp(this,0)"
- style="cursor: help">
- <span class="required" tal:condition="widget/required"
- >*</span><span i18n:translate=""
- tal:content="widget/label">label</span>
- </label>
- <label tal:condition="python:not hint"
- tal:attributes="for widget/name">
- <span class="required" tal:condition="widget/required"
- >*</span><span i18n:translate=""
- tal:content="widget/label">label</span>
- </label>
- </td>
- <td class="field" tal:define="hint widget/hint"
- metal:define-macro="widgetcell">
- <div class="form-fields-help"
- i18n:translate=""
- tal:content="hint"
- tal:condition="hint"
- tal:attributes="id string:field-help-for-${widget/name}"
- onclick="this.style.visibility='hidden';"
- style="visibility: hidden; position: absolute;"
- >Title of this content object.</div>
- <div class="widget" tal:content="structure widget">
- <input type="text" /></div>
- <div class="error"
- tal:condition="widget/error"
- >
- <!-- TODO Put this back, the Zope3 way.
- <img src="alert.gif" alt="Error"
- tal:replace="structure context/alert.gif" />
- -->
- <span tal:replace="structure widget/error">error</span>
- </div>
- </td>
</tr>
- </tbody>
- <tr class="row" metal:define-slot="extra_bottom" tal:replace="nothing">
- <td class="label">Extra bottom</td>
- <td class="label"><input type="text" /></td>
- </tr>
- </table>
+ </table>
+ </div>
<metal:block define-slot="above_buttons" />
</div>
<div id="actionsView">
More information about the Zope3-Checkins
mailing list