function spaces_form_context_ui_editor_alter in Spaces 6.3
Same name and namespace in other branches
- 7.3 spaces.overrides.inc \spaces_form_context_ui_editor_alter()
- 7 spaces.overrides.inc \spaces_form_context_ui_editor_alter()
Implementation of hook_form_alter() for context_ui_context_editor.
1 call to spaces_form_context_ui_editor_alter()
- spaces_dashboard_editor in spaces_dashboard/
spaces_dashboard.module - Form builder: spaces dashboard editor. Clones and overrides form built by context_ui_editor().
File
- ./
spaces.overrides.inc, line 30
Code
function spaces_form_context_ui_editor_alter(&$form, &$form_state) {
$space = spaces_get_space();
if ($space && isset($form['buttons']['save']['#submit'])) {
$form['buttons']['save']['#submit'] = array(
'spaces_context_ui_editor_submit',
);
// Context layouts adds another button which needs treatment.
if (isset($form['contexts'])) {
foreach (element_children($form['contexts']) as $context) {
if (isset($form['contexts'][$context]['reaction-block']['layout'])) {
$form['contexts'][$context]['reaction-block']['layout']['update']['#submit'] = array(
'spaces_context_ui_editor_submit',
);
}
}
}
}
}