You are here

function SarniaViewsHandlerFilter::options_submit in Sarnia 7

Simple submit handler.

Overrides views_handler_filter::options_submit

File

handlers/handler_filter.inc, line 57

Class

SarniaViewsHandlerFilter
Really basic filter handler for filtering Solr documents in Views.

Code

function options_submit(&$form, &$form_state) {
  parent::options_submit($form, $form_state);

  // Set a reasonable label if it is the first save and none was specified, or
  // if the the previous label matched the previous property name and has not
  // been changed.
  $values =& $form_state['values']['options'];
  $default_title = 'Solr property';
  if (!isset($this->options['solr_property']) && $values['expose']['label'] == $default_title || $this->options['solr_property'] == $this->options['expose']['label'] && $this->options['expose']['label'] == $values['expose']['label']) {
    $values['expose']['label'] = $values['solr_property'];
  }
}