From 62e01f7fc83fdd92ca66b347549dee268306b827 Mon Sep 17 00:00:00 2001 From: Dennis Li Date: Thu, 3 Aug 2023 14:58:55 -0700 Subject: [PATCH] Revert "added skills question as checkbox" This reverts commit 48cc614bb43c59f176ecfc9eb1b2964d42b9f4d7. --- src/pages/admin/DynamicForm/FormCreate.js | 3 +- .../DynamicForm/components/CustomQuestion.js | 44 ++++++------------- 2 files changed, 14 insertions(+), 33 deletions(-) diff --git a/src/pages/admin/DynamicForm/FormCreate.js b/src/pages/admin/DynamicForm/FormCreate.js index 5e7cc316..cd48232d 100644 --- a/src/pages/admin/DynamicForm/FormCreate.js +++ b/src/pages/admin/DynamicForm/FormCreate.js @@ -801,8 +801,7 @@ const FormCreate = (props) => { type: Yup.mixed().oneOf(["TEXT", "SELECT", "CHECKBOX", "UPLOAD"]).required(), label: Yup.string().required("Question is a required field"), choices: Yup.string(), - required: Yup.boolean().required(), - isSkillsQuestion: Yup.boolean() + required: Yup.boolean().required() }); const validationSchema = Yup.object({ diff --git a/src/pages/admin/DynamicForm/components/CustomQuestion.js b/src/pages/admin/DynamicForm/components/CustomQuestion.js index a1ac3623..b04f60b2 100644 --- a/src/pages/admin/DynamicForm/components/CustomQuestion.js +++ b/src/pages/admin/DynamicForm/components/CustomQuestion.js @@ -57,7 +57,7 @@ const CustomQuestion = (props) => { } = props; const { - type, label, choices, questionImageUrl, charLimit, required, isSkillsQuestion + type, label, choices, questionImageUrl, charLimit, required } = props.data; const questionStyles = { // -------- QUESTION COMPONENT STYLES ---------- @@ -100,16 +100,11 @@ const CustomQuestion = (props) => { flexDirection: "column", justifyContent: "center" }, - checkboxContainer: { + requiredContainer: { display: "flex", justifyContent: "flex-end", alignItems: "center", color: "rgba(255,255,255,0.8)" - }, - checkboxWrapper: { - display: "flex", - flexDirection: "row", - justifyContent: "flex-end" } }; @@ -245,31 +240,18 @@ const CustomQuestion = (props) => { value={choices} /> )} -
-
- Skills Question? - -
-
+ +
Required? - -
+