function colorbox_node_handler_field_colorbox_node::options_form in Colorbox Node 7.2
Same name and namespace in other branches
- 7.3 views/colorbox_node_handler_field_colorbox_node.inc \colorbox_node_handler_field_colorbox_node::options_form()
Provide node in colorbox option
Overrides views_handler_field_node::options_form
File
- views/
colorbox_node_handler_field_colorbox_node.inc, line 26 - Views handlers for Colorbox Node module.
Class
- colorbox_node_handler_field_colorbox_node
- A handler to provide a field that is completely custom by the administrator.
Code
function options_form(&$form, &$form_state) {
parent::options_form($form, $form_state);
$form['link_to_node']['#weight'] = '-98';
$form['node_in_colorbox'] = array(
'#type' => 'checkbox',
'#title' => t('Display the content inside of a colorbox.'),
'#description' => t("Enable to add colorbox support for this node."),
'#default_value' => !empty($this->options['node_in_colorbox']),
'#dependency' => array(
'edit-options-link-to-node' => array(
1,
),
),
'#weight' => '-97',
);
$form['node_in_colorbox_width'] = array(
'#type' => 'textfield',
'#title' => t('Colorbox Width'),
'#default_value' => !empty($this->options['node_in_colorbox_width']) ? $this->options['node_in_colorbox_width'] : '600',
'#description' => t("Set a fixed total width. This includes borders and buttons. Example: \"100%\", or 600"),
'#dependency' => array(
'edit-options-link-to-node' => array(
1,
),
'edit-options-node-in-colorbox' => array(
1,
),
),
'#dependency_count' => 2,
'#weight' => -96,
);
$form['node_in_colorbox_height'] = array(
'#type' => 'textfield',
'#title' => t('Colorbox Height'),
'#default_value' => !empty($this->options['node_in_colorbox_height']) ? $this->options['node_in_colorbox_height'] : '600',
'#description' => t("Set a fixed total height. This includes borders and buttons. Example: \"100%\", or 600"),
'#dependency' => array(
'edit-options-link-to-node' => array(
1,
),
'edit-options-node-in-colorbox' => array(
1,
),
),
'#dependency_count' => 2,
'#weight' => -95,
);
}