From 69e3dc7c7e6e9d91fa55b547ded9545b0b7120f0 Mon Sep 17 00:00:00 2001 From: paritshivani Date: Thu, 3 Oct 2024 14:26:34 +0530 Subject: [PATCH 1/3] learnathon content form --- .../src/pages/learnathon/lernCreatorForm.js | 414 ++++++++++-------- 1 file changed, 243 insertions(+), 171 deletions(-) diff --git a/packages/nulp_elite/src/pages/learnathon/lernCreatorForm.js b/packages/nulp_elite/src/pages/learnathon/lernCreatorForm.js index d4e0e581..ebc17224 100644 --- a/packages/nulp_elite/src/pages/learnathon/lernCreatorForm.js +++ b/packages/nulp_elite/src/pages/learnathon/lernCreatorForm.js @@ -1,4 +1,4 @@ -import React, { useState } from "react"; +import React, { useState, useEffect } from "react"; import { TextField, Button, @@ -9,8 +9,16 @@ import { IconButton, Typography, Box, + Grid, + Paper, + Divider, } from "@mui/material"; import HelpOutlineIcon from "@mui/icons-material/HelpOutline"; +import Footer from "components/Footer"; +import Header from "components/header"; +// const [globalSearchQuery, setGlobalSearchQuery] = useState(); +// // location.state?.globalSearchQuery || undefined +// const [searchQuery, setSearchQuery] = useState(globalSearchQuery || ""); const categories = [ "State / UT / SPVs / ULBs / Any Other", @@ -37,11 +45,11 @@ const LernCreatorForm = () => { userName: "", email: "", mobileNumber: "", + submissionIcon: "", category: "", organisation: "", department: "", theme: "", - otherTheme: "", title: "", description: "", file: null, @@ -64,6 +72,12 @@ const LernCreatorForm = () => { file: e.target.files[0], }); }; + const handleIconChange = (e) => { + setFormData({ + ...formData, + submissionIcon: e.target.files[0], + }); + }; const handleCheckboxChange = (e) => { setFormData({ @@ -104,192 +118,250 @@ const LernCreatorForm = () => { }; return ( - - - Lern Creator Form - + <> +
+ + + + Upload Learnathon Submission + -
- + + + - + + Participant Details + + - + + + + - - {categories.map((option) => ( - - {option} - - ))} - + + + - {guidelineLink && ( - - Link to Guidelines - - )} + + + + - + + Submission Details + + + +
+ + + + + + +
+
- + + + + {categories.map((option) => ( + + {option} + + ))} + + {guidelineLink && ( + + View and Download Guidelines + + )} + - - {themes.map((theme) => ( - - {theme} - - ))} - + + + - {formData.theme === "Others" && ( - - )} + + + - + + + {themes.map((theme) => ( + + {theme} + + ))} + + - + + + -
- - - - - - -
+ + + - - } - label="I accept the terms and conditions" - /> + +
+ + + + + + +
+
+
- - + + } + label="I accept the terms and conditions" + /> - - - + Your submission will be used for NULP purposes only and your + personal details will not be disclosed to any entity. + - - - -
+ + + + + + +
+