Support for Drupal 7 is ending on 5 January 2025—it’s time to migrate to Drupal 10! Learn about the many benefits of Drupal 10 and find migration tools in our resource center.
Attached patch reintroduces field styling (field.css was not being called anymore, and still had node-specific selectors).
It also overhauls a little the HTML generated for multiple fields on edit forms (d-n-d table + add more button), to something more inline with the other form elements on the page (proper .form-item class for consistent margins, <label>
tag instead of just a styled <th>
)
+ lol for the ahah-new-content class that got renamed to ahah-new-field during the content.module -> field.module renaming spree :-)
See screenshots for a visual hint.
Comment | File | Size | Author |
---|---|---|---|
#24 | field-form-small-cleanup-370480-24.patch | 616 bytes | yched |
#22 | field.patch | 508 bytes | KarenS |
#19 | field.patch | 9.96 KB | KarenS |
#15 | field-form-cleanup-370480-15.patch | 11.11 KB | bjaspan |
#12 | field.patch | 9.89 KB | KarenS |
Comments
Comment #1
yched CreditAttribution: yched commentedDude, where are my file attachments ?
Retry.
Comment #2
yched CreditAttribution: yched commentedHem - last attempt for tonight.
Comment #3
yched CreditAttribution: yched commentedComment #5
yched CreditAttribution: yched commentedComment #6
yched CreditAttribution: yched commentedsigh, wrong patch.
Comment #8
yched CreditAttribution: yched commentedIf testbot is being dense and I'm being a jerk for consistently mixing my own patches, we'll get nowhere pretty fast.
Comment #9
yched CreditAttribution: yched commentedMove CSS inclusion to hook_init() (like node.module does). Including it at form build time doesn't work when the form is taken out of the cache after failed validation.
Comment #10
yched CreditAttribution: yched commentedrerolled, just in case
Comment #11
yched CreditAttribution: yched commentedRerolled, including the clear-block / clearfix rename.
+ bump - that patch is not a biggie, would be cool to have it in :-)
Comment #12
KarenS CreditAttribution: KarenS commentedI found a few more related fixes and a typo and missing widget settings for the Text module. This fix is needed to get the CCK UI working right so we can test the other field patches in the UI.
Comment #14
bjaspan CreditAttribution: bjaspan commentedPatch applies and seems to work. Frankly, Karen and yched are the only two people who *really* understand this part of the code, so if they say it is right, I'm not sure who else's review matters.
Clearly we need to train more people on the details of Field API form handling.
Comment #15
bjaspan CreditAttribution: bjaspan commentedOoops. When I said the patch applies, I meant "after I accounted for the fact that Karen rolled it from the wrong directory." :-)
Re-rolled.
Comment #16
Dries CreditAttribution: Dries commentedI might be wrong but I believe that ...
... will result in XHTML validation errors. I think it will put a div inside a span.
Comment #17
Dries CreditAttribution: Dries commented(We should totally add XHTML validation to SimpleTest.)
Comment #18
bjaspan CreditAttribution: bjaspan commented(Re #17: Yes, automatic XHTML validation in SimpleTest would be great. Also, we should run it automatically on the redesigned d.o during development and post-launch.)
re #16: It does not appear to put a div inside a span. Here is the XHTML generated for a multi-value text widget on an edit form:
I don't see a span anywhere. The prefix and suffix are wrapping another div.
NOTE: There is currently a bug in the CCK UI; you can't create a multi-value field with it. I worked around the bug by changing the 'cardinality' column of a field in field_config table directly. :-)
Comment #19
KarenS CreditAttribution: KarenS commentedThe bug in CCK UI is fixed and you can now use it to test these patches.
I found one more css change, the last few lines in this patch. I needed to make the css rule a bit more specific to get the width of text and number fields to display in the right width instead of spanning the whole width of the page.
I already know this patch will fail the bot's testing because it doesn't appear to come from the right location, but I have tried re-rolling it from every possible place I can think of and I get the same result. It is either a problem with Tortoise or my understanding of how to roll a patch, so I'll let someone else re-roll it into something the bot will like.
Comment #21
KarenS CreditAttribution: KarenS commentedMost of these changes just got committed in http://drupal.org/cvs?commit=181304. My last change to the .css got missed but it looks like everything else in this patch got committed there. I'll post a new patch with the incremental change in a moment.
Comment #22
KarenS CreditAttribution: KarenS commentedHere's another patch that will fail because it has the wrong root. I just spent an hour trying to find a way to get Tortoise to show the path in the file name and have given up, so someone will need to re-roll this patch for me.
Once re-rolled into a format the bot likes it should be a very simple no-brainer. The change is needed so the fields will obey the widget settings for the size of the input field.
Comment #24
yched CreditAttribution: yched commentedSame as #22, rolled from root.
I didn't participated in that followup patch, so I can set to RTBC.
Comment #25
bjaspan CreditAttribution: bjaspan commentedThe version of this patch accidentally committed with #392686: Switch to serial primary keys added 'widget_settings' to the structure returned by hook_field_info() (at least in text.module) which is only supposed to return info about field types, not widgets.
Comment #26
KarenS CreditAttribution: KarenS commentedThe last issue affects only the text module and is fixed in #372743: Body and teaser as fields, so if that gets in this is fixed.
Comment #27
yched CreditAttribution: yched commentedFixed now.