You are here

function block_class_form_alter in Block Class 5

Same name and namespace in other branches
  1. 6 block_class.module \block_class_form_alter()
  2. 7.2 block_class.module \block_class_form_alter()
  3. 7 block_class.module \block_class_form_alter()

File

./block_class.module, line 36

Code

function block_class_form_alter($form_id, &$form) {
  if ($form_id == 'block_admin_configure') {
    $block->module = $form['module']['#value'];
    $block->delta = $form['delta']['#value'];
    $attributes = block_class_attributes($block);
    $form['block_class'] = array(
      '#type' => 'fieldset',
      '#title' => t('Block Class settings'),
      '#collapsible' => TRUE,
      '#weight' => -1,
    );
    $form['block_class']['css_class'] = array(
      '#type' => 'textfield',
      '#title' => t('CSS class(es)'),
      '#default_value' => $attributes->css_class,
      '#description' => t('Separate classes with a space. IMPORTANT: You must add <?php print block_class($block); ?> to your theme\'s block.tpl.php file to make the classes appear.'),
    );
  }
}