Opened 20 years ago

Closed 19 years ago

#3698 closed (fixed)

Smarter newforms labling

Reported by: Chris Beaven Owned by: Adrian Holovaty
Component: Forms Version: dev
Severity: Keywords:
Cc: Triage Stage: Ready for checkin
Has patch: yes Needs documentation: no
Needs tests: no Patch needs improvement: no
Easy pickings: no UI/UX: no

Description

I have been using some labels on my newforms fields. Some end with punctuation, which makes the added ":" look a bit silly after it (when using the lazy form rendering methods like as_p())

The patch makes it so the label is not appended with a colon if the field label ends in punctuation.

Attachments (2)

newforms_labling.patch​ (916 bytes ) - added by Chris Beaven 20 years ago.
newforms_labling.2.patch​ (2.7 KB ) - added by Chris Beaven 20 years ago.
with tests

Download all attachments as: .zip

Change History (6)

by Chris Beaven, 20 years ago

Attachment: newforms_labling.patch​ added

comment:1 by Chris Beaven, 20 years ago

Triage Stage: Unreviewed → Design decision needed

comment:2 by Adrian Holovaty, 20 years ago

Triage Stage: Design decision needed → Accepted

Good idea. Write up some unit tests, and we'll put it in.

by Chris Beaven, 20 years ago

Attachment: newforms_labling.2.patch​ added

with tests

comment:3 by Chris Beaven, 20 years ago

Triage Stage: Accepted → Ready for checkin

comment:4 by Russell Keith-Magee, 19 years ago

Resolution: → fixed
Status: new → closed

(In [5112]) Fixed #3698 -- Modified newforms labels to only add a colon if the label text doesn't end with punctuation. Thanks, SmileyChris.

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