[WIP] Adding documentation for fields
This commits adds the doc regarding those fields: - EmailField - PercentageField - PhoneField - UrlField
This commit is contained in:
parent
5fb2d7c1c2
commit
27ceec8674
@ -29,15 +29,44 @@ Reference List
|
||||
- Technical name
|
||||
- Type
|
||||
- Short Description
|
||||
* - :ref:`EmailField <frontend/fields/email_field>`
|
||||
- `text`
|
||||
- `char`
|
||||
- display email addresses
|
||||
* - :ref:`FieldText <frontend/fields/field_text>`
|
||||
- `text`
|
||||
- `char`
|
||||
- display text values
|
||||
* - :ref:`PercentageField <frontend/fields/percentage_field>`
|
||||
- `text`
|
||||
- `char`
|
||||
- display percentages
|
||||
* - :ref:`PhoneField <frontend/fields/phone_field>`
|
||||
- `text`
|
||||
- `char`, `number`
|
||||
- display phone numbers
|
||||
* - :ref:`UrlField <frontend/fields/url_field>`
|
||||
- `text`
|
||||
- `char`
|
||||
- display URLs
|
||||
* - :ref:`OtherField <frontend/fields/other_field>`
|
||||
- `other_name`
|
||||
- `text`, `many2one`
|
||||
- represents some values
|
||||
|
||||
.. _frontend/fields/email_field:
|
||||
|
||||
EmailField
|
||||
----------
|
||||
|
||||
- Location: `@web/fields/email_field`
|
||||
- Technical name: `email`
|
||||
- Supported types: `char`
|
||||
|
||||
The `EmailField` component represents a textual value containing an email address. The field
|
||||
is an input with the `email` type in edit mode, and a link with an `href` in readonly mode with
|
||||
the `mailto:` prefix. It allows the user to handle the click to open an email application if available.
|
||||
|
||||
.. _frontend/fields/field_text:
|
||||
|
||||
FieldText
|
||||
@ -50,6 +79,58 @@ FieldText
|
||||
The `FieldText` component represents a textual value. It is the default field
|
||||
for all fields of type `char`.
|
||||
|
||||
.. _frontend/fields/percentage_field:
|
||||
|
||||
PercentageField
|
||||
---------------
|
||||
|
||||
- Location: `@web/fields/percentage_field`
|
||||
- Technical name: `percentage`
|
||||
- Supported types: `number`
|
||||
|
||||
The `PercentageField` component represents a percentage. To use the field, you must give a
|
||||
float value between 0 and 1. Then, the field will format the value to an understandable value
|
||||
in percent (e.g. `0.567` would be converted to `56.7%`). When the user enters the edit mode,
|
||||
the value is still visible as a percentage, but the value that is saved is always a float value.
|
||||
|
||||
.. _frontend/fields/phone_field:
|
||||
|
||||
PhoneField
|
||||
----------
|
||||
|
||||
- Location: `@web/fields/phone_field`
|
||||
- Technical name: `phone`
|
||||
- Supported types: `char`, `number`
|
||||
|
||||
The `PhoneField` component represents a textual value containing a phone number. The field
|
||||
is an input with the `phone` type in edit mode, and a link with an `href` in readonly mode with
|
||||
the `tel:` prefix. It allows the user to handle the click to start a call to the number.
|
||||
|
||||
.. _frontend/fields/url_field:
|
||||
|
||||
UrlField
|
||||
--------
|
||||
|
||||
- Location: `@web/fields/url_field`
|
||||
- Technical name: `url`
|
||||
- Supported types: `char`
|
||||
|
||||
The `UrlField` component represents a textual value containing a URL. The field
|
||||
is a text input in edit mode, and a link with an `href` to the given value.
|
||||
|
||||
It supports the following options:
|
||||
|
||||
.. list-table::
|
||||
:widths: 20 20 60
|
||||
:header-rows: 1
|
||||
|
||||
* - Name
|
||||
- Type
|
||||
- Description
|
||||
* - `website_path`
|
||||
- `boolean`
|
||||
- optional. if `true`, the href will be the exact given value. No prefix will be added to format the URL
|
||||
|
||||
.. _frontend/fields/other_field:
|
||||
|
||||
Other Field
|
||||
|
Loading…
Reference in New Issue
Block a user