Révision 4eeb3b46
Ajouté par Assos Assos il y a presque 8 ans
drupal7/sites/all/themes/bootstrap/templates/system/form-element.func.php | ||
---|---|---|
117 | 117 |
// Render the label for the form element. |
118 | 118 |
$build['label'] = array( |
119 | 119 |
'#markup' => theme('form_element_label', $variables), |
120 |
'#weight' => $element['#title_display'] === 'before' ? 0 : 2, |
|
120 | 121 |
); |
121 | 122 |
|
122 |
// Increase the label weight if it should be displayed after the element. |
|
123 |
if ($element['#title_display'] === 'after') { |
|
124 |
$build['label']['#weight'] = 10; |
|
125 |
} |
|
126 |
|
|
127 | 123 |
// Checkboxes and radios render the input element inside the label. If the |
128 | 124 |
// element is neither of those, then the input element must be rendered here. |
129 | 125 |
if (!$checkbox && !$radio) { |
... | ... | |
149 | 145 |
'#markup' => $element['#children'], |
150 | 146 |
'#prefix' => !empty($prefix) ? $prefix : NULL, |
151 | 147 |
'#suffix' => !empty($suffix) ? $suffix : NULL, |
148 |
'#weight' => 1, |
|
152 | 149 |
); |
153 | 150 |
} |
154 | 151 |
|
... | ... | |
159 | 156 |
'#attributes' => array( |
160 | 157 |
'class' => array('help-block'), |
161 | 158 |
), |
162 |
'#weight' => 20,
|
|
159 |
'#weight' => isset($element['#description_display']) && $element['#description_display'] === 'before' ? 0 : 2,
|
|
163 | 160 |
0 => array('#markup' => filter_xss_admin($element['#description'])), |
164 | 161 |
); |
165 | 162 |
} |
Formats disponibles : Unified diff
Weekly update of contrib modules