Page upload: Difference between revisions
No edit summary |
No edit summary |
||
Line 33: | Line 33: | ||
|validate-button-text = | |validate-button-text = | ||
}} | }} | ||
This is the code to display the form-button | |||
<pre> | |||
{{#pagepropertiesform: Page upload | |||
|title = Page upload | |||
|action = edit | |||
|edit-page = | |||
|return-page = | |||
|view = popup | |||
|popup-size = medium | |||
|css-class = | |||
|pagename-formula = | |||
|edit-freetext = false | |||
|edit-categories = false | |||
|edit-content-model = false | |||
|default-categories = tasks | |||
|default-content-model = | |||
|layout-align = top | |||
|popup-help = true | |||
|submit-button-text = | |||
|layout = tabs | |||
|submit-button-text = | |||
|validate-button-text = | |||
}} | |||
</pre> |
Revision as of 12:21, 30 October 2023
The following form shows the use of PageProperties as a multiple file uploader fully customizable.
The form below uses the following features:
- wikitext in either title and description of each item and subitem
- subitem files with multiple item and min-item attribute set to 1
- OO.UI.SelectFileWidget for the field "file" with input-config
droppable
andshowDropTarget
. Note that both the attributes must be set in order to enable a doppable area - value formula for the file field
{{PAGEID}}-<value>
in order to upload the file with a filename prefixed with the pageId. This is useful when you don't want to care of uploading files with same filename on the wiki. - list of accepted mime-types editable in the file input config, accessible from the settings icon beside the available inputs drodown (see picture below)
(the caption associated to each file is simply a field beside the file field in the same subitem, other fields could be added as well)
{{#pagepropertiesform: Page upload |title = Page upload |action = edit |edit-page = |return-page = |view = popup |popup-size = medium |css-class = |pagename-formula = |edit-freetext = false |edit-categories = false |edit-content-model = false |default-categories = tasks |default-content-model = |layout-align = top |popup-help = true |submit-button-text = |layout = tabs |submit-button-text = |validate-button-text = }}
This is the code to display the form-button
{{#pagepropertiesform: Page upload |title = Page upload |action = edit |edit-page = |return-page = |view = popup |popup-size = medium |css-class = |pagename-formula = |edit-freetext = false |edit-categories = false |edit-content-model = false |default-categories = tasks |default-content-model = |layout-align = top |popup-help = true |submit-button-text = |layout = tabs |submit-button-text = |validate-button-text = }}
pageproperties
schemas |
| ||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
schemas-data |
|