Opened 5 years ago

Last modified 4 years ago

#12437 new New feature

error_css_class should not override existing classes in html

Reported by: anonymous Owned by: nobody
Component: Forms Version:
Severity: Normal Keywords: forms, errors
Cc: Triage Stage: Accepted
Has patch: no Needs documentation: no
Needs tests: no Patch needs improvement: no
Easy pickings: no UI/UX: no


There is no possibility for now to show html row with custom class + error_css_class

For example i want to do something like this

normal_row = u'<div class="js-active forms__width %(html_class_attr)s">......'

because %(html_class_attr)s return string with html attribute itself, not just class name.

The solution i think is just to return css class name.

Change History (4)

comment:1 Changed 5 years ago by russellm

  • milestone 1.2 deleted
  • Needs documentation unset
  • Needs tests unset
  • Patch needs improvement unset
  • Triage Stage changed from Unreviewed to Accepted
  • Version SVN deleted

We can't remove html_class_attr from the dictionary that is provided, but I can't see any reason we shouldn't expose css_classes for use in templating rows.

comment:2 Changed 4 years ago by mattmcc

  • Severity set to Normal
  • Type set to New feature

comment:3 Changed 3 years ago by aaugustin

  • UI/UX unset

Change UI/UX from NULL to False.

comment:4 Changed 3 years ago by aaugustin

  • Easy pickings unset

Change Easy pickings from NULL to False.

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