8000 Minor tweaks for the registration form article · craue/symfony-docs@91cb3a0 · GitHub
[go: up one dir, main page]

Skip to content

Commit 91cb3a0

Browse files
javiereguiluzxabbuh
authored andcommitted
Minor tweaks for the registration form article
1 parent a75ed1e commit 91cb3a0

File tree

1 file changed

+8
-8
lines changed

1 file changed

+8
-8
lines changed

cookbook/doctrine/registration_form.rst

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -28,10 +28,10 @@ Your ``User`` entity will probably at least have the following fields:
2828
A nice piece of information to collect. You can also allow users to
2929
:ref:`login via email <registration-form-via-email>`.
3030

31-
* ``password``
31+
``password``
3232
The encoded password.
3333

34-
* ``plainPassword``
34+
``plainPassword``
3535
This field is *not* persisted: (notice no ``@ORM\Column`` above it). It
3636
temporarily stores the plain password from the registration form. This field
3737
can be validated then used to populate the ``password`` field.
@@ -49,7 +49,7 @@ With some validation added, your class may look something like this::
4949
/**
5050
* @ORM\Entity
5151
* @UniqueEntity(fields="email", message="Email already taken")
52-
* @UniqueEntity(fields="username", message="Username already taken")
52+
* @UniqueEntity(fields="username", message="Username already taken")
5353
*/
5454
class User implements UserInterface
5555
{
@@ -253,7 +253,7 @@ controller for displaying the registration form::
253253

254254
If you decide to NOT use annotation routing (shown above), then you'll
255255
need to create a route to this controller:
256-
256+
257257
.. configuration-block::
258258

259259
.. code-block:: yaml
@@ -296,7 +296,7 @@ Next, create the template:
296296
.. code-block:: html+jinja
297297

298298
{# app/Resources/views/registration/register.html.twig #}
299-
299+
300300
{{ form_start(form) }}
301301
{{ form_row('form.username') }}
302302
{{ form_row('form.email') }}
@@ -305,7 +305,7 @@ Next, create the template:
305305

306306
<button type="submit">Register!</button>
307307
{{ form_end(form) }}
308-
308+
309309
.. code-block:: html+php
310310

311311
<!-- app/Resources/views/registration/register.html.php -->
@@ -370,8 +370,8 @@ registration form. The only trick is that you want to add this field to your for
370370
without adding an unnecessary new ``termsAccepted`` property to your ``User`` entity
371371
that you'll never need.
372372

373-
To do this, add a ``termsAccepted`` field to your form, but set its :ref:`mapped <reference-form-option-mapped>`
374-
option to ``false``::
373+
To do this, add a ``termsAccepted`` field to your form, but set its
374+
:ref:`mapped <reference-form-option-mapped>` option to ``false``::
375375

376376
// src/AppBundle/Form/UserType.php
377377
// ...

0 commit comments

Comments
 (0)
0