]> Raphaƫl G. Git Repositories - airbundle/blobdiff - Resources/views/form/login.html.twig
Add recover class on recover block
[airbundle] / Resources / views / form / login.html.twig
index d127e2547696f92e48e45bde8224b1257b578f56..a9a1daafc70f4b206475752990cd0c3fe805c035 100644 (file)
@@ -2,31 +2,40 @@
 {% block content %}
        <section id="form">
                <h2><a href="{{ path('rapsys_user_login') }}">{% trans %}Login{% endtrans %}</a></h2>
 {% block content %}
        <section id="form">
                <h2><a href="{{ path('rapsys_user_login') }}">{% trans %}Login{% endtrans %}</a></h2>
-               <div>
-                       {{ form_start(form) }}
-
-                               <header>{{ form_errors(form) }}</header>
-
+               <section>
+                       {{ form_start(login) }}
                                <section>
                                <section>
-                                       {{ form_row(form.mail) }}
-
-                                       {{ form_row(form.password) }}
+                                       {{ form_row(login.mail) }}
 
 
-                                       {% if error %}
-                                               <div class="error">
-                                                       <ul><li><a href="{{ path('rapsys_user_recover') }}">{% trans %}To recover your account click here{% endtrans %}</a></li></ul>
-                                               </div>
-                                       {% endif %}
+                                       {{ form_row(login.password) }}
                                </section>
 
                                </section>
 
-                               {{ form_row(form.submit) }}
+                               {{ form_row(login.submit) }}
 
                                {# Render CSRF token etc .#}
                                <footer style="display:none">
 
                                {# Render CSRF token etc .#}
                                <footer style="display:none">
-                                       {{ form_rest(form) }}
+                                       {{ form_rest(login) }}
                                </footer>
                                </footer>
+                       {{ form_end(login) }}
+               </section>
+               {% if recover is defined %}
+                       <section class="recover">
+                               <h3>Recover</h3>
+                               {{ form_start(recover) }}
+
+                                       <section>
+                                               {{ form_row(recover.mail) }}
+
+                                               {{ form_row(recover.submit) }}
+                                       </section>
+
+                                       {# Render CSRF token etc .#}
+                                       <footer style="display:none">
+                                               {{ form_rest(recover) }}
+                                       </footer>
 
 
-                       {{ form_end(form) }}
-               </div>
+                               {{ form_end(recover) }}
+                       </section>
+               {% endif %}
        </section>
 {% endblock %}
        </section>
 {% endblock %}