@@ -53,15 +53,15 @@ function ajax_chain_select_element_process($element, &$form_state, $form) {
53
53
$is_submitted = (!empty($form_state['input']));
54
54
$submitted_values = $form_state['values']['region'];
55
55
56
- $region_element = array(
56
+ $chain_select_element = array(
57
57
'#array_parents' => array(),
58
58
'#tree' => FALSE,
59
59
'#attached' => array(
60
60
'js' => array(drupal_get_path('module', 'ajax_chain_select') . '/ajax_chain_select.js'),
61
61
),
62
62
);
63
63
64
- $region_element [$element_name] = array(
64
+ $chain_select_element [$element_name] = array(
65
65
'#type' => 'fieldset',
66
66
'#tree' => TRUE,
67
67
'#id' => !empty($element['#id']) ? $element['#id'] : drupal_html_id('edit-' . implode('-', $element['#parents'])),
@@ -74,9 +74,9 @@ function ajax_chain_select_element_process($element, &$form_state, $form) {
74
74
'#data_callback' => $data_callback,
75
75
);
76
76
77
- $region_element [$element_name]['#attached']['js'][] = array(
77
+ $chain_select_element [$element_name]['#attached']['js'][] = array(
78
78
'type' => 'setting',
79
- 'data' => array('ajax_chain_select' => array($region_element [$element_name]['#id'] => $settings)),
79
+ 'data' => array('ajax_chain_select' => array($chain_select_element [$element_name]['#id'] => $settings)),
80
80
);
81
81
82
82
$index = 0;
@@ -112,7 +112,7 @@ function ajax_chain_select_element_process($element, &$form_state, $form) {
112
112
unset($level_config['#default_value']);
113
113
}
114
114
115
- $region_element [$element_name][$level] = array(
115
+ $chain_select_element [$element_name][$level] = array(
116
116
'#type' => 'select',
117
117
'#options' => $data,
118
118
'#title' => !empty($level_config['#title']) ? $level_config['#title'] : '',
@@ -126,27 +126,27 @@ function ajax_chain_select_element_process($element, &$form_state, $form) {
126
126
);
127
127
128
128
if ($index != $levels_count - 1) {
129
- $region_element [$element_name][$level]['#attributes']['class'] = array('ajax-chain-select-select');
129
+ $chain_select_element [$element_name][$level]['#attributes']['class'] = array('ajax-chain-select-select');
130
130
}
131
131
132
132
$index++;
133
133
$previous_level = $level;
134
134
$previous_level_config = $level_config;
135
135
}
136
136
137
- $region_element [$element_name]['dc'] = array(
137
+ $chain_select_element [$element_name]['dc'] = array(
138
138
'#type' => 'textfield',
139
139
'#value' => base64_encode($element['#data_callback']),
140
140
'#attributes' => array('hidden' => TRUE, 'class' => array('acs-dc')),
141
141
);
142
142
143
- $region_element [$element_name]['dch'] = array(
143
+ $chain_select_element [$element_name]['dch'] = array(
144
144
'#type' => 'textfield',
145
145
'#value' => ajax_chain_select_get_token($element['#data_callback']),
146
146
'#attributes' => array('hidden' => TRUE, 'class' => array('acs-dch')),
147
147
);
148
148
149
- return $region_element ;
149
+ return $chain_select_element ;
150
150
}
151
151
152
152
/**
0 commit comments