Skip to content

Commit 6f386ca

Browse files
committed
Fix save button in Edit view - add id to form and form attribute to button. Edit view form now completed refactored away from table.
1 parent 0f01715 commit 6f386ca

File tree

2 files changed

+12
-12
lines changed

2 files changed

+12
-12
lines changed

src/components/iep/Iep.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -43,7 +43,7 @@ const Iep = ({ iep_id }: IepProps) => {
4343
}
4444

4545
return (
46-
<Stack>
46+
<Stack sx={{ width: 1 }}>
4747
<Container>
4848
<Box className={$Iep.goalBox}>
4949
<p className={$Iep.goalTab}>Goals &#40;{goals?.length ?? 0}&#41;</p>

src/pages/students/[student_id].tsx

Lines changed: 11 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -123,12 +123,12 @@ const ViewStudentPage = () => {
123123
return (
124124
<Stack
125125
spacing={2}
126-
// sx={{
127-
// display: "flex",
128-
// flexDirection: "column",
129-
// alignItems: "center",
130-
// width: "100vu",
131-
// }}
126+
sx={{
127+
display: "flex",
128+
flexDirection: "column",
129+
alignItems: "center",
130+
width: "100%",
131+
}}
132132
>
133133
<Container
134134
className={$StudentPage.studentInfoContainer}
@@ -176,7 +176,7 @@ const ViewStudentPage = () => {
176176
>
177177
Cancel
178178
</Button>
179-
{/* <Button
179+
<Button
180180
className={`${$button.default} ${$home.bold}`}
181181
sx={[
182182
{
@@ -191,11 +191,11 @@ const ViewStudentPage = () => {
191191
buttonSX,
192192
]}
193193
type="submit"
194-
onClick={handleEditStudent}
194+
form="edit"
195195
variant="contained"
196196
>
197197
Save
198-
</Button> */}
198+
</Button>
199199
</Box>
200200
)}
201201
</Box>
@@ -223,7 +223,7 @@ const ViewStudentPage = () => {
223223

224224
{viewState === VIEW_STATES.EDIT ? (
225225
<Stack gap={0.5} sx={{ justifyContent: "center" }}>
226-
<form onSubmit={handleEditStudent}>
226+
<form id="edit" onSubmit={handleEditStudent}>
227227
<Stack gap={0.5}>
228228
<Container
229229
className={$StudentPage.studentEditContainer}
@@ -294,7 +294,7 @@ const ViewStudentPage = () => {
294294
/>
295295
</Container>
296296
</Stack>
297-
<button type="submit">Submit</button>
297+
{/* <button type="submit">Submit</button> */}
298298
</form>
299299

300300
<Container sx={{ marginTop: "2rem" }}>

0 commit comments

Comments
 (0)