function joyride_context_reaction_add::options_form in Joyride JQuery for Drupal Site Tours 7
Overrides context_reaction::options_form
File
- plugins/
context/ joyride_context_reaction_add.inc, line 4
Class
Code
function options_form($context) {
$context_values = $this
->fetch_from_context($context, 'values');
return array(
'joyride_auto_start' => array(
'#type' => 'checkbox',
'#title' => t('Start tour automatically'),
'#description' => t('Whatever to start Joyride on page load. If you disable this be sure to add <em>joyride start</em> link to the page.
This could be done via adding a "Joyride Start Tour" block, or by invoking <code>print theme(\'joyride_start_link\')</code> in your theme.'),
'#default_value' => isset($context_values['joyride_auto_start']) ? $context_values['joyride_auto_start'] : FALSE,
),
'joyride_play_once' => array(
'#type' => 'checkbox',
'#title' => t('Play tour only once'),
'#description' => t('Check this to play the tour only once'),
'#default_value' => isset($context_values['joyride_play_once']) ? $context_values['joyride_play_once'] : FALSE,
'#states' => array(
'visible' => array(
':input[type="checkbox"]#edit-reactions-plugins-joyride-add-joyride-auto-start' => array(
'checked' => TRUE,
),
),
),
),
'joyride_tour_content' => array(
'#type' => 'textarea',
'#title' => t('Joyride Tour Tips'),
'#description' => t('Please enter Joyride Tips content. These tips will be used to initialize Joyride plugin on selected page.'),
'#default_value' => isset($context_values['joyride_tour_content']) ? $context_values['joyride_tour_content'] : NULL,
'#rows' => 24,
),
);
}