language-negotiation-configure-form.html.twig 1.3 KB

1234567891011121314151617181920212223242526272829303132333435363738
  1. {#
  2. /**
  3. * @file
  4. * Theme override for a language negotiation configuration form.
  5. *
  6. * Available variables:
  7. * - language_types: A list of language negotiation types. Each language type
  8. * contains the following:
  9. * - type: The machine name for the negotiation type.
  10. * - title: The language negotiation type name.
  11. * - description: A description for how the language negotiation type operates.
  12. * - configurable: A radio element to toggle the table.
  13. * - table: A draggable table for the language detection methods of this type.
  14. * - children: Remaining form items for the group.
  15. * - attributes: A list of HTML attributes for the wrapper element.
  16. * - children: Remaining form items for all groups.
  17. *
  18. * @see template_preprocess_language_negotiation_configure_form()
  19. */
  20. #}
  21. {% for language_type in language_types %}
  22. {%
  23. set language_classes = [
  24. 'js-form-item',
  25. 'form-item',
  26. 'table-language-group',
  27. 'table-' ~ language_type.type ~ '-wrapper',
  28. ]
  29. %}
  30. <div{{ language_type.attributes.addClass(language_classes) }}>
  31. <h2>{{ language_type.title }}</h2>
  32. <div class="description">{{ language_type.description }}</div>
  33. {{ language_type.configurable }}
  34. {{ language_type.table }}
  35. {{ language_type.children }}
  36. </div>
  37. {% endfor %}
  38. {{ children }}