function publish_button_views_handler_node_link::options_form in Publish button 7
Default options form provides the label widget that all fields should have.
Overrides views_handler_field_node_link::options_form
File
- ./
publish_button_views_handler_node_link.inc, line 23 - View handler for the module.
Class
- publish_button_views_handler_node_link
- Extends the node link handler.
Code
function options_form(&$form, &$form_state) {
parent::options_form($form, $form_state);
// The default handler only have one text to display, unset to use two.
unset($form['text']);
$form['publish'] = array(
'#type' => 'textfield',
'#title' => t('Text to display for publishing'),
'#default_value' => !empty($this->options['publish']),
);
$form['unpublish'] = array(
'#type' => 'textfield',
'#title' => t('Text to display for unpublishing'),
'#default_value' => !empty($this->options['unpublish']),
);
}