Skip to content

Commit 8447847

Browse files
committed
Merge branch '5.4' into 6.0
* 5.4: Remove conditional includes on other files Split a conditional doc include into two separate doc includes
2 parents 3b3dce4 + ab9cc45 commit 8447847

28 files changed

+56
-115
lines changed

reference/forms/types/choice.rst

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -212,17 +212,15 @@ compound
212212
This option specifies if a form is compound. The value is by default
213213
overridden by the value of the ``expanded`` option.
214214

215-
.. include:: /reference/forms/types/options/empty_data.rst.inc
216-
:end-before: DEFAULT_PLACEHOLDER
215+
.. include:: /reference/forms/types/options/empty_data_declaration.rst.inc
217216

218217
The actual default value of this option depends on other field options:
219218

220219
* If ``multiple`` is ``false`` and ``expanded`` is ``false``, then ``''``
221220
(empty string);
222221
* Otherwise ``[]`` (empty array).
223222

224-
.. include:: /reference/forms/types/options/empty_data.rst.inc
225-
:start-after: DEFAULT_PLACEHOLDER
223+
.. include:: /reference/forms/types/options/empty_data_description.rst.inc
226224

227225
error_bubbling
228226
~~~~~~~~~~~~~~

reference/forms/types/collection.rst

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -393,13 +393,11 @@ Not all options are listed here - only the most applicable to this type:
393393

394394
.. include:: /reference/forms/types/options/by_reference.rst.inc
395395

396-
.. include:: /reference/forms/types/options/empty_data.rst.inc
397-
:end-before: DEFAULT_PLACEHOLDER
396+
.. include:: /reference/forms/types/options/empty_data_declaration.rst.inc
398397

399398
The default value is ``[]`` (empty array).
400399

401-
.. include:: /reference/forms/types/options/empty_data.rst.inc
402-
:start-after: DEFAULT_PLACEHOLDER
400+
.. include:: /reference/forms/types/options/empty_data_description.rst.inc
403401

404402
error_bubbling
405403
~~~~~~~~~~~~~~

reference/forms/types/color.rst

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -56,13 +56,11 @@ These options inherit from the :doc:`FormType </reference/forms/types/form>`:
5656

5757
.. include:: /reference/forms/types/options/disabled.rst.inc
5858

59-
.. include:: /reference/forms/types/options/empty_data.rst.inc
60-
:end-before: DEFAULT_PLACEHOLDER
59+
.. include:: /reference/forms/types/options/empty_data_declaration.rst.inc
6160

6261
The default value is ``''`` (the empty string).
6362

64-
.. include:: /reference/forms/types/options/empty_data.rst.inc
65-
:start-after: DEFAULT_PLACEHOLDER
63+
.. include:: /reference/forms/types/options/empty_data_description.rst.inc
6664

6765
.. include:: /reference/forms/types/options/error_bubbling.rst.inc
6866

reference/forms/types/country.rst

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -93,17 +93,15 @@ These options inherit from the :doc:`FormType </reference/forms/types/form>`:
9393

9494
.. include:: /reference/forms/types/options/disabled.rst.inc
9595

96-
.. include:: /reference/forms/types/options/empty_data.rst.inc
97-
:end-before: DEFAULT_PLACEHOLDER
96+
.. include:: /reference/forms/types/options/empty_data_declaration.rst.inc
9897

9998
The actual default value of this option depends on other field options:
10099

101100
* If ``multiple`` is ``false`` and ``expanded`` is ``false``, then ``''``
102101
(empty string);
103102
* Otherwise ``[]`` (empty array).
104103

105-
.. include:: /reference/forms/types/options/empty_data.rst.inc
106-
:start-after: DEFAULT_PLACEHOLDER
104+
.. include:: /reference/forms/types/options/empty_data_description.rst.inc
107105

108106
.. include:: /reference/forms/types/options/help.rst.inc
109107

reference/forms/types/currency.rst

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -74,17 +74,15 @@ These options inherit from the :doc:`FormType </reference/forms/types/form>`:
7474

7575
.. include:: /reference/forms/types/options/disabled.rst.inc
7676

77-
.. include:: /reference/forms/types/options/empty_data.rst.inc
78-
:end-before: DEFAULT_PLACEHOLDER
77+
.. include:: /reference/forms/types/options/empty_data_declaration.rst.inc
7978

8079
The actual default value of this option depends on other field options:
8180

8281
* If ``multiple`` is ``false`` and ``expanded`` is ``false``, then ``''``
8382
(empty string);
8483
* Otherwise ``[]`` (empty array).
8584

86-
.. include:: /reference/forms/types/options/empty_data.rst.inc
87-
:start-after: DEFAULT_PLACEHOLDER
85+
.. include:: /reference/forms/types/options/empty_data_description.rst.inc
8886

8987
.. include:: /reference/forms/types/options/help.rst.inc
9088

reference/forms/types/email.rst

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -37,13 +37,11 @@ These options inherit from the :doc:`FormType </reference/forms/types/form>`:
3737

3838
.. include:: /reference/forms/types/options/disabled.rst.inc
3939

40-
.. include:: /reference/forms/types/options/empty_data.rst.inc
41-
:end-before: DEFAULT_PLACEHOLDER
40+
.. include:: /reference/forms/types/options/empty_data_declaration.rst.inc
4241

4342
The default value is ``''`` (the empty string).
4443

45-
.. include:: /reference/forms/types/options/empty_data.rst.inc
46-
:start-after: DEFAULT_PLACEHOLDER
44+
.. include:: /reference/forms/types/options/empty_data_description.rst.inc
4745

4846
.. include:: /reference/forms/types/options/error_bubbling.rst.inc
4947

reference/forms/types/entity.rst

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -288,17 +288,15 @@ type:
288288

289289
.. include:: /reference/forms/types/options/disabled.rst.inc
290290

291-
.. include:: /reference/forms/types/options/empty_data.rst.inc
292-
:end-before: DEFAULT_PLACEHOLDER
291+
.. include:: /reference/forms/types/options/empty_data_declaration.rst.inc
293292

294293
The actual default value of this option depends on other field options:
295294

296295
* If ``multiple`` is ``false`` and ``expanded`` is ``false``, then ``''``
297296
(empty string);
298297
* Otherwise ``[]`` (empty array).
299298

300-
.. include:: /reference/forms/types/options/empty_data.rst.inc
301-
:start-after: DEFAULT_PLACEHOLDER
299+
.. include:: /reference/forms/types/options/empty_data_description.rst.inc
302300

303301
.. include:: /reference/forms/types/options/error_bubbling.rst.inc
304302

reference/forms/types/form.rst

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -53,8 +53,7 @@ option on the form.
5353

5454
.. _reference-form-option-empty-data:
5555

56-
.. include:: /reference/forms/types/options/empty_data.rst.inc
57-
:end-before: DEFAULT_PLACEHOLDER
56+
.. include:: /reference/forms/types/options/empty_data_declaration.rst.inc
5857

5958
The actual default value of this option depends on other field options:
6059

@@ -65,8 +64,7 @@ The actual default value of this option depends on other field options:
6564
* If ``data_class`` is not set and ``compound`` is ``false``, then ``''``
6665
(empty string).
6766

68-
.. include:: /reference/forms/types/options/empty_data.rst.inc
69-
:start-after: DEFAULT_PLACEHOLDER
67+
.. include:: /reference/forms/types/options/empty_data_description.rst.inc
7068

7169
.. _reference-form-option-error-bubbling:
7270

reference/forms/types/hidden.rst

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -50,13 +50,11 @@ These options inherit from the :doc:`FormType </reference/forms/types/form>`:
5050

5151
.. include:: /reference/forms/types/options/data.rst.inc
5252

53-
.. include:: /reference/forms/types/options/empty_data.rst.inc
54-
:end-before: DEFAULT_PLACEHOLDER
53+
.. include:: /reference/forms/types/options/empty_data_declaration.rst.inc
5554

5655
The default value is ``''`` (the empty string).
5756

58-
.. include:: /reference/forms/types/options/empty_data.rst.inc
59-
:start-after: DEFAULT_PLACEHOLDER
57+
.. include:: /reference/forms/types/options/empty_data_description.rst.inc
6058

6159
.. include:: /reference/forms/types/options/error_mapping.rst.inc
6260

reference/forms/types/integer.rst

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -83,13 +83,11 @@ These options inherit from the :doc:`FormType </reference/forms/types/form>`:
8383

8484
.. include:: /reference/forms/types/options/disabled.rst.inc
8585

86-
.. include:: /reference/forms/types/options/empty_data.rst.inc
87-
:end-before: DEFAULT_PLACEHOLDER
86+
.. include:: /reference/forms/types/options/empty_data_declaration.rst.inc
8887

8988
The default value is ``''`` (the empty string).
9089

91-
.. include:: /reference/forms/types/options/empty_data.rst.inc
92-
:start-after: DEFAULT_PLACEHOLDER
90+
.. include:: /reference/forms/types/options/empty_data_description.rst.inc
9391

9492
.. include:: /reference/forms/types/options/error_bubbling.rst.inc
9593

reference/forms/types/language.rst

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -110,17 +110,15 @@ These options inherit from the :doc:`FormType </reference/forms/types/form>`:
110110

111111
.. include:: /reference/forms/types/options/disabled.rst.inc
112112

113-
.. include:: /reference/forms/types/options/empty_data.rst.inc
114-
:end-before: DEFAULT_PLACEHOLDER
113+
.. include:: /reference/forms/types/options/empty_data_declaration.rst.inc
115114

116115
The actual default value of this option depends on other field options:
117116

118117
* If ``multiple`` is ``false`` and ``expanded`` is ``false``, then ``''``
119118
(empty string);
120119
* Otherwise ``[]`` (empty array).
121120

122-
.. include:: /reference/forms/types/options/empty_data.rst.inc
123-
:start-after: DEFAULT_PLACEHOLDER
121+
.. include:: /reference/forms/types/options/empty_data_description.rst.inc
124122

125123
.. include:: /reference/forms/types/options/help.rst.inc
126124

reference/forms/types/locale.rst

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -87,17 +87,15 @@ These options inherit from the :doc:`FormType </reference/forms/types/form>`:
8787

8888
.. include:: /reference/forms/types/options/disabled.rst.inc
8989

90-
.. include:: /reference/forms/types/options/empty_data.rst.inc
91-
:end-before: DEFAULT_PLACEHOLDER
90+
.. include:: /reference/forms/types/options/empty_data_declaration.rst.inc
9291

9392
The actual default value of this option depends on other field options:
9493

9594
* If ``multiple`` is ``false`` and ``expanded`` is ``false``, then ``''``
9695
(empty string);
9796
* Otherwise ``[]`` (empty array).
9897

99-
.. include:: /reference/forms/types/options/empty_data.rst.inc
100-
:start-after: DEFAULT_PLACEHOLDER
98+
.. include:: /reference/forms/types/options/empty_data_description.rst.inc
10199

102100
.. include:: /reference/forms/types/options/help.rst.inc
103101

reference/forms/types/money.rst

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -107,13 +107,11 @@ These options inherit from the :doc:`FormType </reference/forms/types/form>`:
107107

108108
.. include:: /reference/forms/types/options/disabled.rst.inc
109109

110-
.. include:: /reference/forms/types/options/empty_data.rst.inc
111-
:end-before: DEFAULT_PLACEHOLDER
110+
.. include:: /reference/forms/types/options/empty_data_declaration.rst.inc
112111

113112
The default value is ``''`` (the empty string).
114113

115-
.. include:: /reference/forms/types/options/empty_data.rst.inc
116-
:start-after: DEFAULT_PLACEHOLDER
114+
.. include:: /reference/forms/types/options/empty_data_description.rst.inc
117115

118116
.. include:: /reference/forms/types/options/error_bubbling.rst.inc
119117

reference/forms/types/number.rst

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -76,13 +76,11 @@ These options inherit from the :doc:`FormType </reference/forms/types/form>`:
7676

7777
.. include:: /reference/forms/types/options/disabled.rst.inc
7878

79-
.. include:: /reference/forms/types/options/empty_data.rst.inc
80-
:end-before: DEFAULT_PLACEHOLDER
79+
.. include:: /reference/forms/types/options/empty_data_declaration.rst.inc
8180

8281
The default value is ``''`` (the empty string).
8382

84-
.. include:: /reference/forms/types/options/empty_data.rst.inc
85-
:start-after: DEFAULT_PLACEHOLDER
83+
.. include:: /reference/forms/types/options/empty_data_description.rst.inc
8684

8785
.. include:: /reference/forms/types/options/error_bubbling.rst.inc
8886

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
``empty_data``
2+
~~~~~~~~~~~~~~
3+
4+
**type**: ``mixed``

reference/forms/types/options/empty_data.rst.inc renamed to reference/forms/types/options/empty_data_description.rst.inc

Lines changed: 0 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -1,14 +1,3 @@
1-
``empty_data``
2-
~~~~~~~~~~~~~~
3-
4-
**type**: ``mixed``
5-
6-
.. This file should only be included with start-after or end-before that's
7-
set to this placeholder value. Its purpose is to let us include only
8-
part of this file.
9-
10-
DEFAULT_PLACEHOLDER
11-
121
This option determines what value the field will *return* when the submitted
132
value is empty (or missing). It does not set an initial value if none is
143
provided when the form is rendered in a view.

reference/forms/types/password.rst

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -59,13 +59,11 @@ These options inherit from the :doc:`FormType </reference/forms/types/form>`:
5959

6060
.. include:: /reference/forms/types/options/disabled.rst.inc
6161

62-
.. include:: /reference/forms/types/options/empty_data.rst.inc
63-
:end-before: DEFAULT_PLACEHOLDER
62+
.. include:: /reference/forms/types/options/empty_data_declaration.rst.inc
6463

6564
The default value is ``''`` (the empty string).
6665

67-
.. include:: /reference/forms/types/options/empty_data.rst.inc
68-
:start-after: DEFAULT_PLACEHOLDER
66+
.. include:: /reference/forms/types/options/empty_data_description.rst.inc
6967

7068
.. include:: /reference/forms/types/options/error_bubbling.rst.inc
7169

reference/forms/types/percent.rst

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -97,13 +97,11 @@ These options inherit from the :doc:`FormType </reference/forms/types/form>`:
9797

9898
.. include:: /reference/forms/types/options/disabled.rst.inc
9999

100-
.. include:: /reference/forms/types/options/empty_data.rst.inc
101-
:end-before: DEFAULT_PLACEHOLDER
100+
.. include:: /reference/forms/types/options/empty_data_declaration.rst.inc
102101

103102
The default value is ``''`` (the empty string).
104103

105-
.. include:: /reference/forms/types/options/empty_data.rst.inc
106-
:start-after: DEFAULT_PLACEHOLDER
104+
.. include:: /reference/forms/types/options/empty_data_description.rst.inc
107105

108106
.. include:: /reference/forms/types/options/error_bubbling.rst.inc
109107

reference/forms/types/range.rst

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -52,13 +52,11 @@ These options inherit from the :doc:`FormType </reference/forms/types/form>`:
5252

5353
.. include:: /reference/forms/types/options/disabled.rst.inc
5454

55-
.. include:: /reference/forms/types/options/empty_data.rst.inc
56-
:end-before: DEFAULT_PLACEHOLDER
55+
.. include:: /reference/forms/types/options/empty_data_declaration.rst.inc
5756

5857
The default value is ``''`` (the empty string).
5958

60-
.. include:: /reference/forms/types/options/empty_data.rst.inc
61-
:start-after: DEFAULT_PLACEHOLDER
59+
.. include:: /reference/forms/types/options/empty_data_description.rst.inc
6260

6361
.. include:: /reference/forms/types/options/error_bubbling.rst.inc
6462

reference/forms/types/search.rst

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -37,13 +37,11 @@ These options inherit from the :doc:`FormType </reference/forms/types/form>`:
3737

3838
.. include:: /reference/forms/types/options/disabled.rst.inc
3939

40-
.. include:: /reference/forms/types/options/empty_data.rst.inc
41-
:end-before: DEFAULT_PLACEHOLDER
40+
.. include:: /reference/forms/types/options/empty_data_declaration.rst.inc
4241

4342
The default value is ``''`` (the empty string).
4443

45-
.. include:: /reference/forms/types/options/empty_data.rst.inc
46-
:start-after: DEFAULT_PLACEHOLDER
44+
.. include:: /reference/forms/types/options/empty_data_description.rst.inc
4745

4846
.. include:: /reference/forms/types/options/error_bubbling.rst.inc
4947

reference/forms/types/tel.rst

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -43,13 +43,11 @@ These options inherit from the :doc:`FormType </reference/forms/types/form>`:
4343

4444
.. include:: /reference/forms/types/options/disabled.rst.inc
4545

46-
.. include:: /reference/forms/types/options/empty_data.rst.inc
47-
:end-before: DEFAULT_PLACEHOLDER
46+
.. include:: /reference/forms/types/options/empty_data_declaration.rst.inc
4847

4948
The default value is ``''`` (the empty string).
5049

51-
.. include:: /reference/forms/types/options/empty_data.rst.inc
52-
:start-after: DEFAULT_PLACEHOLDER
50+
.. include:: /reference/forms/types/options/empty_data_description.rst.inc
5351

5452
.. include:: /reference/forms/types/options/error_bubbling.rst.inc
5553

reference/forms/types/text.rst

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -27,15 +27,13 @@ These options inherit from the :doc:`FormType </reference/forms/types/form>`:
2727

2828
.. include:: /reference/forms/types/options/disabled.rst.inc
2929

30-
.. include:: /reference/forms/types/options/empty_data.rst.inc
31-
:end-before: DEFAULT_PLACEHOLDER
30+
.. include:: /reference/forms/types/options/empty_data_declaration.rst.inc
3231

3332
From an HTTP perspective, submitted data is always a string or an array of strings.
3433
So by default, the form will treat any empty string as null. If you prefer to get
3534
an empty string, explicitly set the ``empty_data`` option to an empty string.
3635

37-
.. include:: /reference/forms/types/options/empty_data.rst.inc
38-
:start-after: DEFAULT_PLACEHOLDER
36+
.. include:: /reference/forms/types/options/empty_data_description.rst.inc
3937

4038
.. include:: /reference/forms/types/options/error_bubbling.rst.inc
4139

reference/forms/types/textarea.rst

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -33,13 +33,11 @@ These options inherit from the :doc:`FormType </reference/forms/types/form>`:
3333

3434
.. include:: /reference/forms/types/options/disabled.rst.inc
3535

36-
.. include:: /reference/forms/types/options/empty_data.rst.inc
37-
:end-before: DEFAULT_PLACEHOLDER
36+
.. include:: /reference/forms/types/options/empty_data_declaration.rst.inc
3837

3938
The default value is ``''`` (the empty string).
4039

41-
.. include:: /reference/forms/types/options/empty_data.rst.inc
42-
:start-after: DEFAULT_PLACEHOLDER
40+
.. include:: /reference/forms/types/options/empty_data_description.rst.inc
4341

4442
.. include:: /reference/forms/types/options/error_bubbling.rst.inc
4543

0 commit comments

Comments
 (0)