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.
In ctools_modal_form_render()
there is the following:
...
// If there are messages for the form, render them.
if ($messages = theme('status_messages')) {
$output = '<div class="messages">' . $messages . '</div>' . $output;
}
Putting the $messages inside of a div with class "messages" causes problems for any theme that has a class for .messages because you always end up with <div class="messages"><div class="messages alert">...</div></div>
In this case a class definition like padding:10px;
will cause a doubling of that padding... Would you be open to changing that class to "messages_wrap" (or anything else?)
I'll happily submit the patch if you're amenable...
Comment | File | Size | Author |
---|---|---|---|
#1 | 1105420-ctools-remove-messages-extra-div-D7.patch | 456 bytes | Dave Reid |
#1 | 1105420-ctools-remove-messages-extra-div-D6.patch | 456 bytes | Dave Reid |
Comments
Comment #1
Dave ReidI tested this and it seems to be a good change actually. I'm not sure why we have the extra div? Regardless, here's a patch to remove the div wrapper for both 7.x-1.x and 6.x-1.x.
Comment #2
merlinofchaos CreditAttribution: merlinofchaos commentedStrange. I am sure that, at one point, that div had a purpose. No idea what it might've been, though.
Committed to D6 and D7.
Comment #3
bleen CreditAttribution: bleen commentedsweet!! Thanks!