You are here

function drupagram_views_handler_field_xss::options_form in Drupagram 7

Default options form provides the label widget that all fields should have.

Overrides views_handler_field::options_form

File

./drupagram_views_field_handlers.inc, line 23
Drupagram views field handlers.

Class

drupagram_views_handler_field_xss
Process Instagram-style @usernames and URLs before filtering XSS.

Code

function options_form(&$form, &$form_state) {
  parent::options_form($form, $form_state);
  $form['link_urls'] = array(
    '#title' => t('Link urls to their destinations'),
    '#type' => 'checkbox',
    '#default_value' => !empty($this->options['link_urls']),
  );
  $form['link_usernames'] = array(
    '#title' => t('Link Instagram @usernames to their Instagram.com urls'),
    '#type' => 'checkbox',
    '#default_value' => !empty($this->options['link_usernames']),
  );
  $form['link_hashtags'] = array(
    '#title' => t('Link Instagram #hashtags to another url'),
    '#type' => 'checkbox',
    '#default_value' => !empty($this->options['link_hashtags']),
  );
  $form['hashtags_url'] = array(
    '#type' => 'textfield',
    '#default_value' => $this->options['hashtags_url'],
    '#process' => array(
      'ctools_dependent_process',
    ),
    '#dependency' => array(
      'edit-options-link-hashtags' => array(
        TRUE,
      ),
    ),
  );
}