New task: Difference between revisions
Jump to navigation
Jump to search
No edit summary Tag: 2017 source edit |
No edit summary Tag: 2017 source edit |
||
Line 1: | Line 1: | ||
This form shows the following features: | |||
This | |||
* default value for assignee field with magic word <code><nowiki>{{CURRENTUSER}}</nowiki></code> (wikitext and parser functions allowed, useful repositories are the following: [https://www.mediawiki.org/wiki/Help:Magic_words Help:Magic words] and [https://www.mediawiki.org/wiki/Extension:MyVariables Extension:MyVariables]) | |||
* OOUI UserInputWidget for the same field | |||
* status with dropdown with items retrieved by a wikilist on this page [[Task status list]] | |||
* OOUI MultilineTextInputWidget for the task field, with autogrow | |||
* subitems for the repository section | |||
* validation pattern for the url field in the repository section (repository -> properties -> url -> settings symbol near the preferred input field -> validate) | |||
* default rows for the MultilineTextInputWidget inside the input config for the comments field | |||
* hidden field id-increment, with value-formula <code><nowiki>{{#idprovider-increment:}}</nowiki></code> (see [https://www.mediawiki.org/wiki/Extension:IDProvider Extension:IDProvider]) used in pagename formula | |||
* pagename formula with value <code><nowiki>Tasks/<assignee>/<id-increment></nowiki></code> (this will create a page with the entered metadata or freetext with title like <code><nowiki>Tasks/User:Admin/1</nowiki></code> ) | |||
* The form gets validated through [https://github.com/ajv-validator/ajv ajv-validator] | |||
{{#visualdataform: Task | |||
{{#visualdataform: | |title = Create task | ||
|title = | |action = create | ||
|action = | |edit-page = | ||
|edit-page = | |||
|return-page = | |return-page = | ||
|view = | |view = inline | ||
|popup-size = medium | |popup-size = medium | ||
|css-class = | |css-class = | ||
|pagename-formula = | |pagename-formula = Tasks/<assignee>/<id-increment> | ||
|edit-freetext = true | |edit-freetext = true | ||
|edit-categories = false | |edit-categories = false | ||
|edit-content-model = false | |edit-content-model = false | ||
|default-categories = | |default-categories = tasks | ||
|default-content-model = wikitext | |default-content-model = wikitext | ||
|layout-align = top | |layout-align = top | ||
Line 38: | Line 37: | ||
Wikitext to render the form | |||
<pre> | <pre> | ||
{{#visualdataform: | {{#visualdataform: Task | ||
|title = | |title = Create task | ||
|action = | |action = create | ||
|edit-page = | |edit-page = | ||
|return-page = | |return-page = | ||
|view = | |view = inline | ||
|popup-size = medium | |popup-size = medium | ||
|css-class = | |css-class = | ||
|pagename-formula = | |pagename-formula = Tasks/<assignee>/<id-increment> | ||
|edit-freetext = true | |edit-freetext = true | ||
|edit-categories = false | |edit-categories = false | ||
|edit-content-model = false | |edit-content-model = false | ||
|default-categories = | |default-categories = tasks | ||
|default-content-model = wikitext | |default-content-model = wikitext | ||
|layout-align = top | |layout-align = top | ||
Line 64: | Line 63: | ||
</pre> | </pre> | ||
The related schema generated by the schema builder can be found here: [[VisualDataSchema:Task]]. It can be managed here [[Special:ManageSchemas]] | |||
Line 104: | Line 71: | ||
== See also == | == See also == | ||
* [[Test visualdata 2.0]] | |||
* [[Page upload]] | |||
* [[CRUD]] | |||
* [[Test visualdata 2.0 - Result formats|Result formats]] | |||
* [[Test_visualdata_2.0_-_Dependent_values|Dependent values]] | |||
* [[Test_visualdata_2.0_-_Queries|Queries]] |
Revision as of 20:50, 28 January 2024
This form shows the following features:
- default value for assignee field with magic word
{{CURRENTUSER}}
(wikitext and parser functions allowed, useful repositories are the following: Help:Magic words and Extension:MyVariables) - OOUI UserInputWidget for the same field
- status with dropdown with items retrieved by a wikilist on this page Task status list
- OOUI MultilineTextInputWidget for the task field, with autogrow
- subitems for the repository section
- validation pattern for the url field in the repository section (repository -> properties -> url -> settings symbol near the preferred input field -> validate)
- default rows for the MultilineTextInputWidget inside the input config for the comments field
- hidden field id-increment, with value-formula
{{#idprovider-increment:}}
(see Extension:IDProvider) used in pagename formula - pagename formula with value
Tasks/<assignee>/<id-increment>
(this will create a page with the entered metadata or freetext with title likeTasks/User:Admin/1
) - The form gets validated through ajv-validator
form is loading...
Wikitext to render the form
{{#visualdataform: Task |title = Create task |action = create |edit-page = |return-page = |view = inline |popup-size = medium |css-class = |pagename-formula = Tasks/<assignee>/<id-increment> |edit-freetext = true |edit-categories = false |edit-content-model = false |default-categories = tasks |default-content-model = wikitext |layout-align = top |popup-help = true |submit-button-text = |layout = tabs |submit-button-text = |validate-button-text = }}
The related schema generated by the schema builder can be found here: VisualDataSchema:Task. It can be managed here Special:ManageSchemas