mirror of
https://github.com/scm-manager/scm-manager.git
synced 2025-11-10 15:35:49 +01:00
Revert create forms
This commit is contained in:
@@ -9,7 +9,6 @@ import {
|
||||
InputField,
|
||||
SubmitButton,
|
||||
Textarea,
|
||||
Icon,
|
||||
Checkbox
|
||||
} from "@scm-manager/ui-components";
|
||||
import type { Group, SelectValue } from "@scm-manager/ui-types";
|
||||
@@ -114,16 +113,9 @@ class GroupForm extends React.Component<Props, State> {
|
||||
if (this.isExistingGroup()) {
|
||||
return null;
|
||||
}
|
||||
|
||||
const label = group && group.external ? (
|
||||
<>{t("group.external")} <Icon title={t("group.external")} name="sign-out-alt fa-rotate-270" /></>
|
||||
) : (
|
||||
<>{t("group.internal")} <Icon title={t("group.internal")} name="sign-in-alt fa-rotate-90" /></>
|
||||
);
|
||||
|
||||
return (
|
||||
<Checkbox
|
||||
label={label}
|
||||
label={t("group.external")}
|
||||
checked={group.external}
|
||||
helpText={t("groupForm.help.externalHelpText")}
|
||||
onChange={this.handleExternalChange}
|
||||
@@ -131,7 +123,7 @@ class GroupForm extends React.Component<Props, State> {
|
||||
);
|
||||
};
|
||||
|
||||
isExistingGroup = () => !! this.props.group;
|
||||
isExistingGroup = () => !!this.props.group;
|
||||
|
||||
render() {
|
||||
const { loading, t } = this.props;
|
||||
|
||||
@@ -5,7 +5,6 @@ import type { User } from "@scm-manager/ui-types";
|
||||
import {
|
||||
Subtitle,
|
||||
Checkbox,
|
||||
Icon,
|
||||
InputField,
|
||||
PasswordConfirmation,
|
||||
SubmitButton,
|
||||
@@ -17,8 +16,6 @@ type Props = {
|
||||
submitForm: User => void,
|
||||
user?: User,
|
||||
loading?: boolean,
|
||||
|
||||
// context props
|
||||
t: string => string
|
||||
};
|
||||
|
||||
@@ -83,7 +80,6 @@ class UserForm extends React.Component<Props, State> {
|
||||
return (
|
||||
this.props.user.displayName === user.displayName &&
|
||||
this.props.user.mail === user.mail &&
|
||||
this.props.user.admin === user.admin &&
|
||||
this.props.user.active === user.active
|
||||
);
|
||||
} else {
|
||||
@@ -139,19 +135,6 @@ class UserForm extends React.Component<Props, State> {
|
||||
// edit existing user
|
||||
subtitle = <Subtitle subtitle={t("userForm.subtitle")} />;
|
||||
}
|
||||
|
||||
const label =
|
||||
user && user.active ? (
|
||||
<>
|
||||
{t("user.active")} <Icon title={t("user.active")} name="user" />
|
||||
</>
|
||||
) : (
|
||||
<>
|
||||
{t("user.inactive")}{" "}
|
||||
<Icon title={t("user.inactive")} name="user-slash" />
|
||||
</>
|
||||
);
|
||||
|
||||
return (
|
||||
<>
|
||||
{subtitle}
|
||||
@@ -183,7 +166,7 @@ class UserForm extends React.Component<Props, State> {
|
||||
<div className="column">
|
||||
{passwordChangeField}
|
||||
<Checkbox
|
||||
label={label}
|
||||
label={t("user.active")}
|
||||
onChange={this.handleActiveChange}
|
||||
checked={user ? user.active : false}
|
||||
helpText={t("help.activeHelpText")}
|
||||
|
||||
Reference in New Issue
Block a user