Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings

Commit 3315f32

Browse filesBrowse files
committed
minor #8476 Mention the new Bootstrap 4 form themes (javiereguiluz)
This PR was merged into the 3.4 branch. Discussion ---------- Mention the new Bootstrap 4 form themes This fixes #8444. Commits ------- 0c89701 Mention the new Bootstrap 4 form themes
2 parents 47207b4 + 0c89701 commit 3315f32
Copy full SHA for 3315f32

File tree

2 files changed

+15
-3
lines changed
Filter options

2 files changed

+15
-3
lines changed

‎form/form_customization.rst

Copy file name to clipboardExpand all lines: form/form_customization.rst
+12-2Lines changed: 12 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -113,10 +113,17 @@ fragment needed to render every part of a form:
113113
* `bootstrap_3_horizontal_layout.html.twig`_, it's similar to the previous theme,
114114
but the CSS classes applied are the ones used to display the forms horizontally
115115
(i.e. the label and the widget in the same row).
116+
* `bootstrap_4_layout.html.twig`_, same as ``bootstrap_3_layout.html.twig``, but
117+
updated for `Bootstrap 4 CSS framework`_ styles.
118+
* `bootstrap_4_horizontal_layout.html.twig`_, same as ``bootstrap_3_horizontal_layout.html.twig``
119+
but updated for Bootstrap 4 styles.
116120
* `foundation_5_layout.html.twig`_, wraps each form field inside a ``<div>`` element
117121
with the appropriate CSS classes to apply the default `Foundation CSS framework`_
118122
styles.
119123

124+
.. versionadded:: 3.4
125+
The Bootstrap 4 form themes were introduced in Symfony 3.4.
126+
120127
.. caution::
121128

122129
When you use the Bootstrap form themes and render the fields manually,
@@ -211,7 +218,7 @@ this folder.
211218
In this example, the customized fragment name is ``integer_widget`` because
212219
you want to override the HTML ``widget`` for all ``integer`` field types. If
213220
you need to customize ``textarea`` fields, you would customize ``textarea_widget``.
214-
221+
215222
The ``integer`` part comes from the class name: ``IntegerType`` becomes ``integer``,
216223
based on a standard.
217224

@@ -1174,6 +1181,9 @@ more details about this concept in Twig, see :ref:`twig-reference-form-variables
11741181
.. _`form_table_layout.html.twig`: https://github.com/symfony/symfony/blob/master/src/Symfony/Bridge/Twig/Resources/views/Form/form_table_layout.html.twig
11751182
.. _`bootstrap_3_layout.html.twig`: https://github.com/symfony/symfony/blob/master/src/Symfony/Bridge/Twig/Resources/views/Form/bootstrap_3_layout.html.twig
11761183
.. _`bootstrap_3_horizontal_layout.html.twig`: https://github.com/symfony/symfony/blob/master/src/Symfony/Bridge/Twig/Resources/views/Form/bootstrap_3_horizontal_layout.html.twig
1177-
.. _`Bootstrap 3 CSS framework`: http://getbootstrap.com/
1184+
.. _`bootstrap_4_layout.html.twig`: https://github.com/symfony/symfony/blob/master/src/Symfony/Bridge/Twig/Resources/views/Form/bootstrap_4_layout.html.twig
1185+
.. _`bootstrap_4_horizontal_layout.html.twig`: https://github.com/symfony/symfony/blob/master/src/Symfony/Bridge/Twig/Resources/views/Form/bootstrap_4_horizontal_layout.html.twig
1186+
.. _`Bootstrap 3 CSS framework`: https://getbootstrap.com/docs/3.3/
1187+
.. _`Bootstrap 4 CSS framework`: https://getbootstrap.com/docs/4.0/
11781188
.. _`foundation_5_layout.html.twig`: https://github.com/symfony/symfony/blob/master/src/Symfony/Bridge/Twig/Resources/views/Form/foundation_5_layout.html.twig
11791189
.. _`Foundation CSS framework`: http://foundation.zurb.com/

‎reference/configuration/twig.rst

Copy file name to clipboardExpand all lines: reference/configuration/twig.rst
+3-1Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,6 +20,8 @@ TwigBundle Configuration ("twig")
2020
# Bootstrap:
2121
- bootstrap_3_layout.html.twig
2222
- bootstrap_3_horizontal_layout.html.twig
23+
- bootstrap_4_layout.html.twig
24+
- bootstrap_4_horizontal_layout.html.twig
2325
2426
# Foundation
2527
- foundation_5_layout.html.twig
@@ -91,7 +93,7 @@ TwigBundle Configuration ("twig")
9193
9294
<twig:global key="foo" id="bar" type="service" />
9395
<twig:global key="pi">3.14</twig:global>
94-
96+
9597
<twig:date format="d.m.Y, H:i:s" interval-format="%d days" timezone="Asia/Tokyo" />
9698
<twig:number-format decimals="2" decimal-point="," thousands-separator="." />
9799

0 commit comments

Comments
0 (0)
Morty Proxy This is a proxified and sanitized view of the page, visit original site.