Opened 14 years ago

Closed 9 years ago

#11776 closed New feature (fixed)

HTML class for non-field errors

Reported by: Daniel Pope <dan@…> Owned by: Nick
Component: Forms Version: dev
Severity: Normal Keywords:
Cc: Triage Stage: Accepted
Has patch: yes Needs documentation: yes
Needs tests: no Patch needs improvement: no
Easy pickings: no UI/UX: no

Description

In most of my applications I like field errors and non-field errors to display slightly differently. In general I need field errors to line up with the field or use an icon to indicate which field they correspond to (such as an arrow icon). Non-field errors of course can't have an arrow icon and don't line up with fields (ie. need different margins).

At the moment it's difficult to arrange this without extra markup, because it's usually hard to write a CSS selector that selects only field xor non-field errors.

It would be really helpful if the output was, say, <ul class="errorlist nonfielderrorlist"> when rendering form.non_field_errors.

Change History (9)

comment:1 Changed 14 years ago by Russell Keith-Magee

Triage Stage: UnreviewedAccepted

comment:2 Changed 13 years ago by Peter Baumgartner

Severity: Normal
Type: New feature

comment:3 Changed 12 years ago by Aymeric Augustin

UI/UX: unset

Change UI/UX from NULL to False.

comment:4 Changed 12 years ago by Aymeric Augustin

Easy pickings: unset

Change Easy pickings from NULL to False.

comment:5 Changed 10 years ago by Nick

Owner: changed from nobody to Nick
Status: newassigned

comment:6 Changed 10 years ago by Nick

Last edited 10 years ago by Nick (previous) (diff)

comment:7 Changed 10 years ago by Tim Graham

Has patch: set
Needs documentation: set
Version: 1.1master

Patch needs documentation as noted on the PR.

comment:8 Changed 10 years ago by anonymous

I'm still working on this -- I've just updated the PR.

comment:9 Changed 9 years ago by Tim Graham <timograham@…>

Resolution: fixed
Status: assignedclosed

In 11f0899bbe7c04dc6109f57c3b36ed8621b8f08e:

Fixed #11776 -- Added CSS class for non-field/top of form errors.

Thanks Daniel Pope for the suggestion.

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