From b5b8480726936c0aca45b0b7ed2538ba1fd6851d Mon Sep 17 00:00:00 2001 From: alex Date: Sun, 29 Oct 2023 11:57:44 +0100 Subject: [PATCH] added checkbox --- .../Overview/GroupTypeSelectionModal.js | 28 ++++++++++++++++++- 1 file changed, 27 insertions(+), 1 deletion(-) diff --git a/src/Pages/GroupTasks/Overview/GroupTypeSelectionModal.js b/src/Pages/GroupTasks/Overview/GroupTypeSelectionModal.js index 3d1b1e3..0434f3d 100644 --- a/src/Pages/GroupTasks/Overview/GroupTypeSelectionModal.js +++ b/src/Pages/GroupTasks/Overview/GroupTypeSelectionModal.js @@ -1,5 +1,6 @@ import { Button, + Checkbox, Divider, Form, Input, @@ -79,11 +80,19 @@ export default function GroupTypeSelectionModal({ if (userSpecifiedGlobalInputs.length > 0) { for (let i = 0; i < userSpecifiedGlobalInputs.length; i++) { - if (userSpecifiedGlobalInputs[i].type !== "text") { + if (userSpecifiedGlobalInputs[i].type === "select") { foundSelectInputs = foundSelectInputs + 1; continue; } + if (userSpecifiedGlobalInputs[i].type === "checkbox") { + globalInputs.push({ + parameterName: userSpecifiedGlobalInputs[i].id, + value: userSpecifiedGlobalInputs[i].checked.toString(), + }); + continue; + } + if (userSpecifiedGlobalInputs[i].value === "") { canTaskBeStarted = false; break; @@ -442,6 +451,23 @@ function GroupGlobalInputs({ ); break; + case "checkbox": + elements.push( + + + {getLabel(globalInput.displayName)} + + + ); + break; default: notificationApi["error"]({