You are here

function copyright_block_block_configure in Copyright Block module 7.2

Same name and namespace in other branches
  1. 7 copyright_block.module \copyright_block_block_configure()

Implements hook_block_configure().

File

./copyright_block.module, line 23
Creates a dynamic copyright information block.

Code

function copyright_block_block_configure($delta = '') {
  $form = array();
  switch ($delta) {
    case 'copyright_block':
      $form['start_year'] = array(
        '#title' => t('Start year'),
        '#type' => 'textfield',
        '#required' => TRUE,
        '#default_value' => variable_get('copyright_block_start_year', date('Y')),
        '#element_validate' => array(
          'copyright_block_validate_start_year',
        ),
      );
      $form['separator'] = array(
        '#title' => t('Separator'),
        '#type' => 'textfield',
        '#required' => TRUE,
        '#default_value' => variable_get('copyright_block_separator', '-'),
      );
      $copyright_block_text = variable_get('copyright_block_text');
      $form['text'] = array(
        '#title' => t('Copyright statement text.'),
        '#type' => 'text_format',
        '#required' => TRUE,
        '#default_value' => $copyright_block_text['value'],
        '#format' => $copyright_block_text['format'],
      );
      $form['view']['token_help'] = array(
        '#title' => t('Replacement patterns'),
        '#type' => 'fieldset',
        '#collapsible' => TRUE,
        '#collapsed' => TRUE,
      );
      $form['view']['token_help']['help'] = array(
        '#markup' => theme('token_tree', array(
          'token_types' => array(
            'node',
          ),
        )),
      );
      break;
  }
  return $form;
}