Opened 15 years ago

Closed 15 years ago

#11301 closed (fixed)

Fields using SplitHiddenDateTimeWidget are still rendered with their label

Reported by: David Gouldin Owned by: nobody
Component: Forms Version: 1.0
Severity: Keywords:
Cc: dgouldin@… Triage Stage: Accepted
Has patch: yes Needs documentation: no
Needs tests: no Patch needs improvement: no
Easy pickings: no UI/UX: no

Description

Using the following form class:

from django import forms
class TestForm(forms.Form):
    test_field = forms.SplitDateTimeField(widget=forms.widgets.SplitHiddenDateTimeWidget)

an instance of this class will render with a label for test_field:

>>> f = TestForm()
>>> f.as_table()
u'<tr><th><label for="id_test_field_0">Test field:</label></th><td><input type="hidden" name="test_field_0" id="id_test_field_0" /><input type="hidden" name="test_field_1" id="id_test_field_1" /></td></tr>'

Attachments (2)

11301.diff (509 bytes ) - added by David Gouldin 15 years ago.
hide_label_splitdatetimefield.diff (1.2 KB ) - added by punteney 15 years ago.
updated patch with test case

Download all attachments as: .zip

Change History (6)

by David Gouldin, 15 years ago

Attachment: 11301.diff added

comment:1 by David Gouldin, 15 years ago

Cc: dgouldin@… added
Has patch: set

comment:2 by Chris Beaven, 15 years ago

Needs tests: set
Triage Stage: UnreviewedAccepted

by punteney, 15 years ago

updated patch with test case

comment:3 by punteney, 15 years ago

Needs tests: unset

updated patch with a test case

comment:4 by Jannis Leidel, 15 years ago

Resolution: fixed
Status: newclosed

(In [12152]) Fixed #11301 - Properly hide SplitHiddenDateTimeWidget. Thanks to David Gouldin for the patch.

Note: See TracTickets for help on using tickets.
Back to Top