Skip to content
Snippets Groups Projects
Commit d2c9b80d authored by Daniel Wehner's avatar Daniel Wehner Committed by Tim Plunkett
Browse files

Issue #1720734 by dawehner, damiankloip: Allow many to one handler to work with strings.

parent 14a8b0df
No related branches found
No related tags found
2 merge requests!7452Issue #1797438. HTML5 validation is preventing form submit and not fully...,!789Issue #3210310: Adjust Database API to remove deprecated Drupal 9 code in Drupal 10
......@@ -63,15 +63,13 @@ function options_form(&$form, &$form_state) {
parent::options_form($form, $form_state);
// allow + for or, , for and
if (!empty($this->definition['numeric'])) {
$form['break_phrase'] = array(
'#type' => 'checkbox',
'#title' => t('Allow multiple values'),
'#description' => t('If selected, users can enter multiple values in the form of 1+2+3 (for OR) or 1,2,3 (for AND).'),
'#default_value' => !empty($this->options['break_phrase']),
'#fieldset' => 'more',
);
}
$form['break_phrase'] = array(
'#type' => 'checkbox',
'#title' => t('Allow multiple values'),
'#description' => t('If selected, users can enter multiple values in the form of 1+2+3 (for OR) or 1,2,3 (for AND).'),
'#default_value' => !empty($this->options['break_phrase']),
'#fieldset' => 'more',
);
$form['add_table'] = array(
'#type' => 'checkbox',
......@@ -118,7 +116,12 @@ function query($group_by = FALSE) {
}
if (!empty($this->options['break_phrase'])) {
views_break_phrase($this->argument, $this);
if (!empty($this->definition['nummeric'])) {
views_break_phrase($this->argument, $this);
}
else {
views_break_phrase_string($this->argument, $this);
}
}
else {
$this->value = array($this->argument);
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment