Commit e542b7a2 authored by dawehner's avatar dawehner Committed by tim.plunkett
Browse files

Issue #1742858: Remove dependency from the hybrid filter patch.

parent e7209241
......@@ -500,7 +500,6 @@ function options_form(&$form, &$form_state) {
':input[name="options[custom_label]"]' => array('checked' => TRUE),
),
),
'#weight' => -102,
);
$form['element_label_colon'] = array(
......
......@@ -953,9 +953,22 @@ function build_group_form(&$form, &$form_state) {
// are displayed.
$without_children = TRUE;
foreach (element_children($row['value']) as $children) {
if (isset($row['value'][$children]['#dependency']['edit-options-operator'])) {
$row['value'][$children]['#dependency']["edit-options-group-info-group-items-$item_id-operator"] = $row['value'][$children]['#dependency']['edit-options-operator'];
unset($row['value'][$children]['#dependency']['edit-options-operator']);
$has_state = FALSE;
$states = array();
foreach ($row['value'][$children]['#states']['visible'] as $key => $state) {
if (isset($state[':input[name="options[operator]"]'])) {
$has_state = TRUE;
$states[$key] = $state[':input[name="options[operator]"]']['value'];
}
}
if ($has_state) {
foreach ($states as $key => $state) {
$row['value'][$children]['#states']['visible'][] = array(
':input[name="options[group_info][group_items][' . $item_id . '][operator]"]' => array('value' => $state),
);
unset($row['value'][$children]['#states']['visible'][$key]);
}
$row['value'][$children]['#title'] = '';
if (!empty($this->options['group_info']['group_items'][$item_id]['value'][$children])) {
......
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