From 9d366bf2bfecb95b1b554b60388ee64c9a88e809 Mon Sep 17 00:00:00 2001 From: Manon Bourgognon <manon.bourgognon@epitech.eu> Date: Wed, 24 Feb 2021 15:54:26 +0100 Subject: [PATCH] solid-form-time widget addition --- source/import_documentation/Components/Solid-Form.rst | 11 +++++++++-- source/import_documentation/Widgets/Reference.rst | 1 + source/import_documentation/attributes-list.rst | 4 ++++ 3 files changed, 14 insertions(+), 2 deletions(-) diff --git a/source/import_documentation/Components/Solid-Form.rst b/source/import_documentation/Components/Solid-Form.rst index da988a6..65a0446 100644 --- a/source/import_documentation/Components/Solid-Form.rst +++ b/source/import_documentation/Components/Solid-Form.rst @@ -84,12 +84,12 @@ Attributes ``min-[field]`` ~~~~~~~~~~~~~~~ Add this attribute for the field ``[field]`` to define its minimum value. - It works only with a ``solid-form-number`` widget. + It works only with ``solid-form-number`` and ``solid-form-time`` widgets. ``max-[field]`` ~~~~~~~~~~~~~~~ Add this attribute for the field ``[field]`` to define its maximum value. - It works only with a ``solid-form-number`` widget. + It works only with ``solid-form-number`` and ``solid-form-time`` widgets. ``pattern-[field]`` ~~~~~~~~~~~~~~~ @@ -127,6 +127,13 @@ Attributes If the attribute is defined, each change in an input will trigger a request to update the resource. This attribute works only when editing resources, not creating them. +``step-[field]`` +~~~~~~~~~~~~~~~~ + *Available from version 0.16* + + Add this attribute for the field ``[field]`` to define the stepping interval number to use as constraint validation . Its value is given in seconds (default value is 60). + It works only with a ``solid-form-time`` widget. + Widgets ------- By default, the widget used is ``<solid-form-label-text>``. Cf the diff --git a/source/import_documentation/Widgets/Reference.rst b/source/import_documentation/Widgets/Reference.rst index 537daab..43f6fb8 100644 --- a/source/import_documentation/Widgets/Reference.rst +++ b/source/import_documentation/Widgets/Reference.rst @@ -58,6 +58,7 @@ Name of the template to use. Available templates: - ``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 an ``<input>`` of type ``color``. - ``password``: set ``value`` in an ``<input>`` of type ``password``. + - ``time``: set ``value`` in an ``<input>`` of type ``time``. The format value is ``hh:mm``. - ``set`` diff --git a/source/import_documentation/attributes-list.rst b/source/import_documentation/attributes-list.rst index 369b60e..a796c1d 100644 --- a/source/import_documentation/attributes-list.rst +++ b/source/import_documentation/attributes-list.rst @@ -231,6 +231,10 @@ List of attributes (core framework) ~~~~~~~~~~~~~~~~~~~~~~~ * :ref:`solid-form-search <solid-form-search>` +``step-[field]`` +~~~~~~~~~~~~~~~~ + * :ref:`solid-form <solid-form>` + ``(search-fields)`` deprecated ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ * :ref:`filter-mixin <filter-mixin>` -- GitLab