From 45f1105bcf6a476d25b6e58912e5ebefab8d0fdb Mon Sep 17 00:00:00 2001 From: Manon Bourgognon <manon.bourgognon@epitech.eu> Date: Wed, 7 Oct 2020 11:08:45 +0200 Subject: [PATCH] add color widget on solid-form --- .../import_documentation/Components/Solid-Form.rst | 2 +- source/import_documentation/Widgets/Reference.rst | 13 +++++++------ 2 files changed, 8 insertions(+), 7 deletions(-) diff --git a/source/import_documentation/Components/Solid-Form.rst b/source/import_documentation/Components/Solid-Form.rst index 5d8c63b..f3d920c 100644 --- a/source/import_documentation/Components/Solid-Form.rst +++ b/source/import_documentation/Components/Solid-Form.rst @@ -59,7 +59,7 @@ Attributes It’s particularly useful with a dropdown or radio field. Two formats are possible: - * ``enum-xyz="value1, value2, value3"`` : each value will be displayed + * ``enum-xyz="value 1, value 2, value 3"`` : each value will be displayed and loaded in value attribute * ``enum-xyz="value1 = a, value2 = b, value3 = c"``: each value will be displayed and "a", "b", "c" will be loaded in value attribute. diff --git a/source/import_documentation/Widgets/Reference.rst b/source/import_documentation/Widgets/Reference.rst index f872a49..6582362 100644 --- a/source/import_documentation/Widgets/Reference.rst +++ b/source/import_documentation/Widgets/Reference.rst @@ -35,15 +35,15 @@ A widget is built like this. - ``form`` directory - - ``text``: set ``value`` in an ``<input>`` of type ``text`` - - ``textarea``: set ``value`` in a ``<textarea>`` + - ``text``: set ``value`` in an ``<input>`` of type ``text``. + - ``textarea``: set ``value`` in a ``<textarea>``. - ``richtext``: set ``value`` in an ``<div>`` and initialize a light rich text editor by using ``Quill``. - - ``checkbox``: create a checkbox, which is checked if ``value == true`` - - ``date``: set ``value`` in an ``<input>`` of type ``date`` + - ``checkbox``: create a checkbox, which is checked if ``value == true``. + - ``date``: set ``value`` in an ``<input>`` of type ``date``. - ``rangedate``: set 2 values in 2 ``<input>`` of type ``date``. Used for filtering with min and max. - - ``number``: set ``value`` in an ``<input>`` of type ``number`` + - ``number``: set ``value`` in an ``<input>`` of type ``number``. - ``rangenumber``: set 2 values in 2 ``<input>`` of type ``number``. Used for filtering with min and max. - - ``hidden``: set ``value`` in an ``<input>`` of type ``hidden`` + - ``hidden``: set ``value`` in an ``<input>`` of type ``hidden``. - ``dropdown``: set ``value`` in a ``<select>``. The list is provided via the ``range`` attribute, which expects a container’s URL, or via the ``enum`` attribute, which takes a list of the values separated by commas. - ``radio``: set ``value`` in a list of radio buttons. The list is provided via the ``range`` attribute, which expects a container’s URL, or via the ``enum`` attribute, which takes a list of the values separated by commas. - ``multiple``: Accept a container URI as a ``value``, and inserts one widget per resource with a “remove†button for each widget, and an “add†button. @@ -52,6 +52,7 @@ A widget is built like this. When a file is selected it’s uploaded, URL of file is returned by request and set as the ``<input/>`` value. The upload URL is provided via the ``upload-url`` attribute. - ``image``: Works like ``file`` but allow only images in the input, and create a preview of the image when selected by the user. + - ``color``: set ``value`` in a ``<input>`` of type ``color``. - ``set`` -- GitLab