You are here

function workflow_views_handler_filter_sid::extra_options_form in Workflow 6.2

Same name and namespace in other branches
  1. 6 workflow_views/includes/workflow_views_handler_filter_sid.inc \workflow_views_handler_filter_sid::extra_options_form()

File

workflow_views/includes/workflow_views_handler_filter_sid.inc, line 26
Provide views filter handler for workflow.module.

Class

workflow_views_handler_filter_sid
Filter by state.

Code

function extra_options_form(&$form, &$form_state) {
  if ($this->options['limit']) {

    // We only do this when the form is displayed so this query doesn't run
    // unnecessarily just when the object is constructed.
    if ($this->options['wid'] == 0) {
      $this->options['wid'] = db_result(db_query('SELECT MIN(wid) FROM {workflows}'));
    }
    $form['wid'] = array(
      '#prefix' => '<div class="views-left-40">',
      '#suffix' => '</div>',
      '#type' => 'radios',
      '#title' => t('Workflows'),
      '#options' => workflow_get_all(),
      '#description' => t('Select which workflow the states are given from.'),
      '#default_value' => $this->options['wid'],
    );
  }
  $form['include_creation'] = array(
    '#type' => 'checkbox',
    '#title' => 'Include (creation) state?',
    '#default_value' => $this->options['include_creation'],
  );
}