mirror of
https://github.com/scm-manager/scm-manager.git
synced 2025-11-08 22:45:45 +01:00
disabled button after successful change for global config
This commit is contained in:
@@ -23,7 +23,8 @@ type State = {
|
|||||||
error: {
|
error: {
|
||||||
loginAttemptLimitTimeout: boolean,
|
loginAttemptLimitTimeout: boolean,
|
||||||
loginAttemptLimit: boolean
|
loginAttemptLimit: boolean
|
||||||
}
|
},
|
||||||
|
valid: boolean
|
||||||
};
|
};
|
||||||
|
|
||||||
class ConfigForm extends React.Component<Props, State> {
|
class ConfigForm extends React.Component<Props, State> {
|
||||||
@@ -59,7 +60,8 @@ class ConfigForm extends React.Component<Props, State> {
|
|||||||
error: {
|
error: {
|
||||||
loginAttemptLimitTimeout: false,
|
loginAttemptLimitTimeout: false,
|
||||||
loginAttemptLimit: false
|
loginAttemptLimit: false
|
||||||
}
|
},
|
||||||
|
valid: false
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -156,7 +158,7 @@ class ConfigForm extends React.Component<Props, State> {
|
|||||||
<SubmitButton
|
<SubmitButton
|
||||||
loading={loading}
|
loading={loading}
|
||||||
label={t("config-form.submit")}
|
label={t("config-form.submit")}
|
||||||
disabled={!configUpdatePermission || this.hasError()}
|
disabled={!configUpdatePermission || this.hasError() || !this.state.valid}
|
||||||
/>
|
/>
|
||||||
</form>
|
</form>
|
||||||
);
|
);
|
||||||
@@ -172,7 +174,8 @@ class ConfigForm extends React.Component<Props, State> {
|
|||||||
error: {
|
error: {
|
||||||
...this.state.error,
|
...this.state.error,
|
||||||
[name]: !isValid
|
[name]: !isValid
|
||||||
}
|
},
|
||||||
|
valid: true
|
||||||
});
|
});
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user