diff --git a/source/import_documentation/Components/Solid-Form-Search.rst b/source/import_documentation/Components/Solid-Form-Search.rst index 5265770dda181c0aaf0c7d8f8f175a0f34e1e6ff..8bfdb43fc323cbc5690f3345203e27815b5d7276 100644 --- a/source/import_documentation/Components/Solid-Form-Search.rst +++ b/source/import_documentation/Components/Solid-Form-Search.rst @@ -55,7 +55,7 @@ Attributes ``range-[field]`` ~~~~~~~~~~~~~~~~~ URL of a container which list the accepted values - for the field ``[field]``. It’s particularly useful with a dropdown + for the field ``[field]``. It’s particularly useful with a dropdown or multipleselect field. .. _enum-field-sfs: @@ -100,6 +100,41 @@ Attributes Equal to the value ``off``, it cancels the automatic entry of values in the relevant ``[field]``. It can be added to ``inputs``, ``textarea`` and ``select``. +.. _search-placeholder-field: +``search-placeholder-[field]`` +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + *Available from version 0.17* + + Allows to modify "searchPlaceholder" displayed in the search bar (from SlimSelect plugin). + Its value by default is "Search" in English, "Rechercher" in French. + **It works only with the ``autocompletion`` feature.** + +.. _search-text-field: +``search-text-[field]`` +~~~~~~~~~~~~~~~~~~~~~~~ + *Available from version 0.17* + + Allows to modify "searchText" displayed when no value is found (from SlimSelect plugin). + Its value by default is "No result" in English, "Aucun résultat" in French. + **It works only with the ``autocompletion`` feature.** + + .. code:: html + + <solid-form-search + id="filter-multiselectautocomp" + fields="skills" + widget-skills="solid-form-multipleselect-autocompletion-placeholder" + placeholder-skills="Please, pick a value" + search-text-skills="Nothing found" + search-placeholder-skills="Searching..." + ></solid-form-search> + <solid-display + data-src="data/list/users.jsonld" + fields="username, skills" + multiple-skills + filtered-by="filter-multiselectautocomp" + ></solid-display> + Widgets ------- By default, the widget used is ``<solid-form-label-text>``. Cf the diff --git a/source/import_documentation/Mixins/translation-mixin.rst b/source/import_documentation/Mixins/translation-mixin.rst new file mode 100644 index 0000000000000000000000000000000000000000..f1858c4c51ef53da57abe720cafb78bc1a4ae07b --- /dev/null +++ b/source/import_documentation/Mixins/translation-mixin.rst @@ -0,0 +1,20 @@ +.. _translation-mixin: +translation-mixin +================= +*Available from version 0.17* + +The translation mixin provides an automatic translation in elements, depending on the browser language (English and French). Translations are default values, visible if no value is given by an attribute. + +The concerned elements are : + - the submit-button in :ref:`solid-form <solid-form>`, + - the button in :ref:`solid-delete <solid-delete>`, + - the confirmation message from :ref:`validation-mixin <validation-mixin>`, + - the text in modal dialog's buttons from :ref:`validation-mixin <validation-mixin>`, + - :ref:`search-placeholder-[field] <search-placeholder-[field]>` and :ref:`search-text-[field] <search-text-[field]>` attributes available with ``autocompletion`` feature (SlimSelect plugin) from :ref:`widget API reference <reference>`. + +Used by: +-------- + + * :ref:`store-mixin <store-mixin>` + * :ref:`validation-mixin <validation-mixin>` + * :ref:`widget-mixin <mixin-mixin>` \ No newline at end of file diff --git a/source/import_documentation/Mixins/validation-mixin.rst b/source/import_documentation/Mixins/validation-mixin.rst index 43269d2b2999c2a99d16eaab0c00dcc20af70dfd..0cade7ce070e98538370e17d8609e8e160ff78ec 100644 --- a/source/import_documentation/Mixins/validation-mixin.rst +++ b/source/import_documentation/Mixins/validation-mixin.rst @@ -26,7 +26,7 @@ Attributes ``confirmation-message`` ~~~~~~~~~~~~~~~~~~~~~~~~ Message displayed in the modal dialog (``confirm`` or ``dialog`` type). - The message by default is "Please, confirm your choice". + The message by default is "Please, confirm your choice" in English, "Merci de confirmer votre choix" in French. **The attributes below only concern ``dialog`` type.** @@ -34,12 +34,12 @@ Attributes .. _confirmation-submit-text: ``confirmation-submit-text`` ~~~~~~~~~~~~~~~~~~~~~~~~~~~~ - Text displayed on the submit button ("Ok" by default). + Text displayed on the submit button (by default, "Ok" in English, "Oui" in French). .. _confirmation-cancel-text: ``confirmation-cancel-text`` ~~~~~~~~~~~~~~~~~~~~~~~~~~~~ - Text displayed on the cancel button ("Cancel" by default). + Text displayed on the cancel button (by default "Cancel" in English, "Annuler" in French). .. _confirmation-submit-class: ``confirmation-submit-class`` diff --git a/source/import_documentation/Widgets/Reference.rst b/source/import_documentation/Widgets/Reference.rst index 634040aa8dcb51a0407f03463c9b434dbd9ef417..5f10c22dab6ff0888010b281d3a9fa7560f102bd 100644 --- a/source/import_documentation/Widgets/Reference.rst +++ b/source/import_documentation/Widgets/Reference.rst @@ -82,7 +82,7 @@ Features to add to the widget. You can choose as many as you want - ``label``: adds a ``label`` before the template. Uses the attribute ``name`` if ``label`` is not defined. - ``labellast``: adds a ``label`` after the template. Uses the attribute ``name`` if ``label`` is not defined. -- ``autocompletion``: initializes the ``SlimSelect`` plugin. Works only with dropdowns. +- ``autocompletion``: initializes the ``SlimSelect`` plugin. Works only with ``dropdown`` and ``multipleselect`` templates. - ``autolink``: analyzes widget content, and transforms all links in anchor. - ``mailto``: adds ``mailto:`` at the beginning of an ``href`` attribute. Works only with links. - ``tel``: adds ``tel:`` at the beginning of an ``href`` attribute. Works only with links. diff --git a/source/import_documentation/attributes-list.rst b/source/import_documentation/attributes-list.rst index 41f754709d4780e907ffb694898151801ac5eb95..14765805b892ca2c9c83785e3901508a88ec0d68 100644 --- a/source/import_documentation/attributes-list.rst +++ b/source/import_documentation/attributes-list.rst @@ -273,6 +273,14 @@ List of attributes (core framework) ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ * :ref:`filter-mixin <filter-mixin>` +``search-placeholder-[field]`` +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + * :ref:`solid-form-search <search-placeholder-field>` + +``search-text-[field]`` +~~~~~~~~~~~~~~~~~~~~~~~ + * :ref:`solid-form-search <search-text-field>` + ``src-[field]`` ~~~~~~~~~~~~~~~ * :ref:`widget-mixin <src-field>`