Disable form submit on error
This commit is contained in:
parent
b5e7237169
commit
6e41897323
|
@ -48,8 +48,8 @@ const Form = (props) => {
|
|||
const {
|
||||
t,
|
||||
handleSubmit,
|
||||
pristine,
|
||||
submitting,
|
||||
invalid,
|
||||
} = props;
|
||||
|
||||
return (
|
||||
|
@ -125,7 +125,7 @@ const Form = (props) => {
|
|||
<button
|
||||
type="submit"
|
||||
className="btn btn-success btn-standard"
|
||||
disabled={pristine || submitting}
|
||||
disabled={submitting || invalid}
|
||||
>
|
||||
{t('save_config')}
|
||||
</button>
|
||||
|
@ -135,8 +135,8 @@ const Form = (props) => {
|
|||
|
||||
Form.propTypes = {
|
||||
handleSubmit: PropTypes.func,
|
||||
pristine: PropTypes.bool,
|
||||
submitting: PropTypes.bool,
|
||||
invalid: PropTypes.bool,
|
||||
interfaces: PropTypes.object,
|
||||
processing: PropTypes.bool,
|
||||
initialValues: PropTypes.object,
|
||||
|
|
Loading…
Reference in New Issue