You are here

yamlform-composite-creditcard.html.twig in YAML Form 8

Default theme implementation of a creditcard composite form element.

Available variables:

  • content: The creditcard form element to be output.
  • flexbox: Determines if Flexbox layout should be applied to the composite element.

See also

template_preprocess_yamlform_creditcard()

File

templates/yamlform-composite-creditcard.html.twig
View source
  1. {#
  2. /**
  3. * @file
  4. * Default theme implementation of a creditcard composite form element.
  5. *
  6. * Available variables:
  7. * - content: The creditcard form element to be output.
  8. * - flexbox: Determines if Flexbox layout should be applied to the composite
  9. * element.
  10. *
  11. * @see template_preprocess_yamlform_creditcard()
  12. *
  13. * @ingroup themeable
  14. */
  15. #}
  16. {{ attach_library('yamlform/yamlform.element.composite') }}
  17. {% if flexbox %}
  18. {{ content.warning }}
  19. {% if content.name %}
  20. <div class="yamlform-flexbox">
  21. <div class="yamlform-flex yamlform-flex--1"><div class="yamlform-flex--container">{{ content.name }}</div></div>
  22. </div>
  23. {% endif %}
  24. <div class="yamlform-flexbox">
  25. {% if content.type %}
  26. <div class="yamlform-flex yamlform-flex--1"><div class="yamlform-flex--container">{{ content.type }}</div></div>
  27. {% endif %}
  28. <div class="yamlform-flex yamlform-flex--2"><div class="yamlform-flex--container">{{ content.number }}</div></div>
  29. <div class="yamlform-flex yamlform-flex--1"><div class="yamlform-flex--container">{{ content.civ }}</div></div>
  30. </div>
  31. <div class="yamlform-flexbox">
  32. <div class="yamlform-flex yamlform-flex--1"><div class="yamlform-flex--container">
  33. {{ content.expiration }}
  34. {{ content.expiration_month }}
  35. {{ content.expiration_year }}
  36. </div></div>
  37. </div>
  38. {% else %}
  39. {{ content }}
  40. {% endif %}