Opened 16 years ago
Last modified 16 years ago
#9486 closed
The goal is to make sure the required field's lable be bold — at Initial Version
Reported by: | tangc | Owned by: | nobody |
---|---|---|---|
Component: | Uncategorized | Version: | 1.0 |
Severity: | 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
Here is the svn diff
Index: django/forms/forms.py
===================================================================
--- django/forms/forms.py (revision 9084)
+++ django/forms/forms.py (working copy)
@@ -155,7 +155,13 @@
if self.label_suffix:
if label[-1] not in ':?.!':
label += self.label_suffix
- label = bf.label_tag(label) or
+
+ attrs = None
+ if bf.field.required:
+ attrs = {'class': 'required'}
+
+ label = bf.label_tag(label, attrs) or
+
else:
label =
if field.help_text: