X-Git-Url: https://git.rapsys.eu/airbundle/blobdiff_plain/edf75e4315679cd018bc6144f84f71c82601e600..c1837dbbb99ef2c4ce2ad04ff967aa936a26e4db:/Resources/views/form/_toolbox.html.twig

diff --git a/Resources/views/form/_toolbox.html.twig b/Resources/views/form/_toolbox.html.twig
index 12e6191..7009caa 100644
--- a/Resources/views/form/_toolbox.html.twig
+++ b/Resources/views/form/_toolbox.html.twig
@@ -1,10 +1,24 @@
-{# Display application or login form #}
-{% if is_granted('ROLE_GUEST') %}
-	<div class="form">
-		{{ include('@RapsysAir/form/_application.html.twig') }}
-	</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 %}
+			{% if forms.user is defined %}
+				{{ include('@RapsysAir/form/_user.html.twig') }}
+			{% endif %}
+		</aside>
+	{% endif %}
 {% endif %}