added configuration option for login info url

This commit is contained in:
Sebastian Sdorra
2019-08-13 09:45:37 +02:00
parent 2120a4ee02
commit 3823c033b9
14 changed files with 111 additions and 14 deletions

View File

@@ -7,6 +7,7 @@ import NamespaceStrategySelect from "./NamespaceStrategySelect";
type Props = {
realmDescription: string,
loginInfoUrl: string,
enableRepositoryArchive: boolean,
disableGroupingGrid: boolean,
dateFormat: string,
@@ -27,6 +28,7 @@ class GeneralSettings extends React.Component<Props> {
const {
t,
realmDescription,
loginInfoUrl,
enabledXsrfProtection,
namespaceStrategy,
hasUpdatePermission,
@@ -57,6 +59,15 @@ class GeneralSettings extends React.Component<Props> {
</div>
</div>
<div className="columns">
<div className="column is-half">
<InputField
label={t("general-settings.login-info-url")}
onChange={this.handleLoginInfoUrlChange}
value={loginInfoUrl}
disabled={!hasUpdatePermission}
helpText={t("help.loginInfoUrlHelpText")}
/>
</div>
<div className="column is-half">
<Checkbox
checked={enabledXsrfProtection}
@@ -71,6 +82,10 @@ class GeneralSettings extends React.Component<Props> {
);
}
handleLoginInfoUrlChange = (value: string) => {
this.props.onChange(true, value, "loginInfoUrl");
};
handleRealmDescriptionChange = (value: string) => {
this.props.onChange(true, value, "realmDescription");
};