function block_box_form in Drupal 5
Same name and namespace in other branches
- 4 modules/block.module \block_box_form()
- 6 modules/block/block.module \block_box_form()
1 call to block_box_form()
- block_block in modules/
block/ block.module - Implementation of hook_block().
1 string reference to 'block_box_form'
- block_menu in modules/
block/ block.module - Implementation of hook_menu().
File
- modules/
block/ block.module, line 543 - 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/build/block'),
)),
'#required' => TRUE,
'#weight' => -19,
);
$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,
);
if (!isset($edit['format'])) {
$edit['format'] = FILTER_FORMAT_DEFAULT;
}
$form['body_filter']['format'] = filter_form($edit['format'], -16);
$form['submit'] = array(
'#type' => 'submit',
'#value' => t('Save block'),
);
return $form;
}