Skip to content
GitLab
Menu
Projects
Groups
Snippets
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Menu
Open sidebar
students
survey
Commits
463ce408
Commit
463ce408
authored
Jul 21, 2022
by
Jiwon Yoon
Browse files
isRequired
parent
374b9208
Changes
5
Show whitespace changes
Inline
Side-by-side
frontend/src/commons/ACheckbox.tsx
View file @
463ce408
...
@@ -29,6 +29,7 @@ export const ACheckboxForm = ({ element, response, handleAnswer }: Props) => {
...
@@ -29,6 +29,7 @@ export const ACheckboxForm = ({ element, response, handleAnswer }: Props) => {
type
=
"checkbox"
type
=
"checkbox"
value
=
{
choice
.
text
}
value
=
{
choice
.
text
}
onChange
=
{
handleChange
}
onChange
=
{
handleChange
}
required
=
{
element
.
isRequired
}
/>
/>
<
label
className
=
"text-lg"
>
{
choice
.
text
}
</
label
>
<
label
className
=
"text-lg"
>
{
choice
.
text
}
</
label
>
</
div
>
</
div
>
...
...
frontend/src/commons/ADropdown.tsx
View file @
463ce408
...
@@ -25,6 +25,7 @@ export const ADropdownForm = ({ element, handleAnswer, response }: Props) => {
...
@@ -25,6 +25,7 @@ export const ADropdownForm = ({ element, handleAnswer, response }: Props) => {
<
select
<
select
className
=
"py-2 hover:bg-themeColor bg-gray-200 rounded"
className
=
"py-2 hover:bg-themeColor bg-gray-200 rounded"
onChange
=
{
handleChange
}
onChange
=
{
handleChange
}
required
=
{
element
.
isRequired
}
>
>
{
element
.
content
.
choices
.
map
((
choice
)
=>
(
{
element
.
content
.
choices
.
map
((
choice
)
=>
(
<
option
value
=
{
choice
.
text
}
>
{
choice
.
text
}
</
option
>
<
option
value
=
{
choice
.
text
}
>
{
choice
.
text
}
</
option
>
...
...
frontend/src/commons/AEssayForm.tsx
View file @
463ce408
...
@@ -28,6 +28,7 @@ export const AEssayForm = ({ element, handleAnswer, response }: Props) => {
...
@@ -28,6 +28,7 @@ export const AEssayForm = ({ element, handleAnswer, response }: Props) => {
id
=
{
element
.
_id
}
id
=
{
element
.
_id
}
onChange
=
{
handleChange
}
onChange
=
{
handleChange
}
value
=
{
answer
}
value
=
{
answer
}
required
=
{
element
.
isRequired
}
></
input
>
></
input
>
</
div
>
</
div
>
);
);
...
...
frontend/src/commons/AFileForm.tsx
View file @
463ce408
...
@@ -33,6 +33,7 @@ export const AFileForm = ({
...
@@ -33,6 +33,7 @@ export const AFileForm = ({
name
=
"file"
name
=
"file"
className
=
" w-11/12 h-16"
className
=
" w-11/12 h-16"
onChange
=
{
handleChange
}
onChange
=
{
handleChange
}
required
=
{
element
.
isRequired
}
></
input
>
></
input
>
</
div
>
</
div
>
);
);
...
...
frontend/src/commons/ARadioForm.tsx
View file @
463ce408
...
@@ -31,6 +31,7 @@ export const ARadioForm = ({ element, response, handleAnswer }: Props) => {
...
@@ -31,6 +31,7 @@ export const ARadioForm = ({ element, response, handleAnswer }: Props) => {
name
=
{
element
.
_id
}
name
=
{
element
.
_id
}
onChange
=
{
handleChange
}
onChange
=
{
handleChange
}
value
=
{
choice
.
text
}
value
=
{
choice
.
text
}
required
=
{
element
.
isRequired
}
></
input
>
></
input
>
<
label
className
=
"text-lg"
id
=
{
choice
.
text
}
>
<
label
className
=
"text-lg"
id
=
{
choice
.
text
}
>
{
choice
.
text
}
{
choice
.
text
}
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment