| @@ -149,32 +149,45 @@ const PublicNoticeApplyForm = ({loadedData}) => { | |||||
| </Grid> | </Grid> | ||||
| <Grid item lg={4}></Grid> | <Grid item lg={4}></Grid> | ||||
| <Grid item lg={4}></Grid> | <Grid item lg={4}></Grid> | ||||
| <Grid item lg={4}> | |||||
| <Grid container alignItems={"center"}> | |||||
| <Grid item lg={4} | |||||
| sx={{ml: 3, mr: 3, display: 'flex', alignItems: 'center'}}> | |||||
| 上傳文件: | |||||
| </Grid> | |||||
| <Grid item lg={4}> | |||||
| {attachment.name} | |||||
| </Grid> | |||||
| <Grid item lg={3}> | |||||
| <input | |||||
| id="uploadFileBtn" | |||||
| name="file" | |||||
| type="file" | |||||
| accept="image/png, image/jpeg" | |||||
| style={{ display: 'none' }} | |||||
| onChange={(event)=> { | |||||
| readFile(event) | |||||
| }} | |||||
| /> | |||||
| <label htmlFor="uploadFileBtn"> | |||||
| <Button | |||||
| component="span" | |||||
| variant="outlined" | |||||
| size="large" | |||||
| >{attachment?"上傳文件":"重新上傳"}</Button> | |||||
| </label> | |||||
| </Grid> | |||||
| </Grid> | |||||
| </Grid> | |||||
| <Grid item lg={4}></Grid> | |||||
| <Grid item lg={4}></Grid> | |||||
| {FieldUtils.getTextArea({ | {FieldUtils.getTextArea({ | ||||
| label:"備註:", | label:"備註:", | ||||
| valueName:"remarks", | valueName:"remarks", | ||||
| form: formik | form: formik | ||||
| })} | })} | ||||
| <Grid item lg={4}></Grid> | <Grid item lg={4}></Grid> | ||||
| <Grid item lg={12}> | |||||
| <center> | |||||
| <input | |||||
| id="uploadFileBtn" | |||||
| name="file" | |||||
| type="file" | |||||
| accept="image/png, image/jpeg" | |||||
| onChange={(event)=> { | |||||
| readFile(event) | |||||
| }} | |||||
| /> | |||||
| {/* <Button | |||||
| variant="contained" | |||||
| size="large" | |||||
| onClick={()=>{ | |||||
| onUploadClick(); | |||||
| }} | |||||
| >上傳文件</Button> */} | |||||
| </center> | |||||
| </Grid> | |||||
| <Grid item lg={12}> | <Grid item lg={12}> | ||||
| <center> | <center> | ||||
| <Button | <Button | ||||