- {{ form_start(form, {'action': path('create'), 'method': 'POST'}) }}
+ {{ form_start(form, {'action': path('users_login'), 'method': 'POST'}) }}
{{ form_widget(form) }}
diff --git a/src/Form/Type/LoginType.php b/src/Form/Type/LoginType.php new file mode 100644 index 0000000..6a151bd --- /dev/null +++ b/src/Form/Type/LoginType.php @@ -0,0 +1,29 @@ +add('email', EmailType::class) + ->add('password', PasswordType::class); + } + + public function configureOptions(OptionsResolver $resolver) + { + $resolver->setDefaults([ + 'data_class' => User::class, + ]); + } +} \ No newline at end of file diff --git a/templates/header.html.twig b/templates/header.html.twig index 608c7ea..dbe4a28 100644 --- a/templates/header.html.twig +++ b/templates/header.html.twig @@ -6,6 +6,6 @@ Charts
diff --git a/templates/login.html.twig b/templates/login.html.twig index 06af37a..3f963af 100644 --- a/templates/login.html.twig +++ b/templates/login.html.twig @@ -8,7 +8,7 @@ {{ parent() }}