Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
216 changes: 216 additions & 0 deletions docs/creating-manifest/visual-settings.md
Original file line number Diff line number Diff line change
Expand Up @@ -2918,6 +2918,222 @@ Here, the *main settings* form appears during installation process.

![settingCustom](/img/SettingsCustom.jpg)

## Custom Buttons and Custom Settings

When creating the add-on, you can use specific options that allow to create custom buttons of different ***submitTypes*** in combination with custom settings. These options are:

* `submitType` [string] - determines behavior of submit button. Default value: `apply`. Possible values:
* `none` - submit button is hidden
* `apply` - default green button for installation or configuration
* `support` - blue button to open hoster's configured support window (initial dialog stays open)
* `upgrade` - blue button Upgrade to Paid Account (initial dialog must be closed)
* `submitUnchanged` [boolean] - ability to submit unchanged values in configuration dialog. Default value: `false`

For example:

@@@
```yaml
type: update
name: JE-59620 [CS:Visual Settings] - different submit button types

targetNodes: any

settings:

default:
fields:
- type: text
caption: default
name: default
required: true

none:
submitType: none
fields:
- type: text
caption: None
name: config1
required: true

apply:
submitType: apply
fields:
- type: text
caption: Apply
name: config2
required: true

support:
submitType: support
fields:
- type: text
caption: Support
name: config4
required: true

upgrade:
submitType: upgrade
fields:
- type: text
caption: Upgrade
name: config4
required: true

submitUnchanged:
submitType: apply
submitUnchanged: true
fields:
- type: text
caption: Apply
name: config3
required: true

buttons:
- caption: Test Submit Buttons
menu:
- caption: Default
settings: default

- caption: None
settings: none

- caption: Apply
settings: apply
action: test

- caption: Support
settings: support

- caption: Upgrade
settings: upgrade

- caption: Submit Unchanged
settings: submitUnchanged
action: test

actions:
test:
log: ${settings}
```
```json
{
"type": "update",
"name": "JE-59620 [CS:Visual Settings] - different submit button types",
"targetNodes": "any",
"settings": {
"default": {
"fields": [
{
"type": "text",
"caption": "default",
"name": "default",
"required": true
}
]
},
"none": {
"submitType": "none",
"fields": [
{
"type": "text",
"caption": "None",
"name": "config1",
"required": true
}
]
},
"apply": {
"submitType": "apply",
"fields": [
{
"type": "text",
"caption": "Apply",
"name": "config2",
"required": true
}
]
},
"support": {
"submitType": "support",
"fields": [
{
"type": "text",
"caption": "Support",
"name": "config4",
"required": true
}
]
},
"upgrade": {
"submitType": "upgrade",
"fields": [
{
"type": "text",
"caption": "Upgrade",
"name": "config4",
"required": true
}
]
},
"submitUnchanged": {
"submitType": "apply",
"submitUnchanged": true,
"fields": [
{
"type": "text",
"caption": "Apply",
"name": "config3",
"required": true
}
]
}
},
"buttons": [
{
"caption": "Test Submit Buttons",
"menu": [
{
"caption": "Default",
"settings": "default"
},
{
"caption": "None",
"settings": "none"
},
{
"caption": "Apply",
"settings": "apply",
"action": "test"
},
{
"caption": "Support",
"settings": "support"
},
{
"caption": "Upgrade",
"settings": "upgrade"
},
{
"caption": "Submit Unchanged",
"settings": "submitUnchanged",
"action": "test"
}
]
}
],
"actions": {
"test": {
"log": "${settings}"
}
}
}
```
@@!

![settingCustom](/img/submit-types.png)

Each button invokes the corresponding form according to the options shown above.

## Success Text Customization

It is possible to customize the *success* text that is displayed upon successful installation either at the Dashboard, or via email notification.
Expand Down
Binary file added theme/readthedocs/img/submit-types.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.