#18134: please add Filed.label_tag_with_suffix method
-------------------------------------+-------------------------------------
     Reporter:  Evil Clay            |                    Owner:
  <clay.evil@…>                      |  gabejackson
         Type:                       |                   Status:  new
  Cleanup/optimization               |                  Version:  1.4
    Component:  Uncategorized        |               Resolution:
     Severity:  Normal               |             Triage Stage:  Accepted
     Keywords:  forms                |      Needs documentation:  1
    Has patch:  1                    |  Patch needs improvement:  0
  Needs tests:  0                    |                    UI/UX:  0
Easy pickings:  0                    |
-------------------------------------+-------------------------------------
Changes (by gabejackson):

 * status:  reopened => new
 * owner:  nobody => gabejackson
 * keywords:   => forms
 * needs_docs:  0 => 1
 * has_patch:  0 => 1
 * type:  Uncategorized => Cleanup/optimization
 * stage:  Unreviewed => Accepted


Comment:

 This has been fixed and discussed in
 https://github.com/django/django/pull/141

 A copy of the commit:
 There was an inconsistency between how the label_tag for forms were
 generated depending on which method was used: as_p, as_ul and as_table
 contained code to append the label_suffix where as label_tag called on a
 form field directly did NOT append the label_suffix. The code for
 appending the label_suffix has been moved in to the label_tag code of
 the field and the HTML generation code for as_p, as_ul and as_table now
 calls this code as well. CAUTION: This may be be "backwards incompatible
 change" because users who have added the label_suffix manually in their
 templates may now get double label_suffix characters in their forms.

 Also some test cases regarding the label_tag output were inconsistent.
 Some expected Label: and some expected the label_suffix
 outside of the tag: Label:
 The format has now been unified to keep the label_suffix inside the
 tag: Label:. If the label_suffix is not needed,
 the form can still be constructed with label_suffix=''.

-- 
Ticket URL: <https://code.djangoproject.com/ticket/18134#comment:3>
Django <https://code.djangoproject.com/>
The Web framework for perfectionists with deadlines.

-- 
You received this message because you are subscribed to the Google Groups 
"Django updates" group.
To post to this group, send email to django-updates@googlegroups.com.
To unsubscribe from this group, send email to 
django-updates+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/django-updates?hl=en.

Reply via email to