diff options
Diffstat (limited to 'modern/src/EditItemView.js')
-rw-r--r-- | modern/src/EditItemView.js | 17 |
1 files changed, 14 insertions, 3 deletions
diff --git a/modern/src/EditItemView.js b/modern/src/EditItemView.js index e1aea2a9..5ffdd9b5 100644 --- a/modern/src/EditItemView.js +++ b/modern/src/EditItemView.js @@ -23,7 +23,7 @@ const useStyles = makeStyles((theme) => ({ })); const EditItemView = ({ - children, endpoint, item, setItem, + children, endpoint, item, setItem, validate, }) => { const history = useHistory(); const classes = useStyles(); @@ -65,10 +65,21 @@ const EditItemView = ({ {children} <FormControl fullWidth margin="normal"> <div className={classes.buttons}> - <Button type="button" color="primary" variant="outlined" onClick={() => history.goBack()}> + <Button + type="button" + color="primary" + variant="outlined" + onClick={() => history.goBack()} + > {t('sharedCancel')} </Button> - <Button type="button" color="primary" variant="contained" onClick={handleSave}> + <Button + type="button" + color="primary" + variant="contained" + onClick={handleSave} + disabled={!validate()} + > {t('sharedSave')} </Button> </div> |