You are here

form--comment.html.twig in Open Social 8.8

Default theme implementation for a 'form' element.

Available variables

  • attributes: A list of HTML attributes for the wrapper element.
  • children: The child elements of the form.

File

themes/socialbase/templates/comment/form--comment.html.twig
View source
  1. {#
  2. /**
  3. * @file
  4. * Default theme implementation for a 'form' element.
  5. *
  6. * Available variables
  7. * - attributes: A list of HTML attributes for the wrapper element.
  8. * - children: The child elements of the form.
  9. *
  10. * @see template_preprocess_form()
  11. *
  12. * @ingroup themeable
  13. */
  14. #}
  15. {{ attach_library('socialbase/comment')}}
  16. {%
  17. set classes = [
  18. 'js-comment',
  19. 'comment',
  20. 'comment-form__wrapper',
  21. ]
  22. %}
  23. {# wrap our form for reply forms with indentation classes added in form.inc #}
  24. {% if comment_reply_form_wrapper is not empty %}
  25. <div {{ comment_reply_form_wrapper }}>
  26. {% endif %}
  27. <div {{ comment_wrapper.addClass(classes) }}>
  28. <div class="comment__avatar">{{ current_user_picture }}</div>
  29. <div class="comment__content">
  30. <form{{ attributes }}>
  31. <div class="form-group-inline">
  32. {{ children }}
  33. </div>
  34. </form>
  35. </div>
  36. </div>
  37. {% if comment_reply_form_wrapper is not empty %}
  38. </div>
  39. {% endif %}