From adffc6baed1c6a87e7750f1beea11b0ffa10c236 Mon Sep 17 00:00:00 2001 From: Phil Mowatt Date: Thu, 27 Feb 2014 02:45:55 +0000 Subject: [PATCH 1/2] Fixes to cookbook/doctrine/registration_form.rst --- cookbook/doctrine/registration_form.rst | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/cookbook/doctrine/registration_form.rst b/cookbook/doctrine/registration_form.rst index b3f6050e41b..8a217397d5b 100644 --- a/cookbook/doctrine/registration_form.rst +++ b/cookbook/doctrine/registration_form.rst @@ -216,6 +216,7 @@ Next, create the form for this ``Registration`` model:: 'checkbox', array('property_path' => 'termsAccepted') ); + $builder->add('Register', 'submit'); } public function getName() @@ -239,7 +240,7 @@ controller for displaying the registration form:: namespace Acme\AccountBundle\Controller; use Symfony\Bundle\FrameworkBundle\Controller\Controller; - use Symfony\Component\HttpFoundation\Response; + use Symfony\Component\HttpFoundation\Request; use Acme\AccountBundle\Form\Type\RegistrationType; use Acme\AccountBundle\Form\Model\Registration; From b56ab13246552ae3cc584128d89aaa779a93ad2c Mon Sep 17 00:00:00 2001 From: Crushnaut Date: Thu, 27 Feb 2014 04:55:11 -0500 Subject: [PATCH 2/2] Made on additional fix as per previous pull request. --- cookbook/doctrine/registration_form.rst | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/cookbook/doctrine/registration_form.rst b/cookbook/doctrine/registration_form.rst index 8a217397d5b..20413aec4e8 100644 --- a/cookbook/doctrine/registration_form.rst +++ b/cookbook/doctrine/registration_form.rst @@ -240,7 +240,6 @@ controller for displaying the registration form:: namespace Acme\AccountBundle\Controller; use Symfony\Bundle\FrameworkBundle\Controller\Controller; - use Symfony\Component\HttpFoundation\Request; use Acme\AccountBundle\Form\Type\RegistrationType; use Acme\AccountBundle\Form\Model\Registration; @@ -271,6 +270,9 @@ And its template: Next, create the controller which handles the form submission. This performs the validation and saves the data into the database:: + use Symfony\Component\HttpFoundation\Request; + // ... + public function createAction(Request $request) { $em = $this->getDoctrine()->getManager();