Skip to content
Snippets Groups Projects
Commit dd7b6c7e authored by Alberto Siles's avatar Alberto Siles
Browse files

Issue #2668298: Custom Search Module Conflict.

parent 78129f08
No related branches found
Tags 8.x-4.6
No related merge requests found
......@@ -332,9 +332,12 @@ function bootstrap_barrio_preprocess_block(&$variables) {
}
function bootstrap_barrio_preprocess_form_element(&$variables) {
if (is_object($variables['label']['#title'])) {
if ( is_object($variables['label']['#title']) ) {
$variables['input_title'] = $variables['label']['#title']->render();
}
else {
$variables['input_title'] = $variables['label']['#title'];
}
$variables['input_attributes'] = new Attribute($variables['element']['#attributes']);
}
......
......@@ -50,6 +50,7 @@
'js-form-item',
'js-form-type-' ~ type|clean_class,
type in ['checkbox', 'radio'] ? type|clean_class : 'form-type-' ~ type|clean_class,
type in ['checkbox', 'radio'] ? form-check,
'js-form-item-' ~ name|clean_class,
'form-item-' ~ name|clean_class,
title_display not in ['after', 'before'] ? 'form-no-label',
......@@ -74,11 +75,11 @@
{{ description.content }}
</div>
{% endif %}
<label>
<label class="form-check-label">
{% if label_display == 'before' %}
{{ input_title }}&nbsp;
{% endif %}
<input{{ input_attributes }}>
<input{{ input_attributes.addClass('form-check-input') }}>
{% if label_display == 'after' %}
&nbsp;{{ input_title }}
{% endif %}
......@@ -97,7 +98,7 @@
</small>
{% endif %}
</div>
{% else %}
{% else %}
<fieldset{{ attributes.addClass(classes, 'form-group') }}>
{% if label_display in ['before', 'invisible'] %}
{{ label }}
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment