function colorbox_node_form_alter in Colorbox Node 7.3
Implements hook_form_alter().
File
- ./
colorbox_node.module, line 64 - Creates a menu callback with support for displaying a node inside of a colorbox.
Code
function colorbox_node_form_alter(&$form, &$form_state, $form_id) {
switch ($form_id) {
case 'colorbox_admin_settings':
$form['colorbox_node'] = array(
'#type' => 'fieldset',
'#title' => t('Colorbox Node Integration'),
);
$form['colorbox_node']['colorbox_node_regions'] = array(
'#type' => 'checkbox',
'#title' => module_exists('context') ? t('Enable Regions') : t('Enable Regions <span class="error">Missing Context Module</span>'),
'#description' => t('This enables regions to be rendered inside the colorbox modal. The context module can further target a colorbox modal. <em><b>Experimental</b></em>'),
'#default_value' => variable_get('colorbox_node_regions', FALSE),
'#disabled' => !module_exists('context') ? TRUE : FALSE,
);
$form['colorbox_node']['colorbox_node_width'] = array(
'#type' => 'textfield',
'#title' => t('Default Width'),
'#description' => t('Default width of the colorbox loaded window. You must include the \'px\' or \'%\' suffix with your numeric value.'),
'#default_value' => variable_get('colorbox_node_width', '600px'),
);
$form['colorbox_node']['colorbox_node_height'] = array(
'#type' => 'textfield',
'#title' => t('Default Height'),
'#description' => t('Default height of the colorbox loaded window. You must include the \'px\' or \'%\' suffix with your numeric value.'),
'#default_value' => variable_get('colorbox_node_height', '600px'),
);
break;
}
}