edit.html.twig 3.8 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778
  1. {% extends 'admin/base.html.twig' %}
  2. {% form_theme form 'admin/form/custom_theme.html.twig' %}
  3. {% block content %}
  4. {% set languages = global_service.languages %}
  5. <div class="content">
  6. <div class="container-fluid">
  7. <div class="row">
  8. <div class="col-md-12">
  9. <div class="card">
  10. <div class="card-header">
  11. <h4 class="card-title">{{ title }}</h4>
  12. </div>
  13. <div class="card-body">
  14. {{ form_start(form) }}
  15. <div class="row">
  16. <div class="col-md-4">
  17. {{ form_row(form.is_active) }}
  18. </div>
  19. <div class="col-md-8">
  20. {{ form_row(form.url) }}
  21. </div>
  22. </div>
  23. {% for language in languages %}
  24. <div class="card">
  25. <div class="card-header">
  26. <h5 class="form-lang-header">
  27. <a href="#collapse-{{ language.code }}" data-toggle="collapse">
  28. <span class="language left lang-{{ language.code }}"></span>
  29. {{ language.title }}
  30. </a>
  31. </h5>
  32. </div>
  33. <div id="collapse-{{ language.code }}" class="collapse {% if language.code == 'ru' or language.code == 'en' %}show{% else %}hide{% endif %}">
  34. <div class="card-body">
  35. <div class="row">
  36. <div class="col-md-12">
  37. {{ form_row(form["lang_#{language.id}_title"]) }}
  38. </div>
  39. </div>
  40. <div class="row">
  41. <div class="col-md-12">
  42. {{ form_row(form["lang_#{language.id}_text"]) }}
  43. </div>
  44. </div>
  45. <div class="row">
  46. <div class="col-md-12">
  47. {{ form_row(form["lang_#{language.id}_meta_keywords"]) }}
  48. </div>
  49. </div>
  50. <div class="row">
  51. <div class="col-md-12">
  52. {{ form_row(form["lang_#{language.id}_meta_description"]) }}
  53. </div>
  54. </div>
  55. </div>
  56. </div>
  57. </div>
  58. {% endfor %}
  59. <p class="text-center">
  60. <button type="submit" class="btn btn-primary btn-fill">Сохранить</button>
  61. </p>
  62. {{ form_end(form) }}
  63. </div>
  64. </div>
  65. </div>
  66. </div>
  67. </div>
  68. </div>
  69. {% endblock %}