Commits

jason kirtland  committed 85d2fdb

domid generation for RADIO/CHECKBOX appends the value= for all types of bind, not just Array.

  • Participants
  • Parent commits 7e96adf

Comments (0)

Files changed (2)

File flatland/out/generic.py

     if not basis:
         return
 
-    # add value="" to CHECKBOX and RADIO to produce a unique ID for Array
-    # elements.
+    # add the value="" to CHECKBOX and RADIO to produce a unique ID
     if (tagname == u'input' and
-        attributes.get(u'type') in (u'checkbox', u'radio') and
-        isinstance(bind, Array)):
+        attributes.get(u'type') in (u'checkbox', u'radio')):
         suffix = _sanitize_domid_suffix(attributes.get(u'value', u''))
         if suffix:
             basis += u'_' + suffix

File tests/markup/test_transforms.py

         expected = {
             u'type': u'radio',
             u'value': u'xxx',
-            u'id': u'f_number',
+            u'id': u'f_number_xxx',
             }
         assert_bound_transform(generic.transform_domid,
                                u'input', given, expected, context=context)