#13782 closed (fixed)
Missing css on textarea & errors marking is too broad for multiple fields on same line
| Reported by: | master | Owned by: | nobody |
|---|---|---|---|
| Component: | contrib.admin | Version: | dev |
| Severity: | Keywords: | sprintdec2010 | |
| 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
Under the Admin, try to add-save an empty object of this example:
models.py:
class Test(models.Model): title = models.CharField(max_length=100, blank=True) presentation = models.TextField()
admin.py:
class TestAdmin(admin.ModelAdmin): fieldsets = ( (None, {'fields': (('title', 'presentation'), )}), ) admin.site.register(Test, TestAdmin)
The unexpected results are:
- there is no red border on the offending 'presentation' field
- the red border on the 'title' field is confusing, this field is not in error, as it can be empty
The proposed patch adds:
- the missing CSS rule on an erroneous textarea
- a way (to be cleanedup) to lower the error marking from the 'form-row' to the 'field-box' level, so that only the offending fields are pointed out.
Attachments (3)
Change History (8)
by , 15 years ago
| Attachment: | errors_css.diff added |
|---|
comment:1 by , 15 years ago
| Keywords: | sprintdec2010 added |
|---|---|
| milestone: | → 1.3 |
| Triage Stage: | Unreviewed → Accepted |
comment:2 by , 15 years ago
| Triage Stage: | Accepted → Ready for checkin |
|---|
comment:3 by , 15 years ago
| Resolution: | → fixed |
|---|---|
| Status: | new → closed |
comment:4 by , 15 years ago
Note:
See TracTickets
for help on using tickets.
This is clearly a usability bug. The patch is good. I've just improved it a little so that the behaviour remains the same if the line contains only one field (i.e. the 'errors' CSS class is applied to the 'form-row' div).