Przeglądaj źródła

refactory views login

Guillermo Espinoza 8 lat temu
rodzic
commit
939cb77cdf

+ 2 - 2
Resources/views/Security/login.html.twig

@@ -1,5 +1,5 @@
-{% extends "BaseOAuthServerBundle::layout.html.twig" %}
+{% extends ['@FOSUser/layout.html.twig', 'BaseOAuthServerBundle::layout.html.twig'] %}
 
 {% block fos_user_content %}
-    {{ include("BaseOAuthServerBundle:Security:login_content.html.twig") }}
+    {% include ['@FOSUser/Security/login_content.html.twig', 'BaseOAuthServerBundle:Security:login_content.html.twig'] with {login_check_path: 'oauth_login_check'} %}
 {% endblock fos_user_content %}

+ 1 - 1
Resources/views/Security/login_content.html.twig

@@ -4,7 +4,7 @@
     <div>{{ error.messageKey|trans(error.messageData, 'security') }}</div>
 {% endif %}
 
-<form action="{{ path("oauth_login_check") }}" method="post">
+<form action="{{ path(login_check_path) }}" method="post">
     {% if csrf_token %}
         <input type="hidden" name="_csrf_token" value="{{ csrf_token }}" />
     {% endif %}