templates/security/formularioRegistro.html.twig line 1

Open in your IDE?
  1. {{ form_start(form) }}
  2. {# Muestro Errores de Formularios #}
  3. {% if not form.vars.valid %}
  4.     <ul class="collection with-header redondearBordes">
  5.         <li class="collection-header">
  6.             <h6>Errores</h6>
  7.         </li>
  8.         {% if form.archivos is defined %}
  9.             <li class="collection-item">{{ form_errors(form.archivos) }}</li>
  10.         {% endif %}
  11.         {% if form.imagenes is defined %}
  12.             <li class="collection-item">{{ form_errors(form.imagenes) }}</li>
  13.         {% endif %}
  14.     </ul>
  15. {% endif %}
  16. {# Muestro Errores de Formularios #}
  17. {% for f in form %}
  18.     {# Obtengo el tipo de entrada de datos para renderizarlo correctamente#}
  19.     {% set tipoInput = f.vars.attr|last %}
  20.     {# Captcha #}
  21.     {% if tipoInput == "captcha" %}
  22.         <div class="input-field col s12">
  23.             Ingrese el siguiente codigo de validacion generado por el sistema (CAPTCHA):
  24.             {{captcha}}
  25.             {{ form_widget(f) }}
  26.             <br>
  27.         </div>
  28.         <br>
  29.     {% endif %}
  30.     {# Captcha #}
  31.     {% if tipoInput == "checkbox" %}
  32.         <div class="input-field col s12">
  33.             <br>
  34.             <label>
  35.                 {{ form_widget(f) }}
  36.                 <span>{{f.vars.label}}</span>
  37.             </label>
  38.             <br>
  39.         </div>
  40.     {% endif %}
  41.     {% if tipoInput == "file" %}
  42.         <div class="input-field col s12 file-field">
  43.             <div class="btn colorOficial white-text">
  44.                 <span>{{f.vars.label}}</span>
  45.                 {{ form_widget(f) }}
  46.             </div>
  47.             <div class="file-path-wrapper">
  48.                 <input class="file-path validate" type="text" placeholder="Adjuntar Archivos">
  49.             </div>
  50.         </div>
  51.     {% endif %}
  52.     {% if tipoInput == "multiple" %}
  53.         <div class="input-field col s12 file-field">
  54.             <div class="btn colorOficial white-text">
  55.                 <span>{{f.vars.label}}</span>
  56.                 {{ form_widget(f) }}
  57.             </div>
  58.             <div class="file-path-wrapper">
  59.                 <input class="file-path validate" type="text" placeholder="Adjuntar Archivos">
  60.             </div>
  61.         </div>
  62.     {% endif %}
  63.     {% if tipoInput == "button" %}
  64.         <div class="input-field col s12">{{ form_widget(f) }}</div>
  65.     {% endif %}
  66.     {% if tipoInput == "autor" %}
  67.         <div class="input-field col s12">
  68.             {{ f.vars.label }}
  69.             <input id="publicacion_autor" name="publicacion[autor]" type="text" class="validate" value="{{ f.vars.data }}" readonly>
  70.         </div>
  71.     {% endif %}
  72.     {% if tipoInput != "button" and tipoInput != "file" and tipoInput != "multiple" and tipoInput != "checkbox" and tipoInput != "autor" and tipoInput != "captcha" %}
  73.         <div class="input-field col s12">{{f.vars.label}}
  74.             {{ form_widget(f) }}</div>
  75.     {% endif %}
  76. {% endfor %}
  77. {{ form_end(form) }}