added checkbox
parent
20afb9d415
commit
b5b8480726
|
@ -1,5 +1,6 @@
|
||||||
import {
|
import {
|
||||||
Button,
|
Button,
|
||||||
|
Checkbox,
|
||||||
Divider,
|
Divider,
|
||||||
Form,
|
Form,
|
||||||
Input,
|
Input,
|
||||||
|
@ -79,11 +80,19 @@ export default function GroupTypeSelectionModal({
|
||||||
|
|
||||||
if (userSpecifiedGlobalInputs.length > 0) {
|
if (userSpecifiedGlobalInputs.length > 0) {
|
||||||
for (let i = 0; i < userSpecifiedGlobalInputs.length; i++) {
|
for (let i = 0; i < userSpecifiedGlobalInputs.length; i++) {
|
||||||
if (userSpecifiedGlobalInputs[i].type !== "text") {
|
if (userSpecifiedGlobalInputs[i].type === "select") {
|
||||||
foundSelectInputs = foundSelectInputs + 1;
|
foundSelectInputs = foundSelectInputs + 1;
|
||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (userSpecifiedGlobalInputs[i].type === "checkbox") {
|
||||||
|
globalInputs.push({
|
||||||
|
parameterName: userSpecifiedGlobalInputs[i].id,
|
||||||
|
value: userSpecifiedGlobalInputs[i].checked.toString(),
|
||||||
|
});
|
||||||
|
continue;
|
||||||
|
}
|
||||||
|
|
||||||
if (userSpecifiedGlobalInputs[i].value === "") {
|
if (userSpecifiedGlobalInputs[i].value === "") {
|
||||||
canTaskBeStarted = false;
|
canTaskBeStarted = false;
|
||||||
break;
|
break;
|
||||||
|
@ -442,6 +451,23 @@ function GroupGlobalInputs({
|
||||||
</Form.Item>
|
</Form.Item>
|
||||||
);
|
);
|
||||||
break;
|
break;
|
||||||
|
case "checkbox":
|
||||||
|
elements.push(
|
||||||
|
<Form.Item key={index} required>
|
||||||
|
<Checkbox
|
||||||
|
id={globalInput.parameterName}
|
||||||
|
defaultChecked={
|
||||||
|
globalInput.options !== null &&
|
||||||
|
globalInput.options.default !== null
|
||||||
|
? globalInput.options.default
|
||||||
|
: false
|
||||||
|
}
|
||||||
|
>
|
||||||
|
{getLabel(globalInput.displayName)}
|
||||||
|
</Checkbox>
|
||||||
|
</Form.Item>
|
||||||
|
);
|
||||||
|
break;
|
||||||
|
|
||||||
default:
|
default:
|
||||||
notificationApi["error"]({
|
notificationApi["error"]({
|
||||||
|
|
Loading…
Reference in New Issue