templates/util/form.html.twig line 1

Open in your IDE?
  1. {% if form is defined %}
  2. {% form_theme form "util/vaciFacil-layout.twig" %}
  3. {% endif %}
  4. <!doctype html>
  5. <html lang="{{ app.request.locale|default(meta.locale) }}">
  6.     <head>
  7.         <meta charset="UTF-8">
  8.         <title>{{ meta.title|default("UniCathedral") }}</title>
  9.         <link href="{{ asset("/img/png/nti.png") }}" rel="icon" />
  10.         <link href="{{ asset("/css/bootstrap.min.css") }}" rel="stylesheet" type="text/css" />
  11.         <link href="{{ asset("/css/vaciFacil.css") }}" rel="stylesheet" type="text/css" />
  12.         <link href="{{ asset("/css/selectize.css") }}" rel="stylesheet" type="text/css" />
  13.         <link href="{{ asset("/css/vaciFacil-selectize.css") }}" rel="stylesheet" type="text/css" />
  14.         <link href="https://fonts.googleapis.com/icon?family=Material+Icons" rel="stylesheet" />
  15.         <!--suppress CssUnusedSymbol -->
  16.         <style>.popover { max-width: unset; }</style>
  17. {% block head_css %}{% endblock %}
  18.         <script type="application/javascript" src="{{ asset("/js/jquery-3.6.1.min.js") }}"></script>
  19.         <script type="application/javascript" src="{{ asset("/js/popper.min.js") }}"></script>
  20.         <script type="application/javascript" src="{{ asset("/js/bootstrap.bundler.min.js") }}"></script>
  21.         <script type="application/javascript" src="{{ asset("/js/vaciFacil.js") }}"></script>
  22.         <script type="application/javascript" src="{{ asset("/js/selectize.js") }}"></script>
  23.         <script type="application/javascript" src="{{ asset("/js/vaciFacil-form.js") }}"></script>
  24.         <script type="application/javascript">
  25.             function copy(element, selector)
  26.             {
  27.                 navigator.clipboard.writeText($(selector).html());
  28.                 $(element).text("{{ "text.copied"|trans({}, null) }}");
  29.             }
  30.             function resetText(element)
  31.             {
  32.                 $(element).text("{{ "button.copy.to_clipboard"|trans }}");
  33.             }
  34.             window.onscroll = function() { scrollFunction() };
  35.         </script>
  36. {% block head_js %}
  37.         <script type="application/javascript">
  38.             $(document).ready(function() { form_init(); });
  39.         </script>
  40. {% endblock %}
  41.     </head>
  42.     <body style="background-color: transparent">
  43.         <div id="UniCa-container" class="{{ divClass|default("container my-3") }}">
  44. {% include "util/help.html.twig" %}
  45.                 <div id="flashes" class="container">
  46. {% include "util/flashes.html.twig" %}
  47.                 </div>
  48. {% block form %}
  49.                 {{ form_start(form, form_attr|default({})) }}
  50. {% if buttonsOnTop|default(false) %}
  51.                     <div class="row mb-2 mx-auto">
  52. {% for button in form|filter(field => "button" in field.vars.block_prefixes) %}
  53.                         <div class="col">
  54.                             {{ form_widget(button) }}
  55.                         </div>
  56. {% endfor %}
  57.                     </div>
  58. {% endif %}
  59. {% for field in form|filter(field => "button" not in field.vars.block_prefixes and "hidden" not in field.vars.block_prefixes) %}
  60.                     {{ form_row(field) }}
  61. {% endfor %}
  62. {% if not buttonsOnTop|default(false) %}
  63.                     <div class="row mb-2 mx-auto">
  64. {% for button in form|filter(field => "button" in field.vars.block_prefixes) %}
  65.                         <div class="col">
  66.                             {{ form_widget(button) }}
  67.                         </div>
  68. {% endfor %}
  69.                     </div>
  70. {% endif %}
  71. {% block form_body %}{% endblock %}
  72.                 {{ form_end(form) }}
  73. {% endblock %}
  74.             </div>
  75.         <button id="topButton" onclick="topFunction()">{{ "button.to.top"|trans }}</button>
  76.     </body>
  77. </html>