function blocktheme_form_block_admin_configure_alter in Block Theme 6
Same name and namespace in other branches
- 7 blocktheme.module \blocktheme_form_block_admin_configure_alter()
Form for updating a block.
File
- ./
blocktheme.module, line 80 - Provides a configuration option to select custom themes for blocks
Code
function blocktheme_form_block_admin_configure_alter(&$form, &$form_state) {
$module = $form['module']['#value'];
$delta = $form['delta']['#value'];
$var_name = $module . '-' . $delta;
$options = blocktheme_get_blockthemes();
$blocktheme = blocktheme_get();
$blocktheme_vars = blocktheme_get_vars();
$form['block_settings']['#weight'] = -1;
$form['custom_block_theme'] = array(
'#type' => 'fieldset',
'#title' => t('Block Theme'),
'#weight' => 0,
'#collapsible' => TRUE,
'#collapsed' => FALSE,
);
$form['custom_block_theme']['blocktheme'] = array(
'#type' => 'select',
'#title' => t('Custom theme'),
'#default_value' => $blocktheme[$var_name],
'#options' => $options,
);
$form['custom_block_theme']['blocktheme_vars'] = array(
'#type' => 'textarea',
'#default_value' => blocktheme_format_vars_admin($blocktheme_vars[$var_name]),
'#title' => t('Custom block variables'),
'#description' => t('Enter one entry per line, in the format: <em>variable_name|variable_content</em>.'),
'#wysiwyg' => FALSE,
);
$form['#submit'][] = 'blocktheme_update';
}