Skip to content

Commit 47bda31

Browse files
committed
bug #6784 Fix CS for form templates locations (javiereguiluz)
This PR was merged into the 2.7 branch. Discussion ---------- Fix CS for form templates locations This replaces #6773 because I tried to rebase it but I couldn't. All the credit for these fixes should go to @peterkokot, the original author of the other pull request. Commits ------- 7b116e9 Fix CS for form templates locations
2 parents 74e28e5 + 7b116e9 commit 47bda31

File tree

2 files changed

+9
-9
lines changed

2 files changed

+9
-9
lines changed

form/form_customization.rst

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -473,7 +473,7 @@ rendered.
473473
# app/config/config.yml
474474
twig:
475475
form_themes:
476-
- 'form/fields.html.twig'
476+
- 'form/fields.html.twig'
477477
# ...
478478
479479
.. code-block:: xml
@@ -489,7 +489,7 @@ rendered.
489489
// app/config/config.php
490490
$container->loadFromExtension('twig', array(
491491
'form_themes' => array(
492-
'form/fields.html.twig',
492+
'form/fields.html.twig',
493493
),
494494
495495
// ...
@@ -669,7 +669,7 @@ customize the ``name`` field only:
669669

670670
<?php echo $view['form']->widget($form['name']); ?>
671671

672-
<!-- app/Resources/views/Form/_product_name_widget.html.php -->
672+
<!-- app/Resources/views/form/_product_name_widget.html.php -->
673673
<div class="text_widget">
674674
<?php echo $view['form']->block('form_widget_simple') ?>
675675
</div>
@@ -726,7 +726,7 @@ You can also override the markup for an entire field row using the same method:
726726

727727
<?php echo $view['form']->row($form['name']); ?>
728728

729-
<!-- app/Resources/views/Form/_product_name_row.html.php -->
729+
<!-- app/Resources/views/form/_product_name_row.html.php -->
730730
<div class="name_row">
731731
<?php echo $view['form']->label($form) ?>
732732
<?php echo $view['form']->errors($form) ?>

form/form_themes.rst

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -271,7 +271,7 @@ to define form output.
271271
PHP
272272
~~~
273273

274-
To automatically include the customized templates from the ``app/Resources/views/Form``
274+
To automatically include the customized templates from the ``app/Resources/views/form``
275275
directory created earlier in *all* templates, modify your application configuration
276276
file:
277277

@@ -284,7 +284,7 @@ file:
284284
templating:
285285
form:
286286
resources:
287-
- 'Form'
287+
- 'form'
288288
# ...
289289
290290
.. code-block:: xml
@@ -300,7 +300,7 @@ file:
300300
<framework:config>
301301
<framework:templating>
302302
<framework:form>
303-
<framework:resource>Form</framework:resource>
303+
<framework:resource>form</framework:resource>
304304
</framework:form>
305305
</framework:templating>
306306
<!-- ... -->
@@ -314,14 +314,14 @@ file:
314314
'templating' => array(
315315
'form' => array(
316316
'resources' => array(
317-
'Form',
317+
'form',
318318
),
319319
),
320320
),
321321
// ...
322322
));
323323
324-
Any fragments inside the ``app/Resources/views/Form`` directory are now used
324+
Any fragments inside the ``app/Resources/views/form`` directory are now used
325325
globally to define form output.
326326

327327
.. _`form_div_layout.html.twig`: https://github.com/symfony/symfony/blob/master/src/Symfony/Bridge/Twig/Resources/views/Form/form_div_layout.html.twig

0 commit comments

Comments
 (0)