[Zope3-checkins] SVN: zope.formlib/trunk/src/zope/formlib/ avoid
all the help gyrations when there is no hint text
Fred L. Drake, Jr.
fdrake at gmail.com
Fri Jul 22 11:17:44 EDT 2005
Log message for revision 37379:
avoid all the help gyrations when there is no hint text
Changed:
U zope.formlib/trunk/src/zope/formlib/pageform.pt
U zope.formlib/trunk/src/zope/formlib/subpageform.pt
-=-
Modified: zope.formlib/trunk/src/zope/formlib/pageform.pt
===================================================================
--- zope.formlib/trunk/src/zope/formlib/pageform.pt 2005-07-22 08:32:05 UTC (rev 37378)
+++ zope.formlib/trunk/src/zope/formlib/pageform.pt 2005-07-22 15:17:44 UTC (rev 37379)
@@ -81,16 +81,23 @@
<tbody metal:define-slot="formbody" tal:omit-tag="">
<tr tal:repeat="widget view/widgets">
<td class="label" tal:define="hint widget/hint"
- onmousedown="toggleFormFieldHelp(this,1)"
- onmouseup="toggleFormFieldHelp(this,0)"
- onmouseout="toggleFormFieldHelp(this,0)"
metal:define-macro="labelcell">
- <label tal:attributes="for widget/name;
- style python:hint and 'cursor: help';">
+ <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">
Modified: zope.formlib/trunk/src/zope/formlib/subpageform.pt
===================================================================
--- zope.formlib/trunk/src/zope/formlib/subpageform.pt 2005-07-22 08:32:05 UTC (rev 37378)
+++ zope.formlib/trunk/src/zope/formlib/subpageform.pt 2005-07-22 15:17:44 UTC (rev 37379)
@@ -71,16 +71,23 @@
<tbody metal:define-slot="formbody" tal:omit-tag="">
<tr tal:repeat="widget view/widgets">
<td class="label" tal:define="hint widget/hint"
- onmousedown="toggleFormFieldHelp(this,1)"
- onmouseup="toggleFormFieldHelp(this,0)"
- onmouseout="toggleFormFieldHelp(this,0)"
metal:define-macro="labelcell">
- <label tal:attributes="for widget/name;
- style python:hint and 'cursor: help';">
+ <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"
i18n:translate="" metal:define-macro="widgetcell">
More information about the Zope3-Checkins
mailing list