color-field-widget-box.html.twig 880 B

1234567891011121314151617181920212223242526272829303132333435363738394041
  1. {#
  2. /**
  3. * @file
  4. * Default theme implementation of a color box form wrapper.
  5. *
  6. * Available variables:
  7. * - content: The form element to be output, usually a datelist, or datetime.
  8. * - title: The title of the form element.
  9. * - title_attributes: HTML attributes for the title wrapper.
  10. * - description: Description text for the form element.
  11. * - required: An indicator for whether the associated form element is required.
  12. *
  13. * @see template_preprocess()
  14. * @see template_preprocess_color_field_widget_box()
  15. *
  16. * @ingroup themeable
  17. */
  18. #}
  19. {%
  20. set title_classes = [
  21. required ? 'js-form-required',
  22. required ? 'form-required',
  23. ]
  24. %}
  25. {% if title %}
  26. <h4{{ title_attributes.addClass(title_classes) }}>{{ title }}</h4>
  27. {% endif %}
  28. <div class="container-inline">
  29. {{ color }}
  30. {{ opacity }}
  31. </div>
  32. {% if errors %}
  33. <div>
  34. {{ errors }}
  35. </div>
  36. {% endif %}
  37. {{ description }}