function homebox_block_edit_form_builder in Homebox 7.2
Same name and namespace in other branches
- 6.3 homebox.module \homebox_block_edit_form_builder()
- 6.2 homebox.module \homebox_block_edit_form_builder()
- 7.3 homebox.module \homebox_block_edit_form_builder()
Get an edit form from the implementing module and add the standard buttons and submit handling.
1 string reference to 'homebox_block_edit_form_builder'
- homebox_forms in ./
homebox.module - Implements hook_forms().
File
- ./
homebox.module, line 717 - Homebox main file, takes care of global functions settings constants, etc.
Code
function homebox_block_edit_form_builder($form, &$form_state, $page, $block) {
$form = module_invoke($block->module, 'homebox_block_edit_form', $block);
$form['#attributes']['class'][] = 'clearfix';
$form['save'] = array(
'#type' => 'submit',
'#id' => 'save-' . $block->key,
'#value' => t('Save'),
'#ajax' => array(
'path' => $_GET['q'] . '/block/' . $block->key,
'event' => 'click',
'wrapper' => 'homebox-block-' . $block->key,
'method' => 'replaceWith',
),
);
$form['#submit'][] = 'homebox_block_edit_form_builder_submit';
return $form;
}