map nonFastForwardDisallowed field from GitConfig and added ui

This commit is contained in:
Sebastian Sdorra
2019-01-29 10:26:11 +01:00
parent b231499cd0
commit c42028433f
4 changed files with 16 additions and 3 deletions

View File

@@ -8,6 +8,7 @@ import { InputField, Checkbox } from "@scm-manager/ui-components";
type Configuration = {
repositoryDirectory?: string,
gcExpression?: string,
nonFastForwardDisallowed: boolean,
disabled: boolean,
_links: Links
}
@@ -41,7 +42,7 @@ class GitConfigurationForm extends React.Component<Props, State> {
};
render() {
const { gcExpression, disabled } = this.state;
const { gcExpression, nonFastForwardDisallowed, disabled } = this.state;
const { readOnly, t } = this.props;
return (
@@ -53,6 +54,13 @@ class GitConfigurationForm extends React.Component<Props, State> {
onChange={this.handleChange}
disabled={readOnly}
/>
<Checkbox name="nonFastForwardDisallowed"
label={t("scm-git-plugin.config.nonFastForwardDisallowed")}
helpText={t("scm-git-plugin.config.nonFastForwardDisallowedHelpText")}
checked={nonFastForwardDisallowed}
onChange={this.handleChange}
disabled={readOnly}
/>
<Checkbox name="disabled"
label={t("scm-git-plugin.config.disabled")}
helpText={t("scm-git-plugin.config.disabledHelpText")}