You are here

function block_box_form in Drupal 4

Same name and namespace in other branches
  1. 5 modules/block/block.module \block_box_form()
  2. 6 modules/block/block.module \block_box_form()
2 calls to block_box_form()
block_block in modules/block.module
Implementation of hook_block().
block_box_add in modules/block.module
Menu callback; displays the block creation form.

File

modules/block.module, line 504
Controls the boxes that are displayed around the main content.

Code

function block_box_form($edit = array()) {
  $form['info'] = array(
    '#type' => 'textfield',
    '#title' => t('Block description'),
    '#default_value' => $edit['info'],
    '#maxlength' => 64,
    '#description' => t('A brief description of your block. Used on the <a href="%overview">block overview page</a>.', array(
      '%overview' => url('admin/block'),
    )),
    '#required' => TRUE,
    '#weight' => -19,
  );
  $form['title'] = array(
    '#type' => 'textfield',
    '#title' => t('Block title'),
    '#default_value' => $edit['title'],
    '#maxlength' => 64,
    '#description' => t('The title of the block as shown to the user.'),
    '#weight' => -18,
  );
  $form['body_filter']['#weight'] = -17;
  $form['body_filter']['body'] = array(
    '#type' => 'textarea',
    '#title' => t('Block body'),
    '#default_value' => $edit['body'],
    '#rows' => 15,
    '#description' => t('The content of the block as shown to the user.'),
    '#weight' => -17,
  );
  $form['body_filter']['format'] = filter_form($edit['format'], -16);
  return $form;
}