From 442470ff02876f6712a5d3b16c328ed7e76eba79 Mon Sep 17 00:00:00 2001 From: Hyunmin Kim Date: Sat, 30 Mar 2013 12:01:55 -0700 Subject: [PATCH 1/5] Added missing options. --- reference/forms/types/checkbox.rst | 7 +++++++ reference/forms/types/date.rst | 2 +- reference/forms/types/datetime.rst | 5 ++++- reference/forms/types/field.rst | 18 ++++++++++++++++-- reference/forms/types/form.rst | 7 ++++++- reference/forms/types/integer.rst | 3 +++ reference/forms/types/number.rst | 2 ++ .../forms/types/options/precision.rst.inc | 9 +++++++++ reference/forms/types/time.rst | 5 ++++- 9 files changed, 52 insertions(+), 6 deletions(-) create mode 100644 reference/forms/types/options/precision.rst.inc diff --git a/reference/forms/types/checkbox.rst b/reference/forms/types/checkbox.rst index abd7bd43a13..46108a85d8c 100644 --- a/reference/forms/types/checkbox.rst +++ b/reference/forms/types/checkbox.rst @@ -12,6 +12,7 @@ if the box is unchecked, the value will be set to false. | Rendered as | ``input`` ``checkbox`` field | +-------------+------------------------------------------------------------------------+ | Options | - `value`_ | +| | - `checked`_ | +-------------+------------------------------------------------------------------------+ | Inherited | - `required`_ | | options | - `label`_ | @@ -44,6 +45,12 @@ value The value that's actually used as the value for the checkbox. This does not affect the value that's set on your object. +checked +~~~~~~~ + +**type**: ``mixed`` **default**: ``1`` + + Inherited options ----------------- diff --git a/reference/forms/types/date.rst b/reference/forms/types/date.rst index ea7f9dac43f..d32e4c407e0 100644 --- a/reference/forms/types/date.rst +++ b/reference/forms/types/date.rst @@ -120,4 +120,4 @@ These options inherit from the :doc:`field` type: .. include:: /reference/forms/types/options/invalid_message.rst.inc -.. include:: /reference/forms/types/options/invalid_message_parameters.rst.inc \ No newline at end of file +.. include:: /reference/forms/types/options/invalid_message_parameters.rst.inc diff --git a/reference/forms/types/datetime.rst b/reference/forms/types/datetime.rst index bc4401c43fa..c9c1d71fad7 100644 --- a/reference/forms/types/datetime.rst +++ b/reference/forms/types/datetime.rst @@ -28,6 +28,7 @@ data can be a ``DateTime`` object, a string, a timestamp or an array. | | - `with_seconds`_ | | | - `data_timezone`_ | | | - `user_timezone`_ | +| | - `empty_value`_ | +----------------------+-----------------------------------------------------------------------------+ | Inherited | - `invalid_message`_ | | options | - `invalid_message_parameters`_ | @@ -97,6 +98,8 @@ for more details. .. include:: /reference/forms/types/options/user_timezone.rst.inc +.. include:: /reference/forms/types/options/empty_value.rst.inc + Inherited options ----------------- @@ -104,4 +107,4 @@ These options inherit from the :doc:`field` type: .. include:: /reference/forms/types/options/invalid_message.rst.inc -.. include:: /reference/forms/types/options/invalid_message_parameters.rst.inc \ No newline at end of file +.. include:: /reference/forms/types/options/invalid_message_parameters.rst.inc diff --git a/reference/forms/types/field.rst b/reference/forms/types/field.rst index 51b7dec035c..8ec961138f0 100644 --- a/reference/forms/types/field.rst +++ b/reference/forms/types/field.rst @@ -13,10 +13,24 @@ The ``field`` type predefines a couple of options: .. include:: /reference/forms/types/options/required.rst.inc -.. include:: /reference/forms/types/options/disabled.rst.inc - .. include:: /reference/forms/types/options/trim.rst.inc .. include:: /reference/forms/types/options/property_path.rst.inc .. include:: /reference/forms/types/options/attr.rst.inc + +.. include:: /reference/forms/types/options/read_only.rst.inc + +.. include:: /reference/forms/types/options/max_length.rst.inc + +.. include:: /reference/forms/types/options/date_pattern.rst.inc + +.. include:: /reference/forms/types/options/by_reference.rst.inc + +.. include:: /reference/forms/types/options/error_bubbling.rst.inc + +.. include:: /reference/forms/types/options/label.rst.inc + +.. include:: /reference/forms/types/options/invalid_message.rst.inc + +.. include:: /reference/forms/types/options/invalid_message_parameters.rst.inc diff --git a/reference/forms/types/form.rst b/reference/forms/types/form.rst index 1121a0befb2..39348fca02d 100644 --- a/reference/forms/types/form.rst +++ b/reference/forms/types/form.rst @@ -4,4 +4,9 @@ form Field Type =============== -See :class:`Symfony\\Component\\Form\\Extension\\Core\\Type\\FormType`. \ No newline at end of file +See :class:`Symfony\\Component\\Form\\Extension\\Core\\Type\\FormType`. + +virtual +------- + +See :doc:`How to use the Virtual Form Field Option` diff --git a/reference/forms/types/integer.rst b/reference/forms/types/integer.rst index 2fe33fcb282..28b14213c50 100644 --- a/reference/forms/types/integer.rst +++ b/reference/forms/types/integer.rst @@ -16,6 +16,7 @@ integers. By default, all non-integer values (e.g. 6.78) will round down (e.g. 6 | Rendered as | ``input`` ``text`` field | +-------------+-----------------------------------------------------------------------+ | Options | - `rounding_mode`_ | +| | - `precision`_ | | | - `grouping`_ | +-------------+-----------------------------------------------------------------------+ | Inherited | - `required`_ | @@ -33,6 +34,8 @@ integers. By default, all non-integer values (e.g. 6.78) will round down (e.g. 6 Field Options ------------- +.. include:: /reference/forms/types/options/precision.rst.inc + rounding_mode ~~~~~~~~~~~~~ diff --git a/reference/forms/types/number.rst b/reference/forms/types/number.rst index fb2ddde3ed4..36b93389570 100644 --- a/reference/forms/types/number.rst +++ b/reference/forms/types/number.rst @@ -30,6 +30,8 @@ you want to use for your number. Field Options ------------- +.. include:: /reference/forms/types/options/precision.rst.inc + precision ~~~~~~~~~ diff --git a/reference/forms/types/options/precision.rst.inc b/reference/forms/types/options/precision.rst.inc new file mode 100644 index 00000000000..ac606eb8a5d --- /dev/null +++ b/reference/forms/types/options/precision.rst.inc @@ -0,0 +1,9 @@ +precision +~~~~~~~~~ + +**type**: ``integer`` **default**: Locale-specific (usually around ``3``) + +This specifies how many decimals will be allowed until the field rounds +the submitted value (via ``rounding_mode``). For example, if ``precision`` +is set to ``2``, a submitted value of ``20.123`` will be rounded to, +for example, ``20.12`` (depending on your ``rounding_mode``). diff --git a/reference/forms/types/time.rst b/reference/forms/types/time.rst index 8568b8905a5..deb7a728886 100644 --- a/reference/forms/types/time.rst +++ b/reference/forms/types/time.rst @@ -23,6 +23,7 @@ as a ``DateTime`` object, a string, a timestamp or an array. | | - `seconds`_ | | | - `data_timezone`_ | | | - `user_timezone`_ | +| | - `empty_data`_ | +----------------------+-----------------------------------------------------------------------------+ | Inherited | - `invalid_message`_ | | options | - `invalid_message_parameters`_ | @@ -108,6 +109,8 @@ this format. .. include:: /reference/forms/types/options/user_timezone.rst.inc +.. include:: /reference/forms/types/options/empty_value.rst.inc + Inherited options ----------------- @@ -115,4 +118,4 @@ These options inherit from the :doc:`field` type: .. include:: /reference/forms/types/options/invalid_message.rst.inc -.. include:: /reference/forms/types/options/invalid_message_parameters.rst.inc \ No newline at end of file +.. include:: /reference/forms/types/options/invalid_message_parameters.rst.inc From 7a19459065866f0552c77f84e6422be60642d1e6 Mon Sep 17 00:00:00 2001 From: Hyunmin Kim Date: Sat, 30 Mar 2013 12:04:47 -0700 Subject: [PATCH 2/5] Deleted checked from options --- reference/forms/types/checkbox.rst | 7 ------- 1 file changed, 7 deletions(-) diff --git a/reference/forms/types/checkbox.rst b/reference/forms/types/checkbox.rst index 46108a85d8c..abd7bd43a13 100644 --- a/reference/forms/types/checkbox.rst +++ b/reference/forms/types/checkbox.rst @@ -12,7 +12,6 @@ if the box is unchecked, the value will be set to false. | Rendered as | ``input`` ``checkbox`` field | +-------------+------------------------------------------------------------------------+ | Options | - `value`_ | -| | - `checked`_ | +-------------+------------------------------------------------------------------------+ | Inherited | - `required`_ | | options | - `label`_ | @@ -45,12 +44,6 @@ value The value that's actually used as the value for the checkbox. This does not affect the value that's set on your object. -checked -~~~~~~~ - -**type**: ``mixed`` **default**: ``1`` - - Inherited options ----------------- From 61de8c465b1f0ee588752c98f065ec0b126e24e7 Mon Sep 17 00:00:00 2001 From: Hyunmin Kim Date: Sat, 30 Mar 2013 12:07:56 -0700 Subject: [PATCH 3/5] Added newline --- reference/forms/types/date.rst | 1 + 1 file changed, 1 insertion(+) diff --git a/reference/forms/types/date.rst b/reference/forms/types/date.rst index d32e4c407e0..9592f6f3450 100644 --- a/reference/forms/types/date.rst +++ b/reference/forms/types/date.rst @@ -121,3 +121,4 @@ These options inherit from the :doc:`field` type: .. include:: /reference/forms/types/options/invalid_message.rst.inc .. include:: /reference/forms/types/options/invalid_message_parameters.rst.inc + From d8eec62bd49c0ae7490092a8829267ac814ef39e Mon Sep 17 00:00:00 2001 From: Hyunmin Kim Date: Sat, 30 Mar 2013 12:12:04 -0700 Subject: [PATCH 4/5] Added more newlines at end of file. --- reference/forms/types/datetime.rst | 1 + reference/forms/types/form.rst | 1 + reference/forms/types/time.rst | 1 + 3 files changed, 3 insertions(+) diff --git a/reference/forms/types/datetime.rst b/reference/forms/types/datetime.rst index c9c1d71fad7..b4d6f0a8328 100644 --- a/reference/forms/types/datetime.rst +++ b/reference/forms/types/datetime.rst @@ -108,3 +108,4 @@ These options inherit from the :doc:`field` type: .. include:: /reference/forms/types/options/invalid_message.rst.inc .. include:: /reference/forms/types/options/invalid_message_parameters.rst.inc + diff --git a/reference/forms/types/form.rst b/reference/forms/types/form.rst index 39348fca02d..04437ced4ab 100644 --- a/reference/forms/types/form.rst +++ b/reference/forms/types/form.rst @@ -10,3 +10,4 @@ virtual ------- See :doc:`How to use the Virtual Form Field Option` + diff --git a/reference/forms/types/time.rst b/reference/forms/types/time.rst index deb7a728886..35e69fcdfe1 100644 --- a/reference/forms/types/time.rst +++ b/reference/forms/types/time.rst @@ -119,3 +119,4 @@ These options inherit from the :doc:`field` type: .. include:: /reference/forms/types/options/invalid_message.rst.inc .. include:: /reference/forms/types/options/invalid_message_parameters.rst.inc + From 70dff2190a74c8f91fd6267746c4a86900dfb4bc Mon Sep 17 00:00:00 2001 From: Hyunmin Kim Date: Sat, 30 Mar 2013 12:22:15 -0700 Subject: [PATCH 5/5] Deleted precision duplication from number.rst --- reference/forms/types/number.rst | 10 ---------- 1 file changed, 10 deletions(-) diff --git a/reference/forms/types/number.rst b/reference/forms/types/number.rst index 36b93389570..15d42dc0cec 100644 --- a/reference/forms/types/number.rst +++ b/reference/forms/types/number.rst @@ -32,16 +32,6 @@ Field Options .. include:: /reference/forms/types/options/precision.rst.inc -precision -~~~~~~~~~ - -**type**: ``integer`` **default**: Locale-specific (usually around ``3``) - -This specifies how many decimals will be allowed until the field rounds -the submitted value (via ``rounding_mode``). For example, if ``precision`` -is set to ``2``, a submitted value of ``20.123`` will be rounded to, -for example, ``20.12`` (depending on your ``rounding_mode``). - rounding_mode ~~~~~~~~~~~~~