You are here

function homebox_block_edit_form_builder in Homebox 6.3

Same name and namespace in other branches
  1. 6.2 homebox.module \homebox_block_edit_form_builder()
  2. 7.3 homebox.module \homebox_block_edit_form_builder()
  3. 7.2 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
Implementation of hook_forms().

File

./homebox.module, line 651
Homebox main file, takes care of global functions settings constants, etc.

Code

function homebox_block_edit_form_builder(&$form_state, $page, $block) {
  $form = module_invoke($block->module, 'homebox_block_edit_form', $block);
  $form['#attributes']['class'] = 'clear-block';
  $form['save'] = array(
    '#type' => 'submit',
    '#id' => 'save-' . $block->key,
    '#value' => t('Save'),
    '#ahah' => 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;
}