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.
Problem/Motivation
I've experienced minor problem when styling Execute PHP admin form because it doesn't have #actions container, which is common practice in all admin forms.
Proposed resolution
Add 'actions' parent level to 'Execute' button. Change:
$form['execute']['op'] = array('#type' => 'submit', '#value' => t('Execute'));
to:
$form['execute']['actions'] = array('#type' => 'actions');
$form['execute']['actions']['op'] = array('#type' => 'submit', '#value' => t('Execute'));
Remaining tasks
n/a
User interface changes
Button will follow admin theme standards, ex. in 'Seven' will be aligned to the right.
API changes
n/a
Comment | File | Size | Author |
---|---|---|---|
#4 | devel-add_actions_container-2448063-4-d7.patch | 4.54 KB | jacob.embree |
| |||
#4 | devel-add_actions_container-2448063-4-d8.patch | 4.57 KB | jacob.embree |
|
Comments
Comment #1
zaporylieHere is a patch.
Comment #2
jacob.embree CreditAttribution: jacob.embree at St. Louis Integration commentedShall we open another issue to do the rest of the forms throughout the project or expand this one?
Comment #3
salvisYes, it would be really nice to have them all in one issue!
However, this is a D8-first issue. Is there any work needed in D8?
Comment #4
jacob.embree CreditAttribution: jacob.embree at St. Louis Integration commentedComment #5
jacob.embree CreditAttribution: jacob.embree at St. Louis Integration commentedComment #8
salvisThank you, jacob.embree and zaporylie!