Skip to content
Snippets Groups Projects
Commit 44cf8e87 authored by Matthieu Fesselier's avatar Matthieu Fesselier
Browse files

Merge branch 'start-end-value-attributes' into 'dev'

Add start-value-[field], end-value-[field] attributes

See merge request !41
parents 00f1ab18 aee12ba2
No related branches found
No related tags found
2 merge requests!41Add start-value-[field], end-value-[field] attributes,!40Doc for core@0.14
......@@ -37,26 +37,26 @@ Attributes
List of fields used to perform the search.
``label-[field]``
~~~~~~~~~~~~~
~~~~~~~~~~~~~~~~~
When displaying a form, the default labels are the fields names of the model.
If you want something fancier, you can set this attribute.
i.e. ``label-username="Your name"``
``submit-button``
~~~~~~~~~~~~~
~~~~~~~~~~~~~~~~~
*Available from version 0.13*
Text of the submit button to create in the search form. If the attribute is not defined,
no button will be added and the form will trigger the search on change.
``range-[field]``
~~~~~~~~~~~~~
~~~~~~~~~~~~~~~~~
URL of a container which list the accepted values
for the field ``[field]``. It’s particularly useful with a dropdown
field.
``enum-[field]``
~~~~~~~~~~~~~
~~~~~~~~~~~~~~~~
*Available from version 0.13*
List of values of your choice for the field ``[field]``.
......@@ -70,6 +70,22 @@ Attributes
* ``enum-[field]="value1 = a, value2 = b, value3 = c"``: each value will be displayed
and "a", "b", "c" will be loaded in value attribute.
``start-value-[field]``
~~~~~~~~~~~~~~~~~~~~~~~
*Available from version 0.15*
Allows to define the value of the first ``<input>`` to filter data.
Only usable with ``solid-form-rangedate`` and ``solid-form-rangenumber``.
In ``solid-form-rangedate``, it can be defined to ``today``.
``end-value-[field]``
~~~~~~~~~~~~~~~~~~~~~
*Available from version 0.15*
Allows to define the value of the second ``<input>`` to filter data.
Only usable with ``solid-form-rangedate`` and ``solid-form-rangenumber``.
In ``solid-form-rangedate``, it can be defined to ``today``.
Widgets
-------
By default, the widget used is ``<solid-form-label-text>``. Cf the
......
......@@ -40,9 +40,11 @@ A widget is built like this.
- ``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``.
- ``rangedate``: set 2 values in 2 ``<input>`` of type ``date``. Used for filtering with min and max.
- ``rangedate``: set 2 values in 2 ``<input>`` of type ``date``. Used for filtering with min and max.
Possible to add ``start-value-[field]`` and ``end-value-[field]`` attributes to set min and max values. Date format to follow : "YYYY-MM-DD". Each attribute accepts ``today`` as value.
- ``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.
- ``rangenumber``: set 2 values in 2 ``<input>`` of type ``number``. Used for filtering with min and max.
Possible to add ``start-value-[field]`` and ``end-value-[field]`` attributes to set min and max values.
- ``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.
......
......@@ -51,6 +51,10 @@ List of attributes (core framework)
~~~~~~~~~~~~~~~~
* :ref:`list-mixin <list-mixin>`
``end-value-[field]``
~~~~~~~~~~~~~~~~~~~~~
* :ref:`solid-form-search <solid-form-search>`
``enum-[field]``
~~~~~~~~~~~~~~~~
* :ref:`solid-form <solid-form>`
......@@ -183,6 +187,10 @@ List of attributes (core framework)
~~~~~~~~~~~~~~~~~~~~
* :ref:`required-mixin <required-mixin>`
``start-value-[field]``
~~~~~~~~~~~~~~~~~~~~~~~
* :ref:`solid-form-search <solid-form-search>`
``(search-fields)`` deprecated
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
* :ref:`filter-mixin <filter-mixin>`
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment