r13767 - in Products.Archetypes/trunk: . Products/Archetypes/skins/archetypes/widgets
"Steve McMahon" <[email protected]> Fri, 19 Aug 2011 18:30:21 +0000
| Newsgroups | gmane.comp.web.zope.plone.archetypes.cvs |
|---|---|
| Message-ID | <[email protected]> |
Author: smcmahon
Date: Fri Aug 19 18:30:21 2011
New Revision: 13767
Modified:
Products.Archetypes/trunk/CHANGES.txt
Products.Archetypes/trunk/Products/Archetypes/skins/archetypes/widgets/calendar.pt
Products.Archetypes/trunk/Products/Archetypes/skins/archetypes/widgets/field.pt
Log:
Accessibility fix for label generation for calendar widget
Modified: Products.Archetypes/trunk/CHANGES.txt
==============================================================================
--- Products.Archetypes/trunk/CHANGES.txt (original)
+++ Products.Archetypes/trunk/CHANGES.txt Fri Aug 19 18:30:21 2011
@@ -9,6 +9,7 @@
select and multi-select widgets to each widget's edit macro. In the case
of the select and multi-select widgets, this allows the label to be generated
(or not) once the format (checkbox, dropdown...) is known.
+ Same for label for calendar widget.
Thanks to mattbarkau and jdeluca for researching this and proposing a solution.
[smcmahon]
Modified: Products.Archetypes/trunk/Products/Archetypes/skins/archetypes/widgets/calendar.pt
==============================================================================
--- Products.Archetypes/trunk/Products/Archetypes/skins/archetypes/widgets/calendar.pt (original)
+++ Products.Archetypes/trunk/Products/Archetypes/skins/archetypes/widgets/calendar.pt Fri Aug 19 18:30:21 2011
@@ -33,6 +33,24 @@
tal:define="format widget/format">
<metal:use use-macro="field_macro | context/widgets/field/macros/edit">
<metal:fill fill-slot="widget_body">
+ <div class="formQuestion label">
+ <span tal:replace="python:widget.Label(here)"
+ i18n:translate="" />
+ <span class="required"
+ tal:condition="field/required"
+ title="Required"
+ i18n:attributes="title title_required;"
+ style="color: #f00;">
+ ■
+ </span>
+ </div>
+ <div class="formHelp"
+ tal:define="description python:widget.Description(here)"
+ tal:content="structure description"
+ tal:attributes="id string:${fieldName}_help"
+ i18n:translate="">
+ Help
+ </div>
<tal:define define="id fieldName;
show_hm widget/show_hm|nothing;
show_ymd widget/show_ymd|nothing;
Modified: Products.Archetypes/trunk/Products/Archetypes/skins/archetypes/widgets/field.pt
==============================================================================
--- Products.Archetypes/trunk/Products/Archetypes/skins/archetypes/widgets/field.pt (original)
+++ Products.Archetypes/trunk/Products/Archetypes/skins/archetypes/widgets/field.pt Fri Aug 19 18:30:21 2011
@@ -86,7 +86,7 @@
consider their format (checkbox, radio, select box ...) to correctly format the label to meet
accessibility standards.
</tal:comment>
- <tal:ifLabel tal:condition="python: widget.getName() not in ('LabelWidget', 'SelectionWidget', 'MultiSelectionWidget')">
+ <tal:ifLabel tal:condition="python: widget.getName() not in ('LabelWidget', 'CalendarWidget', 'SelectionWidget', 'MultiSelectionWidget')">
<label class="formQuestion"
tal:attributes="for python:fieldName">
<span tal:replace="python:widget.Label(here)"
------------------------------------------------------------------------------
Get a FREE DOWNLOAD! and learn more about uberSVN rich system,
user administration capabilities and model configuration. Take
the hassle out of deploying and managing Subversion and the
tools developers use with it. http://p.sf.net/sfu/wandisco-d2d-2