Skip to content
Snippets Groups Projects
Commit 735302fa authored by Manon Bourgognon's avatar Manon Bourgognon
Browse files

Add translationMixin & 2 attr in solid-form-search

parent ef180b4a
No related branches found
No related tags found
2 merge requests!70Dev to Master,!64Add translationMixin and 2 attributes in solid-form-search
......@@ -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
......
.. _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
......@@ -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``
......
......@@ -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.
......
......@@ -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>`
......
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