corrected subtitle in create/edit

This commit is contained in:
Florian Scholdei
2019-01-23 14:48:29 +01:00
parent 0b4c7148e9
commit 4b24c8db06
3 changed files with 50 additions and 41 deletions

View File

@@ -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">