By dave reid on
Change record status:
Published (View all published change records)
Project:
Introduced in branch:
7.x-2.x
Introduced in version:
7.x-2.0-unstable3
Issue links:
Description:
For Media browser plugins that output a form, the use of $form['actions'] for all the submit buttons is required so that the fake cancel button can be properly added in the correct place.
Before:
function mymodule_media_browser_form($form, &$form_state) {
...
$form['submit'] = array(
'#type' => 'submit',
'#value' => t('Submit'),
);
return $form;
}
After:
function mymodule_media_browser_form($form, &$form_state) {
...
$form['actions'] = array('#type' => 'actions');
$form['actions']['submit'] = array(
'#type' => 'submit',
'#value' => t('Submit'),
);
return $form;
}
Impacts:
Module developers