edit_feeds.html.twig 1.9 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455
  1. {% extends 'base.html.twig' %}
  2. {% block stylesheets %}
  3. {{ parent() }}
  4. <link rel="stylesheet" href="{{ asset('assets/default_theme/css/pages/feeds.css') }}" type="text/css">
  5. {% endblock stylesheets %}
  6. {% macro edit_feeds_form_row(child) %}
  7. <div class="form-row">
  8. {{ form_label(child) }}
  9. {{ form_widget(child) }}
  10. </div>
  11. {% endmacro %}
  12. {% block body %}
  13. <div class="frame-section">
  14. <form class="section-form" action="{{ path('edit_feeds') }}" method="post">
  15. <h1 class="frame-section-title">{{ "Edit feed navigation links" | trans }}</h1>
  16. {# Since the form is not separated into individual groups, this happened #}
  17. {{ form_start(edit_feeds) }}
  18. {{ form_errors(edit_feeds) }}
  19. <section class="container-grid">
  20. {% for child in edit_feeds.children %}
  21. {% if 'row_url' in child.vars.block_prefixes %}
  22. <div class="frame-section frame-section-padding">
  23. {{ _self.edit_feeds_form_row(child) }}
  24. {% elseif 'row_title' in child.vars.block_prefixes %}
  25. {{ _self.edit_feeds_form_row(child) }}
  26. {% elseif 'row_order' in child.vars.block_prefixes %}
  27. {{ _self.edit_feeds_form_row(child) }}
  28. {% elseif 'row_remove' in child.vars.block_prefixes %}
  29. {{ _self.edit_feeds_form_row(child) }}
  30. </div>
  31. {% endif %}
  32. {% endfor %}
  33. </section>
  34. <div class="form-row">
  35. {{ form_row(edit_feeds.update_exisiting) }}
  36. {{ form_row(edit_feeds.reset) }}
  37. </div>
  38. <hr>
  39. <section class="frame-section frame-section-padding">
  40. <h2>{% trans %}Add a new feed{% endtrans %}</h2>
  41. {{ form_rest(edit_feeds) }}
  42. </section>
  43. {{ form_end(edit_feeds) }}
  44. </form>
  45. </div>
  46. {% endblock %}