mirror of
https://github.com/scm-manager/scm-manager.git
synced 2025-11-05 04:55:50 +01:00
corrected subtitle in create/edit
This commit is contained in:
@@ -72,12 +72,13 @@ class GroupForm extends React.Component<Props, State> {
|
||||
};
|
||||
|
||||
render() {
|
||||
const { t, loading } = this.props;
|
||||
const { loading, t } = this.props;
|
||||
const { group } = this.state;
|
||||
let firstField = null;
|
||||
let nameField = null;
|
||||
let subtitle = null;
|
||||
if (!this.props.group) {
|
||||
// create new group
|
||||
firstField = (
|
||||
nameField = (
|
||||
<InputField
|
||||
label={t("group.name")}
|
||||
errorMessage={t("groupForm.nameError")}
|
||||
@@ -89,12 +90,14 @@ class GroupForm extends React.Component<Props, State> {
|
||||
);
|
||||
} else {
|
||||
// edit existing group
|
||||
firstField = <Subtitle subtitle={t("groupForm.subtitle")} />;
|
||||
subtitle = <Subtitle subtitle={t("groupForm.subtitle")} />;
|
||||
}
|
||||
|
||||
return (
|
||||
<>
|
||||
{subtitle}
|
||||
<form onSubmit={this.submit}>
|
||||
{firstField}
|
||||
{nameField}
|
||||
<Textarea
|
||||
label={t("group.description")}
|
||||
errorMessage={t("groupForm.descriptionError")}
|
||||
@@ -129,6 +132,7 @@ class GroupForm extends React.Component<Props, State> {
|
||||
loading={loading}
|
||||
/>
|
||||
</form>
|
||||
</>
|
||||
);
|
||||
}
|
||||
|
||||
|
||||
@@ -88,7 +88,9 @@ class UserForm extends React.Component<Props, State> {
|
||||
|
||||
let nameField = null;
|
||||
let passwordChangeField = null;
|
||||
let subtitle = null;
|
||||
if (!this.props.user) {
|
||||
// create new user
|
||||
nameField = (
|
||||
<InputField
|
||||
label={t("user.name")}
|
||||
@@ -103,10 +105,13 @@ class UserForm extends React.Component<Props, State> {
|
||||
passwordChangeField = (
|
||||
<PasswordConfirmation passwordChanged={this.handlePasswordChange} />
|
||||
);
|
||||
} else {
|
||||
// edit existing user
|
||||
subtitle = <Subtitle subtitle={t("userForm.subtitle")} />;
|
||||
}
|
||||
return (
|
||||
<>
|
||||
<Subtitle subtitle={t("userForm.subtitle")} />
|
||||
{subtitle}
|
||||
<form onSubmit={this.submit}>
|
||||
<div className="columns">
|
||||
<div className="column is-half">
|
||||
|
||||
@@ -92,7 +92,7 @@ class SingleUser extends React.Component<Props> {
|
||||
component={() => <SetUserPassword user={user} />}
|
||||
/>
|
||||
<Route
|
||||
path={`${url}/permissions`}
|
||||
path={`${url}/settings/permissions`}
|
||||
component={() => (
|
||||
<SetPermissions
|
||||
selectedPermissionsLink={user._links.permissions}
|
||||
|
||||
Reference in New Issue
Block a user