Commit acdddeab authored by poojaganjage's avatar poojaganjage Committed by Neslee Canil Pinto
Browse files

Issue #3092192 by Pooja Ganjage, dead_arm: Place both min and max inputs in wrapper for slider

parent 157d9657
......@@ -159,7 +159,7 @@ function template_preprocess_bef_hidden(array &$variables) {
];
}
// @todo:
// @todo
// Check for optgroups. Put subelements in the $element_set array and add a
// group heading. Otherwise, just add the element to the set.
// $element_set = array();
......
......@@ -104,7 +104,7 @@ class DatePickers extends FilterWidgetBase {
/**
* Convert Date API formatting to jQuery formatDate formatting.
*
* @TODO: To be honest, I'm not sure this is needed. Can you set a
* @todo To be honest, I'm not sure this is needed. Can you set a
* Date API field to accept anything other than Y-m-d? Well, better
* safe than sorry...
*
......
......@@ -120,7 +120,7 @@ abstract class FilterWidgetBase extends BetterExposedFiltersWidgetBase implement
// Allow rewriting of filter options for any filter. String and numeric
// filters allow unlimited filter options via textfields, so we can't
// offer rewriting for those.
// @TODO: check other core filter types
// @todo check other core filter types
if ((!$filter instanceof StringFilter && !$filter instanceof NumericFilter) || $filter->isAGroup()) {
$form['advanced']['rewrite']['filter_rewrite_values'] = [
'#type' => 'textarea',
......@@ -181,7 +181,7 @@ abstract class FilterWidgetBase extends BetterExposedFiltersWidgetBase implement
// Check for placeholder text.
if (!empty($this->configuration['advanced']['placeholder_text'])) {
// @todo: Add token replacement for placeholder text.
// @todo Add token replacement for placeholder text.
$form[$field_id]['#placeholder'] = $this->t($this->configuration['advanced']['placeholder_text']);
}
......
......@@ -68,14 +68,19 @@ class Sliders extends FilterWidgetBase {
$form = parent::buildConfigurationForm($form, $form_state);
$form['min'] = [
$form['wrapper'] = [
'#type' => 'container',
'#attributes' => ['class' => ['']],
];
$form['wrapper']['min'] = [
'#type' => 'number',
'#title' => $this->t('Range minimum'),
'#default_value' => $this->configuration['min'],
'#description' => $this->t('The minimum allowed value for the jQuery range slider. It can be positive, negative, or zero and have up to 11 decimal places.'),
];
$form['max'] = [
$form['wrapper']['max'] = [
'#type' => 'number',
'#title' => $this->t('Range maximum'),
'#default_value' => $this->configuration['max'],
......
......@@ -120,7 +120,7 @@ class BetterExposedFilters extends InputRequired {
// Initialize options if any sort is exposed.
// Iterate over each sort and determine if any sorts are exposed.
$is_sort_exposed = FALSE;
/* @var \Drupal\views\Plugin\views\HandlerBase $sort */
/** @var \Drupal\views\Plugin\views\HandlerBase $sort */
foreach ($this->view->display_handler->getHandlers('sort') as $sort) {
if ($sort->isExposed()) {
$is_sort_exposed = TRUE;
......@@ -138,7 +138,7 @@ class BetterExposedFilters extends InputRequired {
}
// Go through each exposed filter and set default format.
/* @var \Drupal\views\Plugin\views\HandlerBase $filter */
/** @var \Drupal\views\Plugin\views\HandlerBase $filter */
foreach ($this->view->display_handler->getHandlers('filter') as $filter_id => $filter) {
if (!$filter->isExposed()) {
continue;
......@@ -323,7 +323,7 @@ class BetterExposedFilters extends InputRequired {
// Iterate over each sort and determine if any sorts are exposed.
$is_sort_exposed = FALSE;
/* @var \Drupal\views\Plugin\views\HandlerBase $sort */
/** @var \Drupal\views\Plugin\views\HandlerBase $sort */
foreach ($this->view->display_handler->getHandlers('sort') as $sort) {
if ($sort->isExposed()) {
$is_sort_exposed = TRUE;
......@@ -465,7 +465,7 @@ class BetterExposedFilters extends InputRequired {
];
// Iterate over each filter and add BEF filter options.
/* @var \Drupal\views\Plugin\views\HandlerBase $filter */
/** @var \Drupal\views\Plugin\views\HandlerBase $filter */
foreach ($this->view->display_handler->getHandlers('filter') as $filter_id => $filter) {
if (!$filter->isExposed()) {
continue;
......@@ -575,7 +575,7 @@ class BetterExposedFilters extends InputRequired {
}
// Shorthand for all filter handlers in this view.
/* @var \Drupal\views\Plugin\views\HandlerBase[] $filters */
/** @var \Drupal\views\Plugin\views\HandlerBase[] $filters */
$filters = $this->view->display_handler->handlers['filter'];
// Iterate over all filter, sort and pager plugins.
......@@ -639,7 +639,7 @@ class BetterExposedFilters extends InputRequired {
$bef_options = &$options['bef'];
// Shorthand for all filter handlers in this view.
/* @var \Drupal\views\Plugin\views\HandlerBase[] $filters */
/** @var \Drupal\views\Plugin\views\HandlerBase[] $filters */
$filters = $this->view->display_handler->handlers['filter'];
parent::submitOptionsForm($form, $form_state);
......@@ -794,7 +794,7 @@ class BetterExposedFilters extends InputRequired {
*/
// Shorthand for all filter handlers in this view.
/* @var \Drupal\views\Plugin\views\HandlerBase[] $filters */
/** @var \Drupal\views\Plugin\views\HandlerBase[] $filters */
$filters = $this->view->display_handler->handlers['filter'];
// Iterate over all exposed filters.
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment