File tree Expand file tree Collapse file tree 3 files changed +7
-15
lines changed
Bundle/CsrfFormLoginBundle Expand file tree Collapse file tree 3 files changed +7
-15
lines changed Original file line number Diff line number Diff line change @@ -19,7 +19,7 @@ class LoginController extends ContainerAware
19
19
{
20
20
public function loginAction ()
21
21
{
22
- $ form = $ this ->container ->get ('form.factory ' )->create ('user_login ' );
22
+ $ form = $ this ->container ->get ('form.factory ' )->create ('Symfony\Bundle\SecurityBundle\Tests\Functional\Bundle\CsrfFormLoginBundle\Form\UserLoginType ' );
23
23
24
24
return $ this ->container ->get ('templating ' )->renderResponse ('CsrfFormLoginBundle:Login:login.html.twig ' , array (
25
25
'form ' => $ form ->createView (),
Original file line number Diff line number Diff line change 27
27
* @author Henrik Bjornskov <[email protected] >
28
28
* @author Jeremy Mikola <[email protected] >
29
29
*/
30
- class UserLoginFormType extends AbstractType
30
+ class UserLoginType extends AbstractType
31
31
{
32
32
private $ requestStack ;
33
33
@@ -45,9 +45,9 @@ public function __construct(RequestStack $requestStack)
45
45
public function buildForm (FormBuilderInterface $ builder , array $ options )
46
46
{
47
47
$ builder
48
- ->add ('username ' , 'text ' )
49
- ->add ('password ' , 'password ' )
50
- ->add ('_target_path ' , 'hidden ' )
48
+ ->add ('username ' , 'Symfony\Component\Form\Extension\Core\Type\TextType ' )
49
+ ->add ('password ' , 'Symfony\Component\Form\Extension\Core\Type\PasswordType ' )
50
+ ->add ('_target_path ' , 'Symfony\Component\Form\Extension\Core\Type\HiddenType ' )
51
51
;
52
52
53
53
$ request = $ this ->requestStack ->getCurrentRequest ();
@@ -87,12 +87,4 @@ public function configureOptions(OptionsResolver $resolver)
87
87
'intention ' => 'authenticate ' ,
88
88
));
89
89
}
90
-
91
- /**
92
- * {@inheritdoc}
93
- */
94
- public function getName ()
95
- {
96
- return 'user_login ' ;
97
- }
98
90
}
Original file line number Diff line number Diff line change @@ -3,11 +3,11 @@ imports:
3
3
4
4
services :
5
5
csrf_form_login.form.type :
6
- class : Symfony\Bundle\SecurityBundle\Tests\Functional\Bundle\CsrfFormLoginBundle\Form\UserLoginFormType
6
+ class : Symfony\Bundle\SecurityBundle\Tests\Functional\Bundle\CsrfFormLoginBundle\Form\UserLoginType
7
7
arguments :
8
8
- @request_stack
9
9
tags :
10
- - { name: form.type, alias: user_login }
10
+ - { name: form.type }
11
11
12
12
security :
13
13
encoders :
You can’t perform that action at this time.
0 commit comments