[Zope3-checkins] SVN: Zope3/branches/3.2/ - fixed HTML rendered by ItemsMultiDisplayWidget

Yvo Schubbe y.2006_ at wcm-solutions.de
Mon Dec 4 16:39:46 EST 2006


Log message for revision 71400:
  - fixed HTML rendered by ItemsMultiDisplayWidget

Changed:
  U   Zope3/branches/3.2/doc/CHANGES.txt
  U   Zope3/branches/3.2/src/zope/app/form/browser/itemswidgets.py
  U   Zope3/branches/3.2/src/zope/app/form/browser/tests/test_itemswidget.py

-=-
Modified: Zope3/branches/3.2/doc/CHANGES.txt
===================================================================
--- Zope3/branches/3.2/doc/CHANGES.txt	2006-12-04 21:25:37 UTC (rev 71399)
+++ Zope3/branches/3.2/doc/CHANGES.txt	2006-12-04 21:39:45 UTC (rev 71400)
@@ -10,6 +10,9 @@
 
     Bug fixes
 
+      - Fixed HTML rendered by ItemsMultiDisplayWidget: The 'name' attribute
+        is not allowed in list tags and 'type' has a different meaning.
+
       - Fileresources now also set the Cache-control headers on 304
         responses. This speeds up page loads a lot on pages with many
         resources.

Modified: Zope3/branches/3.2/src/zope/app/form/browser/itemswidgets.py
===================================================================
--- Zope3/branches/3.2/src/zope/app/form/browser/itemswidgets.py	2006-12-04 21:25:37 UTC (rev 71399)
+++ Zope3/branches/3.2/src/zope/app/form/browser/itemswidgets.py	2006-12-04 21:39:45 UTC (rev 71400)
@@ -255,8 +255,6 @@
         if value:
             rendered_items = self.renderItems(value)
             return renderElement(self.tag,
-                                 type=self.type,
-                                 name=self.name,
                                  id=self.name,
                                  cssClass=self.cssClass,
                                  contents="\n".join(rendered_items),

Modified: Zope3/branches/3.2/src/zope/app/form/browser/tests/test_itemswidget.py
===================================================================
--- Zope3/branches/3.2/src/zope/app/form/browser/tests/test_itemswidget.py	2006-12-04 21:25:37 UTC (rev 71399)
+++ Zope3/branches/3.2/src/zope/app/form/browser/tests/test_itemswidget.py	2006-12-04 21:39:45 UTC (rev 71400)
@@ -137,13 +137,10 @@
         widget = self._makeWidget(form={'field.numbers': ['token1', 'token2']})
         self.assertEqual(
             widget(),
-            '<%s class="textType" '
-            'id="field.numbers" '
-            'name="field.numbers" '
-            'type="text" >'
+            '<%s id="field.numbers" >'
             '<li>One</li>\n<li>Two</li>'
             '</%s>' %(self._tag, self._tag))
-        
+
     def test_renderItems(self):
         widget = self._makeWidget()
         self.assertEqual(



More information about the Zope3-Checkins mailing list