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
1919{
2020 public function loginAction ()
2121 {
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 ' );
2323
2424 return $ this ->container ->get ('templating ' )->renderResponse ('CsrfFormLoginBundle:Login:login.html.twig ' , array (
2525 'form ' => $ form ->createView (),
Original file line number Diff line number Diff line change 2727 * @author Henrik Bjornskov <henrik@bjrnskov.dk>
2828 * @author Jeremy Mikola <jmikola@gmail.com>
2929 */
30- class UserLoginFormType extends AbstractType
30+ class UserLoginType extends AbstractType
3131{
3232 private $ requestStack ;
3333
@@ -45,9 +45,9 @@ public function __construct(RequestStack $requestStack)
4545 public function buildForm (FormBuilderInterface $ builder , array $ options )
4646 {
4747 $ 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 ' )
5151 ;
5252
5353 $ request = $ this ->requestStack ->getCurrentRequest ();
@@ -87,12 +87,4 @@ public function configureOptions(OptionsResolver $resolver)
8787 'intention ' => 'authenticate ' ,
8888 ));
8989 }
90-
91- /**
92- * {@inheritdoc}
93- */
94- public function getName ()
95- {
96- return 'user_login ' ;
97- }
9890}
Original file line number Diff line number Diff line change @@ -3,11 +3,11 @@ imports:
33
44services :
55 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
77 arguments :
88 - @request_stack
99 tags :
10- - { name: form.type, alias: user_login }
10+ - { name: form.type }
1111
1212security :
1313 encoders :
You can’t perform that action at this time.
0 commit comments