fix translations

This commit is contained in:
Eduard Heimbuch
2020-10-23 08:47:40 +02:00
parent f73f60aabc
commit e8b07aaae1
6 changed files with 68 additions and 6 deletions

View File

@@ -38,7 +38,6 @@ import styled from "styled-components";
const ExternalDescription = styled.div`
display: flex;
align-items: center;
font-size: 1.25rem;
font-weight: 400;
`;

View File

@@ -179,6 +179,20 @@ class UserForm extends React.Component<Props, State> {
/>
</div>
</div>
{!this.props.user && (
<>
<div className="columns">
<div className="column">
<Checkbox
label={t("user.externalFlag")}
onChange={this.handleExternalChange}
checked={!!user.external}
helpText={t("help.externalFlagHelpText")}
/>
</div>
</div>
</>
)}
{!user.external && (
<>
{!this.props.user && passwordChangeField}
@@ -249,6 +263,15 @@ class UserForm extends React.Component<Props, State> {
}
});
};
handleExternalChange = (external: boolean) => {
this.setState({
user: {
...this.state.user,
external
}
});
};
}
export default withTranslation("users")(UserForm);