Skip to content
Snippets Groups Projects
Commit 411b23fd authored by Anton Karpov's avatar Anton Karpov Committed by Alberto Siles
Browse files

Issue #2892364 by brandonratz, AWD Studio, Pawelgorski87, krina.addweb,...

Issue #2892364 by brandonratz, AWD Studio, Pawelgorski87, krina.addweb, hatuhay: Undefined index in bootstrap_barrio_preprocess_form_element
parent 8c88768b
No related branches found
No related tags found
No related merge requests found
...@@ -50,3 +50,13 @@ bb_card3stack: ...@@ -50,3 +50,13 @@ bb_card3stack:
label: Image label: Image
third: third:
label: Second label: Second
bb_media:
label: Media
category: Barrio
template: templates/ds/layout--ds-media
class: '\Drupal\ds\Plugin\DsLayout'
regions:
first:
label: Image
second:
label: Content
...@@ -310,14 +310,16 @@ function bootstrap_barrio_preprocess_block(&$variables) { ...@@ -310,14 +310,16 @@ function bootstrap_barrio_preprocess_block(&$variables) {
} }
function bootstrap_barrio_preprocess_form_element(&$variables) { function bootstrap_barrio_preprocess_form_element(&$variables) {
if ( is_object($variables['label']['#title']) && !$variables['label']['#title'] instanceof \Drupal\Component\Render\MarkupInterface) { if (isset($variables['label']['#title'])) {
$variables['input_title'] = NULL; if ( is_object($variables['label']['#title']) && !$variables['label']['#title'] instanceof \Drupal\Component\Render\MarkupInterface) {
} $variables['input_title'] = NULL;
elseif ( is_object($variables['label']['#title']) ) { }
$variables['input_title'] = $variables['label']['#title']; elseif ( is_object($variables['label']['#title']) ) {
} $variables['input_title'] = $variables['label']['#title'];
else { }
$variables['input_title'] = $variables['label']['#title']; else {
$variables['input_title'] = $variables['label']['#title'];
}
} }
if (isset($variables['element']['#attributes'])) { if (isset($variables['element']['#attributes'])) {
$variables['input_attributes'] = new Attribute($variables['element']['#attributes']); $variables['input_attributes'] = new Attribute($variables['element']['#attributes']);
......
...@@ -16,6 +16,6 @@ ...@@ -16,6 +16,6 @@
#} #}
{{ title_prefix }} {{ title_prefix }}
{% if title %} {% if title %}
<h1{{ title_attributes.addClass('page-title') }}>{{ title }}</h1> <h1{{ title_attributes.addClass('title') }}>{{ title }}</h1>
{% endif %} {% endif %}
{{ title_suffix }} {{ title_suffix }}
{#
/**
* @file
* Display Suite media.
*
* Available variables:
* - outer_wrapper: outer wrapper element
* - first_wrapper: wrapper element around first region
* - second_wrapper: wrapper element around second region
* - attributes: layout attributes
* - first_attributes: attributes for first region
* - second_attributes: attributes for second region
* - first: content of first region
* - second: content of second region
*/
#}
<{{ outer_wrapper }}{{ attributes.addClass('media', 'clearfix') }}>
{{ title_suffix.contextual_links }}
{{ first }}
<{{ second_wrapper }}{{ second_attributes.addClass('media-body') }}>
{{ second }}
</{{ second_wrapper }}>
</{{ outer_wrapper }}>
{% extends "@classy/content/page-title.html.twig" %}
{#
/**
* @file
* Bartik's theme implementation for a page title.
*
* Available variables:
* - title_attributes: HTML attributes for the page title element.
* - title_prefix: Additional output populated by modules, intended to be
* displayed in front of the main title tag that appears in the template.
* - title: The page title, for use in the actual content.
* - title_suffix: Additional output populated by modules, intended to be
* displayed after the main title tag that appears in the template.
*/
#}
{% set title_attributes = title_attributes.addClass('title') %}
...@@ -135,9 +135,7 @@ ...@@ -135,9 +135,7 @@
{% block content %} {% block content %}
<div id="main" class="{{ container }}"> <div id="main" class="{{ container }}">
{% if page.breadcrumb %} {% if page.breadcrumb %}
<div class="row"> {{ page.breadcrumb }}
{{ page.breadcrumb }}
</div>
{% endif %} {% endif %}
<div class="row row-offcanvas row-offcanvas-left clearfix"> <div class="row row-offcanvas row-offcanvas-left clearfix">
<main{{ content_attributes }}> <main{{ content_attributes }}>
......
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