Code

Opened 7 years ago

Closed 7 years ago

Last modified 7 years ago

#4024 closed (duplicate)

Setting required=True in newforms Fields does not result in an change in as_p/as_ul/as_table

Reported by: Anders Conbere <aconbere@…> Owned by: adrian
Component: Forms Version: master
Severity: Keywords: html_ouput as_p as_ul as_table required
Cc: Triage Stage: Unreviewed
Has patch: yes Needs documentation: yes
Needs tests: yes Patch needs improvement: no
Easy pickings: UI/UX:

Description

While it's nice to be able to set "required=True" and have it validate that properly, there is no hint given to the ui about this. My primary concern in this case is the generated content from html_output and the as_* functions. What I propose is a css_classes list in html_output that can be appended to by other attributes that might be set in the future, and a classes label for string concatenation added to the normal_row definitions.

Attachments (1)

forms.py.diff (2.5 KB) - added by Anders Conbere <aconbere@…> 7 years ago.
adds the ability to attach css classes to fields in generated output

Download all attachments as: .zip

Change History (6)

Changed 7 years ago by Anders Conbere <aconbere@…>

adds the ability to attach css classes to fields in generated output

comment:1 Changed 7 years ago by Waylan Limberg <waylan@…>

  • Needs documentation unset
  • Needs tests unset
  • Patch needs improvement unset

This should probably be marked as a duplicate of #3512

comment:2 Changed 7 years ago by Waylan Limberg <waylan@…>

  • Needs documentation set
  • Needs tests set

Whoops, didn't mean to change the status.

comment:3 Changed 7 years ago by Anders Conbere <aconbere@…>

  • Resolution set to duplicate
  • Status changed from new to closed

comment:4 Changed 7 years ago by Anders Conbere <aconbere@…>

hmmm maybe I don't understand how trac works here, but that definitely did not set my ticket as a duplicate of a specified ticket.

comment:5 Changed 7 years ago by Anders Conbere <aconbere@…>

duplicate of #3512

(setting the ticket that this is a dup of in the message body is really backwards, and doesn't allow for particularly nice backlinking...shame on trac devs)

Add Comment

Modify Ticket

Change Properties
<Author field>
Action
as closed
as The resolution will be set. Next status will be 'closed'
The resolution will be deleted. Next status will be 'new'
Author


E-mail address and user name can be saved in the Preferences.

 
Note: See TracTickets for help on using tickets.