orange_ecom_starter-2.0.x-dev/templates/input/input--submit.html.twig
templates/input/input--submit.html.twig
{% extends "input.html.twig" %}
{#
/**
* @file
* Theme suggestion for "button" input form element.
*
* Available variables:
* - attributes: A list of HTML attributes for the input element.
* - children: Optional additional rendered elements.
* - icon: An icon.
* - icon_only: Flag to display only the icon and not the label.
* - icon_position: Where an icon should be displayed.
* - label: button label.
* - prefix: Markup to display before the input element.
* - suffix: Markup to display after the input element.
* - type: The type of input.
*
* @see \Drupal\bootstrap\Plugin\Preprocess\InputButton
* @see \Drupal\bootstrap\Plugin\Preprocess\Input
* @see template_preprocess_input()
*
* @ingroup templates
*/
#}
{%
set classes = [
'btn',
button_type == 'primary' ? 'btn--primary',
attributes.hasClass('webform-button--next') ? 'btn--primary',
type == 'submit' ? 'js-form-submit',
]
%}
{% block input %}
<input{{ attributes.addClass(classes) }} />{{ children }}
<button type="button" class="form-submit--trigger">
{% if value %}
<span>{{ value }}</span>
{% endif %}
</button>
{% endblock %}
