Skip to content

Commit

Permalink
Merge pull request #4 from polito-WA1-AW1-2021/with_router
Browse files Browse the repository at this point in the history
fix a typo in controlId
  • Loading branch information
luigidr authored Apr 30, 2021
2 parents 8470d10 + 0d62e0e commit c680367
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions src/ExamComponents.js
Original file line number Diff line number Diff line change
Expand Up @@ -97,18 +97,18 @@ function ExamForm(props) {
<> {submitted ? <Redirect to="/"/> :
<Form>
{errorMessage ? <Alert variant='danger'>{errorMessage}</Alert> : ''}
<Form.Group controlID='selectedCourse'>
<Form.Group controlId='selectedCourse'>
<Form.Label>Course</Form.Label>
<Form.Control as="select" value={course} onChange={ev => setCourse(ev.target.value)} disabled={location.state}>
<option disabled hidden value=''>choose...</option>
{props.courses.map(course => <option key={course.coursecode} value={course.coursecode} >{course.name} </option>)}
</Form.Control>
</Form.Group>
<Form.Group controlID='selectedScore'>
<Form.Group controlId='selectedScore'>
<Form.Label>Score</Form.Label>
<Form.Control type='number' min={18} max={31} value={score} onChange={ev => setScore(ev.target.value)} />
</Form.Group>
<Form.Group controlID='selectedDate'>
<Form.Group controlId='selectedDate'>
<Form.Label>Date</Form.Label>
<Form.Control type='date' value={date} onChange={ev => setDate(ev.target.value)} />
</Form.Group>
Expand Down

0 comments on commit c680367

Please sign in to comment.