]> Raphaël G. Git Repositories - airbundle/commitdiff
Switch to new form naming
authorRaphaël Gertz <git@rapsys.eu>
Wed, 24 Feb 2021 00:43:37 +0000 (01:43 +0100)
committerRaphaël Gertz <git@rapsys.eu>
Wed, 24 Feb 2021 00:43:37 +0000 (01:43 +0100)
Resources/views/form/_toolbox.html.twig

index e9697910a3da18948a11081da5460c47a24c3e0d..14e9593a55589819589c46cdb7379ebe2491932b 100644 (file)
@@ -1,15 +1,21 @@
-{# Display application or login form #}
-{% if is_granted('ROLE_GUEST') %}
-       <div class="form">
-               {% if application is defined %}
-                       {{ include('@RapsysAir/form/_application.html.twig') }}
-               {% endif %}
-               {% if session_edit is defined %}
-                       {{ include('@RapsysAir/form/_session_edit.html.twig') }}
-               {% endif %}
-       </div>
-{% elseif not is_granted('IS_AUTHENTICATED_REMEMBERED') %}
-       <div class="form">
-               {{ include('@RapsysAir/form/_login.html.twig') }}
-       </div>
+{# Display login or application form #}
+{% if forms is defined and forms %}
+       {% if forms.login is defined and forms.login %}
+               <aside class="form">
+                       {# <header><h2>Toolbox</h2></header> #}
+                       {{ include('@RapsysAir/form/_login.html.twig') }}
+               </aside>
+       {% else %}
+               <aside class="form">
+                       {% if forms.application is defined %}
+                               {{ include('@RapsysAir/form/_application.html.twig') }}
+                       {% endif %}
+                       {% if forms.location is defined %}
+                               {{ include('@RapsysAir/form/_location.html.twig') }}
+                       {% endif %}
+                       {% if forms.session is defined %}
+                               {{ include('@RapsysAir/form/_session.html.twig') }}
+                       {% endif %}
+               </aside>
+       {% endif %}
 {% endif %}
 {% endif %}