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
Hide 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) => {
type
=
"checkbox"
value
=
{
choice
.
text
}
onChange
=
{
handleChange
}
required
=
{
element
.
isRequired
}
/>
<
label
className
=
"text-lg"
>
{
choice
.
text
}
</
label
>
</
div
>
...
...
frontend/src/commons/ADropdown.tsx
View file @
463ce408
...
...
@@ -25,6 +25,7 @@ export const ADropdownForm = ({ element, handleAnswer, response }: Props) => {
<
select
className
=
"py-2 hover:bg-themeColor bg-gray-200 rounded"
onChange
=
{
handleChange
}
required
=
{
element
.
isRequired
}
>
{
element
.
content
.
choices
.
map
((
choice
)
=>
(
<
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) => {
id
=
{
element
.
_id
}
onChange
=
{
handleChange
}
value
=
{
answer
}
required
=
{
element
.
isRequired
}
></
input
>
</
div
>
);
...
...
frontend/src/commons/AFileForm.tsx
View file @
463ce408
...
...
@@ -33,6 +33,7 @@ export const AFileForm = ({
name
=
"file"
className
=
" w-11/12 h-16"
onChange
=
{
handleChange
}
required
=
{
element
.
isRequired
}
></
input
>
</
div
>
);
...
...
frontend/src/commons/ARadioForm.tsx
View file @
463ce408
...
...
@@ -31,6 +31,7 @@ export const ARadioForm = ({ element, response, handleAnswer }: Props) => {
name
=
{
element
.
_id
}
onChange
=
{
handleChange
}
value
=
{
choice
.
text
}
required
=
{
element
.
isRequired
}
></
input
>
<
label
className
=
"text-lg"
id
=
{
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