mirror of
https://github.com/YunoHost/doc.git
synced 2024-09-03 20:06:26 +02:00
Merge pull request #1459 from yunohost-bot/anonymous-2020-12-02_09-10-43
[Anonymous contrib] Add number parser
This commit is contained in:
commit
39d11e9008
1 changed files with 29 additions and 1 deletions
|
@ -87,7 +87,7 @@ Example in toml:
|
||||||
[maybe.some.stuff.before.the_name]
|
[maybe.some.stuff.before.the_name]
|
||||||
type = "string"
|
type = "string"
|
||||||
ask.en = "the question in english"
|
ask.en = "the question in english"
|
||||||
ask.fr = "the question in french"
|
ask.fr = "la question en français"
|
||||||
example = "an example value" # optional
|
example = "an example value" # optional
|
||||||
choices = ["fr", "en"]
|
choices = ["fr", "en"]
|
||||||
default = "en" # optional
|
default = "en" # optional
|
||||||
|
@ -250,6 +250,34 @@ And in json:
|
||||||
},
|
},
|
||||||
```
|
```
|
||||||
|
|
||||||
|
### Number
|
||||||
|
|
||||||
|
Like string except the user needs to enter a number
|
||||||
|
|
||||||
|
Example in toml:
|
||||||
|
|
||||||
|
```toml
|
||||||
|
[maybe.some.stuff.before.the_name]
|
||||||
|
type = "number"
|
||||||
|
ask.en = "the question in english"
|
||||||
|
ask.fr = "the question in french"
|
||||||
|
default = 0
|
||||||
|
```
|
||||||
|
|
||||||
|
And in json:
|
||||||
|
|
||||||
|
```javascript
|
||||||
|
{
|
||||||
|
"name": "the_name",
|
||||||
|
"type": "number",
|
||||||
|
"ask": {
|
||||||
|
"en": "the question in english",
|
||||||
|
"fr": "the question in french"
|
||||||
|
},
|
||||||
|
"default": 0
|
||||||
|
},
|
||||||
|
```
|
||||||
|
|
||||||
### App
|
### App
|
||||||
|
|
||||||
This type will ask the user to select an application in the list of installed
|
This type will ask the user to select an application in the list of installed
|
||||||
|
|
Loading…
Add table
Reference in a new issue