Skip to content

[Form] Upgrade Bootstrap 4 theme references to Bootstrap 5 theme #16226

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Dec 13, 2021
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion form/form_customization.rst
Original file line number Diff line number Diff line change
Expand Up @@ -258,7 +258,7 @@ Renders any errors for the given field.

.. caution::

In the :ref:`error messages of Bootstrap 4 Form Theme <reference-forms-bootstrap4-error-messages>`,
In the :ref:`error messages of Bootstrap 5 Form Theme <reference-forms-bootstrap5-error-messages>`,
``form_errors()`` is already included in ``form_label()``.

.. _reference-forms-twig-widget:
Expand Down
6 changes: 3 additions & 3 deletions form/form_themes.rst
Original file line number Diff line number Diff line change
Expand Up @@ -76,7 +76,7 @@ want to use another theme for all the forms of your app, configure it in the

# config/packages/twig.yaml
twig:
form_themes: ['bootstrap_4_horizontal_layout.html.twig']
form_themes: ['bootstrap_5_horizontal_layout.html.twig']
# ...

.. code-block:: xml
Expand All @@ -91,7 +91,7 @@ want to use another theme for all the forms of your app, configure it in the
http://symfony.com/schema/dic/twig https://symfony.com/schema/dic/twig/twig-1.0.xsd">

<twig:config>
<twig:form-theme>bootstrap_4_horizontal_layout.html.twig</twig:form-theme>
<twig:form-theme>bootstrap_5_horizontal_layout.html.twig</twig:form-theme>
<!-- ... -->
</twig:config>
</container>
Expand All @@ -103,7 +103,7 @@ want to use another theme for all the forms of your app, configure it in the

return static function (TwigConfig $twig) {
$twig->formThemes([
'bootstrap_4_horizontal_layout.html.twig',
'bootstrap_5_horizontal_layout.html.twig',
]);

// ...
Expand Down
12 changes: 6 additions & 6 deletions forms.rst
Original file line number Diff line number Diff line change
Expand Up @@ -320,16 +320,16 @@ suitable for being rendered in an HTML form.

As short as this rendering is, it's not very flexible. Usually, you'll need more
control about how the entire form or some of its fields look. For example, thanks
to the :doc:`Bootstrap 4 integration with Symfony forms </form/bootstrap4>` you
can set this option to generate forms compatible with the Bootstrap 4 CSS framework:
to the :doc:`Bootstrap 5 integration with Symfony forms </form/bootstrap5>` you
can set this option to generate forms compatible with the Bootstrap 5 CSS framework:

.. configuration-block::

.. code-block:: yaml

# config/packages/twig.yaml
twig:
form_themes: ['bootstrap_4_layout.html.twig']
form_themes: ['bootstrap_5_layout.html.twig']

.. code-block:: xml

Expand All @@ -344,7 +344,7 @@ can set this option to generate forms compatible with the Bootstrap 4 CSS framew
https://symfony.com/schema/dic/twig/twig-1.0.xsd">

<twig:config>
<twig:form-theme>bootstrap_4_layout.html.twig</twig:form-theme>
<twig:form-theme>bootstrap_5_layout.html.twig</twig:form-theme>
<!-- ... -->
</twig:config>
</container>
Expand All @@ -355,13 +355,13 @@ can set this option to generate forms compatible with the Bootstrap 4 CSS framew
use Symfony\Config\TwigConfig;

return static function (TwigConfig $twig) {
$twig->formThemes(['bootstrap_4_layout.html.twig']);
$twig->formThemes(['bootstrap_5_layout.html.twig']);

// ...
};

The :ref:`built-in Symfony form themes <symfony-builtin-forms>` include
Bootstrap 3 and 4 as well as Foundation 5 and 6. You can also
Bootstrap 3, 4 and 5, Foundation 5 and 6, as well as Tailwind 2. You can also
:ref:`create your own Symfony form theme <create-your-own-form-theme>`.

In addition to form themes, Symfony allows you to
Expand Down
6 changes: 3 additions & 3 deletions reference/configuration/twig.rst
Original file line number Diff line number Diff line change
Expand Up @@ -182,7 +182,7 @@ all the forms of the application:

# config/packages/twig.yaml
twig:
form_themes: ['bootstrap_4_layout.html.twig', 'form/my_theme.html.twig']
form_themes: ['bootstrap_5_layout.html.twig', 'form/my_theme.html.twig']
# ...

.. code-block:: xml
Expand All @@ -197,7 +197,7 @@ all the forms of the application:
http://symfony.com/schema/dic/twig https://symfony.com/schema/dic/twig/twig-1.0.xsd">

<twig:config>
<twig:form-theme>bootstrap_4_layout.html.twig</twig:form-theme>
<twig:form-theme>bootstrap_5_layout.html.twig</twig:form-theme>
<twig:form-theme>form/my_theme.html.twig</twig:form-theme>
<!-- ... -->
</twig:config>
Expand All @@ -210,7 +210,7 @@ all the forms of the application:

return static function (TwigConfig $twig) {
$twig->formThemes([
'bootstrap_4_layout.html.twig',
'bootstrap_5_layout.html.twig',
'form/my_theme.html.twig',
]);

Expand Down