Revision 1f623f01
Added by Assos Assos almost 8 years ago
drupal7/sites/all/themes/bootstrap/templates/system/form-element.func.php | ||
---|---|---|
80 | 80 |
} |
81 | 81 |
|
82 | 82 |
// Check for errors and set correct error class. |
83 |
if ((isset($element['#parents']) && form_get_error($element)) || (!empty($element['#required']) && bootstrap_setting('forms_required_has_error'))) { |
|
83 |
if ((isset($element['#parents']) && form_get_error($element) !== NULL) || (!empty($element['#required']) && bootstrap_setting('forms_required_has_error'))) {
|
|
84 | 84 |
$wrapper_attributes['class'][] = 'has-error'; |
85 | 85 |
} |
86 | 86 |
|
... | ... | |
156 | 156 |
'#attributes' => array( |
157 | 157 |
'class' => array('help-block'), |
158 | 158 |
), |
159 |
'#weight' => isset($element['#description_display']) && $element['#description_display'] === 'before' ? 0 : 2, |
|
159 |
'#weight' => isset($element['#description_display']) && $element['#description_display'] === 'before' ? 0 : 20,
|
|
160 | 160 |
0 => array('#markup' => filter_xss_admin($element['#description'])), |
161 | 161 |
); |
162 | 162 |
} |
Also available in: Unified diff
Weekly update of contrib modules