This repository has been archived on 2025-01-19. You can view files and clone it, but cannot push or open issues or pull requests.
drupalcampbristol/web/modules/contrib/webform/templates/webform-composite-address.html.twig
2017-03-16 15:29:07 +00:00

52 lines
1.6 KiB
Twig

{#
/**
* @file
* Default theme implementation of an address composite webform element.
*
* Available variables:
* - content: The address webform element to be output.
* - flexbox: Determines if Flexbox layout should be applied to the composite
* element.
*
* @see template_preprocess_webform_address()
*
* @ingroup themeable
*/
#}
{{ attach_library('webform/webform.element.composite') }}
{% if flexbox %}
{% if content.address %}
<div class="webform-flexbox">
<div class="webform-flex webform-flex--1"><div class="webform-flex--container">{{ content.address }}</div></div>
</div>
{% endif %}
{% if content.address_2 %}
<div class="webform-flexbox">
<div class="webform-flex webform-flex--1"><div class="webform-flex--container">{{ content.address_2 }}</div></div>
</div>
{% endif %}
<div class="webform-flexbox">
{% if content.city %}
<div class="webform-flex webform-flex--1"><div class="webform-flex--container">{{ content.city }}</div></div>
{% endif %}
{% if content.state_province %}
<div class="webform-flex webform-flex--1"><div class="webform-flex--container">{{ content.state_province }}</div></div>
{% endif %}
{% if content.postal_code %}
<div class="webform-flex webform-flex--1"><div class="webform-flex--container">{{ content.postal_code }}</div></div>
{% endif %}
</div>
{% if content.country %}
<div class="webform-flexbox">
<div class="webform-flex webform-flex--1"><div class="webform-flex--container">{{ content.country }}</div></div>
</div>
{% endif %}
{% else %}
{{ content }}
{% endif %}