From 341c85bed0676e4bcd762186139367549ffceabb Mon Sep 17 00:00:00 2001 From: Jannis Leidel Date: Sat, 9 Jan 2010 22:14:01 +0000 Subject: Fixed #11843 - Give MultipleHiddenInput different IDs. Thanks Chris Beaven. git-svn-id: http://code.djangoproject.com/svn/django/trunk@12151 bcc190cf-cafb-0310-a4f2-bffc1f526a37 --- tests/regressiontests/forms/widgets.py | 13 +++++++++++++ 1 file changed, 13 insertions(+) (limited to 'tests') diff --git a/tests/regressiontests/forms/widgets.py b/tests/regressiontests/forms/widgets.py index 6ea9298d4c..d909c0f26c 100644 --- a/tests/regressiontests/forms/widgets.py +++ b/tests/regressiontests/forms/widgets.py @@ -183,6 +183,11 @@ u'' +Each input gets a separate ID. +>>> w = MultipleHiddenInput() +>>> w.render('letters', list('abc'), attrs={'id': 'hideme'}) +u'\n\n' + # FileInput Widget ############################################################ FileInput widgets don't ever show the value, because the old value is of no use @@ -1016,6 +1021,14 @@ True >>> w.render('nums', ['ŠĐĆŽćžšđ'], choices=[('ŠĐĆŽćžšđ', 'ŠĐabcĆŽćžšđ'), ('ćžšđ', 'abcćžšđ')]) u'' +# Each input gets a separate ID +>>> print CheckboxSelectMultiple().render('letters', list('ac'), choices=zip(list('abc'), list('ABC')), attrs={'id': 'abc'}) + + # MultiWidget ################################################################# >>> class MyMultiWidget(MultiWidget): -- cgit v1.3