{% if registration_errors_pers is not defined %}
  {% set registration_errors_pers = null %}
{% endif %}

{% form_theme form 'MuzichCoreBundle:Form:errors.html.twig' %}

{{ form_errors(form) }}

{% if registration_errors_pers|length > 0 %}
<ul class="error_list">
  {% for error in registration_errors_pers %}
    <li>{{ error }}</li>
  {% endfor %}
</ul>
{% endif %}

<div class="field">
  {{ form_errors(form.email) }}
  {{ form_label(form.email, 'email'|trans({}, 'userform')) }}
  {{ form_widget(form.email, {'attr':{'class':'niceinput'}}) }}
  
  <img class="loader" style="display: none;" src="{{ asset('/bundles/muzichcore/img/ajax-loader.gif') }}" alt="loading" />
  <input type="submit" class="button" value="{{ 'registration.submit'|trans({}, 'userui') }}" />
</div> 

{{ form_widget(form._token) }}

<p class="accept_cgu">
  {% autoescape false %}
    {{ 'accept_cgu_registration'|trans({
      '%link%' : path('info_cgu')
    }, 'userform' )}}
  {% endautoescape %}
</p>
