mirror of
https://github.com/AdguardTeam/AdGuardHome.git
synced 2025-03-14 14:38:29 +03:00
Disable form submit on error
This commit is contained in:
parent
b5e7237169
commit
6e41897323
1 changed files with 3 additions and 3 deletions
|
@ -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…
Add table
Reference in a new issue