Opened 8 years ago
Last modified 8 years ago
#29153 closed New feature
add label attrs to BaseForm — at Initial Version
| Reported by: | Christoph | Owned by: | nobody |
|---|---|---|---|
| Component: | Forms | Version: | 2.0 |
| Severity: | Normal | Keywords: | |
| Cc: | Triage Stage: | Unreviewed | |
| Has patch: | no | Needs documentation: | no |
| Needs tests: | no | Patch needs improvement: | no |
| Easy pickings: | no | UI/UX: | no |
Description
As the label_tag is already set up to give the label class attributes and label_suffix, it is quite easy to add this to the BaseForm _html_output()
class BoundField:
def label_tag(self, contents=None, attrs=None, label_suffix=None):
class BaseForm:
def _html_output(self, normal_row, error_row, row_ender, help_text_html, errors_on_separate_row):
# ...
label = bf.label_tag(label) or ''
Note:
See TracTickets
for help on using tickets.