From 18ed8675598dee8c536282fab4b2a46e08955135 Mon Sep 17 00:00:00 2001 From: XitasoChris Date: Tue, 20 Jan 2015 16:19:46 +0100 Subject: [PATCH 1/4] Add possible values for widget_type The documentation does not list which values are possible for widget_type. These two are the ones I extracted from the Symfony2 source code. --- reference/forms/types/datetime.rst | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/reference/forms/types/datetime.rst b/reference/forms/types/datetime.rst index e294d9ac464..c684953aa23 100644 --- a/reference/forms/types/datetime.rst +++ b/reference/forms/types/datetime.rst @@ -64,7 +64,9 @@ date_widget **type**: ``string`` **default**: ``choice`` -Defines the ``widget`` option for the :doc:`date ` type +Defines the ``widget`` option for the :doc:`date ` type. +Possible values: ``single_text`` (display as text field), ``choice`` (provide select +boxes for day, month and year) .. include:: /reference/forms/types/options/days.rst.inc From 03ce572134cb689f92f135281b7181507023edb8 Mon Sep 17 00:00:00 2001 From: Christopher Gross Date: Mon, 23 Mar 2015 16:43:24 +0100 Subject: [PATCH 2/4] move title out of included file as suggested in PR #4892 --- reference/forms/types/birthday.rst | 3 +++ reference/forms/types/date.rst | 3 +++ reference/forms/types/datetime.rst | 6 +----- reference/forms/types/options/date_widget.rst.inc | 3 --- 4 files changed, 7 insertions(+), 8 deletions(-) diff --git a/reference/forms/types/birthday.rst b/reference/forms/types/birthday.rst index 2926a22b369..bcd6dfdade2 100644 --- a/reference/forms/types/birthday.rst +++ b/reference/forms/types/birthday.rst @@ -78,6 +78,9 @@ These options inherit from the :doc:`date ` type: .. include:: /reference/forms/types/options/view_timezone.rst.inc +widget +~~~~~~ + .. include:: /reference/forms/types/options/date_widget.rst.inc These options inherit from the :doc:`form ` type: diff --git a/reference/forms/types/date.rst b/reference/forms/types/date.rst index 8197e7da328..28de8d6f3c7 100644 --- a/reference/forms/types/date.rst +++ b/reference/forms/types/date.rst @@ -122,6 +122,9 @@ Alternatively, you can specify a string to be displayed for the "blank" value:: .. include:: /reference/forms/types/options/view_timezone.rst.inc +widget +~~~~~~ + .. include:: /reference/forms/types/options/date_widget.rst.inc .. include:: /reference/forms/types/options/years.rst.inc diff --git a/reference/forms/types/datetime.rst b/reference/forms/types/datetime.rst index c684953aa23..8855dccc508 100644 --- a/reference/forms/types/datetime.rst +++ b/reference/forms/types/datetime.rst @@ -62,11 +62,7 @@ for more details. date_widget ~~~~~~~~~~~ -**type**: ``string`` **default**: ``choice`` - -Defines the ``widget`` option for the :doc:`date ` type. -Possible values: ``single_text`` (display as text field), ``choice`` (provide select -boxes for day, month and year) +.. include:: /reference/forms/types/options/date_widget.rst.inc .. include:: /reference/forms/types/options/days.rst.inc diff --git a/reference/forms/types/options/date_widget.rst.inc b/reference/forms/types/options/date_widget.rst.inc index 2921bc57b55..865af8472ac 100644 --- a/reference/forms/types/options/date_widget.rst.inc +++ b/reference/forms/types/options/date_widget.rst.inc @@ -1,6 +1,3 @@ -widget -~~~~~~ - **type**: ``string`` **default**: ``choice`` The basic way in which this field should be rendered. Can be one of the following: From fdefe8e7d699c37f81de1601e37c92765f2ddf3b Mon Sep 17 00:00:00 2001 From: Christopher Gross Date: Mon, 23 Mar 2015 16:47:52 +0100 Subject: [PATCH 3/4] move title back and move description to separate file as suggested in PR #4892 --- reference/forms/types/birthday.rst | 3 --- reference/forms/types/date.rst | 3 --- reference/forms/types/datetime.rst | 2 +- reference/forms/types/options/date_widget.rst.inc | 13 +++---------- .../types/options/date_widget_description.rst.inc | 11 +++++++++++ 5 files changed, 15 insertions(+), 17 deletions(-) create mode 100644 reference/forms/types/options/date_widget_description.rst.inc diff --git a/reference/forms/types/birthday.rst b/reference/forms/types/birthday.rst index bcd6dfdade2..2926a22b369 100644 --- a/reference/forms/types/birthday.rst +++ b/reference/forms/types/birthday.rst @@ -78,9 +78,6 @@ These options inherit from the :doc:`date ` type: .. include:: /reference/forms/types/options/view_timezone.rst.inc -widget -~~~~~~ - .. include:: /reference/forms/types/options/date_widget.rst.inc These options inherit from the :doc:`form ` type: diff --git a/reference/forms/types/date.rst b/reference/forms/types/date.rst index 28de8d6f3c7..8197e7da328 100644 --- a/reference/forms/types/date.rst +++ b/reference/forms/types/date.rst @@ -122,9 +122,6 @@ Alternatively, you can specify a string to be displayed for the "blank" value:: .. include:: /reference/forms/types/options/view_timezone.rst.inc -widget -~~~~~~ - .. include:: /reference/forms/types/options/date_widget.rst.inc .. include:: /reference/forms/types/options/years.rst.inc diff --git a/reference/forms/types/datetime.rst b/reference/forms/types/datetime.rst index 8855dccc508..f511574d25b 100644 --- a/reference/forms/types/datetime.rst +++ b/reference/forms/types/datetime.rst @@ -62,7 +62,7 @@ for more details. date_widget ~~~~~~~~~~~ -.. include:: /reference/forms/types/options/date_widget.rst.inc +.. include:: /reference/forms/types/options/date_widget_description.rst.inc .. include:: /reference/forms/types/options/days.rst.inc diff --git a/reference/forms/types/options/date_widget.rst.inc b/reference/forms/types/options/date_widget.rst.inc index 865af8472ac..cfe96258704 100644 --- a/reference/forms/types/options/date_widget.rst.inc +++ b/reference/forms/types/options/date_widget.rst.inc @@ -1,11 +1,4 @@ -**type**: ``string`` **default**: ``choice`` +widget +~~~~~~ -The basic way in which this field should be rendered. Can be one of the following: - -* ``choice``: renders three select inputs. The order of the selects is defined - in the `format`_ option. - -* ``text``: renders a three field input of type ``text`` (month, day, year). - -* ``single_text``: renders a single input of type ``date``. User's input is - validated based on the `format`_ option. +.. include:: /reference/forms/types/options/date_widget_description.rst.inc \ No newline at end of file diff --git a/reference/forms/types/options/date_widget_description.rst.inc b/reference/forms/types/options/date_widget_description.rst.inc new file mode 100644 index 00000000000..865af8472ac --- /dev/null +++ b/reference/forms/types/options/date_widget_description.rst.inc @@ -0,0 +1,11 @@ +**type**: ``string`` **default**: ``choice`` + +The basic way in which this field should be rendered. Can be one of the following: + +* ``choice``: renders three select inputs. The order of the selects is defined + in the `format`_ option. + +* ``text``: renders a three field input of type ``text`` (month, day, year). + +* ``single_text``: renders a single input of type ``date``. User's input is + validated based on the `format`_ option. From 9d0b62a4b113bff09bb2d78d7fa368e0f40ef5ac Mon Sep 17 00:00:00 2001 From: Christopher Gross Date: Mon, 23 Mar 2015 16:50:08 +0100 Subject: [PATCH 4/4] terminate file with newline --- reference/forms/types/options/date_widget.rst.inc | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/reference/forms/types/options/date_widget.rst.inc b/reference/forms/types/options/date_widget.rst.inc index cfe96258704..028c10e5279 100644 --- a/reference/forms/types/options/date_widget.rst.inc +++ b/reference/forms/types/options/date_widget.rst.inc @@ -1,4 +1,4 @@ widget ~~~~~~ -.. include:: /reference/forms/types/options/date_widget_description.rst.inc \ No newline at end of file +.. include:: /reference/forms/types/options/date_widget_description.rst.inc