]> Raphaƫl G. Git Repositories - airbundle/blobdiff - Resources/views/form/recover.html.twig
Optionalize all fields
[airbundle] / Resources / views / form / recover.html.twig
index 63f948df9dde52e41f3a412dd51949b8abfbd606..ac5eee45b8a126f2bd8d5e6f19cef4b1c958b02d 100644 (file)
@@ -1,28 +1,27 @@
-{% extends '@RapsysAir/base.html.twig' %}
+{% extends '@RapsysAir/body.html.twig' %}
+{% block title %}{{ site.title }} - {{ title }}{% endblock %}
 {% block content %}
        <section id="form">
                <h2><a href="{{ path('rapsys_user_recover') }}">{% trans %}Recover{% endtrans %}</a></h2>
                {% if sent %}
-                       <p>{% trans %}Your recover account message has been sent{% endtrans %}</p>
+                       <p class="message notice">{% trans %}Your recover account message has been sent{% endtrans %}</p>
                {% else %}
-                       <div>
-                               {{ form_start(form) }}
-
-                                       <header>{{ form_errors(form) }}</header>
-
-                                       <section>
+                       {{ form_start(form) }}
+                               <div>
+                                       {% if form.mail is defined %}
                                                {{ form_row(form.mail) }}
-                                       </section>
+                                       {% endif %}
 
-                                       {{ form_row(form.submit) }}
+                                       {% if form.password is defined %}
+                                               {{ form_row(form.password) }}
+                                       {% endif %}
 
-                                       {# Render CSRF token etc .#}
-                                       <footer style="display:none">
-                                               {{ form_rest(form) }}
-                                       </footer>
+                                       {{ form_row(form.submit) }}
+                               </div>
 
-                               {{ form_end(form) }}
-                       </div>
+                               {# Render CSRF token etc .#}
+                               <footer style="display:none">{{ form_rest(form) }}</footer>
+                       {{ form_end(form) }}
                {% endif %}
        </section>
 {% endblock %}