Add a Radio Button¶
With radio buttons, the user can select one option out of several options. For example, a radio button can be used for select between b/w, color or grayscale output.
For general information about how to customize the PLOSSYS 4 panel, refer to Customize the Panel
This is how you add an radio button to the panel:
-
Unless done, prepare customized panel configuration files
panel-<customer_name>.json
andsettings-<customer_name>.json
. For more information, refer to Customize the Panel. -
In both customized panel configuration files, add the radio button into the
properties
list and specify the attributes of the radio button, for example, the values among which the user can choose:Example - radio button providing different color modes for the output
{ ... "properties": { ... "Color": { "type": "string", "fillBy": "Capabilities/ColorDefault", "default": "bw", "description": { "de": "Farbe", "en": "Color" }, "widget": "toggle", "oneOf": [ { "enum": [ "bw" ], "description": { "de": "S/W", "en": "B/W" } }, { "enum": [ "gray" ], "description": { "de": "Graustufen", "en": "Grayscale" } }, { "enum": [ "color" ], "description": { "de": "Farbe", "en": "Color" } } ], "visibleIf": { "Capabilities/Color": [ true ] } } ... } ... }
-
In both customized panel configuration files, add the radio button to the
fieldsets
at the place where you want to have it in the panel:Example
{ ... "fieldsets": { ... "fields": { ... "Color", ... }, ... } ... }
-
Restart the following services:
-
seal-operator-p4
-
seal-operator-server
-