semanticui-8.x-1.x-dev/templates/form/input--submit.html.twig

templates/form/input--submit.html.twig
{#
/**
 * @file
 * Theme override for an 'input' #type form element.
 *
 * Available variables:
 * - attributes: A list of HTML attributes for the input element.
 * - children: Optional additional rendered elements.
 *
 * @see template_preprocess_input()
 */
#}
{# Colorize button depending on the value. #}
{% set color_classes = element['#value']|render in ['Add'|t, 'Create'|t, 'Write'|t] ? 'positive' %}
{% set color_classes = not color_classes and element['#value']|render in ['Export'|t, 'Import'|t, 'Restore'|t, 'Rebuild'|t] ? 'orange' : color_classes %}
{% set color_classes = not color_classes and element['#value']|render in ['Delete'|t, 'Remove'|t] ? 'negative' : color_classes %}
<input{{ attributes.addClass('ui').addClass(color_classes) }} />{{ children }}

Главная | Обратная связь

drupal hosting | друпал хостинг | it patrol .inc