#7054 closed (duplicate)
help_text breaks formatting in Admin when using Admin option 'fields' to display several fields on the same line
Reported by: | Owned by: | Robert Myers | |
---|---|---|---|
Component: | contrib.admin | Version: | dev |
Severity: | Keywords: | admin css help_text fields newforms-admin | |
Cc: | andy@… | Triage Stage: | Accepted |
Has patch: | yes | Needs documentation: | no |
Needs tests: | no | Patch needs improvement: | no |
Easy pickings: | no | UI/UX: | no |
Description
Tested on trunk and newforms-admin.
I've searched for an existing ticket to no avail but it's hard to believe this hasn't cropped up for someone else.
Steps to reproduce:
The docs state:
To display multiple fields on the same line, wrap those fields in their own tuple. In this example, the first_name and last_name fields will display on the same line:
{ 'fields': (('first_name', 'last_name'), 'address', 'city', 'state'), }
However when a field has got 'help_text' set this causes the CSS to wrap the next field on to a new line.
Attachments (1)
Change History (7)
comment:1 by , 17 years ago
comment:2 by , 16 years ago
milestone: | → 1.0 |
---|---|
Triage Stage: | Unreviewed → Accepted |
by , 16 years ago
Attachment: | 7054.patch added |
---|
comment:3 by , 16 years ago
Has patch: | set |
---|---|
Owner: | changed from | to
Triage Stage: | Accepted → Design decision needed |
I have attached a patch which fixes the layout issue by wrapping the field in a div if there is more then one in the fieldset. I also fixed the tabular inline to display help text as well.
The only slightly questionable thing in this patch is I added len to the FieldLine class which was the only way I could think of testing the length of the fieldset. If there is a better way please let me know.
comment:4 by , 16 years ago
Triage Stage: | Design decision needed → Accepted |
---|
The ticket's already been accepted, so no need to move it to "design decision needed". That stage is for the ticket issue itself, not the approach/implementation in the patch. We'll check out your query when the patch is reviewed.
(No biggie, but it's good to keep the triage stage correct.)
comment:5 by , 16 years ago
Resolution: | → duplicate |
---|---|
Status: | new → closed |
This is a duplicate of #2612. The patch here is better, but to keep things manageable, I'll close in favor the other ticket. I have this patch locally and will likely use it to fix the bug.
Actually it is worse: it is not a CSS problem. A br is outputted in the html before the help text always.