Move Button to right side (and remove doubled note)

This commit is contained in:
Florian Scholdei
2019-11-20 16:14:50 +01:00
parent d962265d8d
commit a04e05bf9b
27 changed files with 69 additions and 104 deletions

View File

@@ -1,7 +1,7 @@
import React from "react";
import { WithTranslation, withTranslation } from "react-i18next";
import { User } from "@scm-manager/ui-types";
import { SubmitButton, Notification, ErrorNotification, PasswordConfirmation } from "@scm-manager/ui-components";
import { Level, SubmitButton, Notification, ErrorNotification, PasswordConfirmation } from "@scm-manager/ui-components";
import { setPassword } from "./setPassword";
type Props = WithTranslation & {
@@ -98,15 +98,15 @@ class SetUserPassword extends React.Component<Props, State> {
passwordChanged={this.passwordChanged}
key={this.state.passwordChanged ? "changed" : "unchanged"}
/>
<div className="columns">
<div className="column">
<Level
right={
<SubmitButton
disabled={!this.state.passwordValid}
loading={loading}
label={t("singleUserPassword.button")}
/>
</div>
</div>
}
/>
</form>
);
}

View File

@@ -6,6 +6,7 @@ import {
Checkbox,
InputField,
PasswordConfirmation,
Level,
SubmitButton,
validation as validator
} from "@scm-manager/ui-components";
@@ -166,11 +167,7 @@ class UserForm extends React.Component<Props, State> {
/>
</div>
</div>
<div className="columns">
<div className="column">
<SubmitButton disabled={!this.isValid()} loading={loading} label={t("userForm.button")} />
</div>
</div>
<Level right={<SubmitButton disabled={!this.isValid()} loading={loading} label={t("userForm.button")} />} />
</form>
</>
);

View File

@@ -4,7 +4,7 @@ import { withRouter } from "react-router-dom";
import { WithTranslation, withTranslation } from "react-i18next";
import { History } from "history";
import { User } from "@scm-manager/ui-types";
import { Subtitle, DeleteButton, confirmAlert, ErrorNotification } from "@scm-manager/ui-components";
import { Level, DeleteButton, confirmAlert, ErrorNotification } from "@scm-manager/ui-components";
import { deleteUser, getDeleteUserFailure, isDeleteUserPending } from "../modules/users";
type Props = WithTranslation & {
@@ -64,13 +64,9 @@ class DeleteUser extends React.Component<Props> {
return (
<>
<Subtitle subtitle={t("deleteUser.subtitle")} />
<hr />
<ErrorNotification error={error} />
<div className="columns">
<div className="column">
<DeleteButton label={t("deleteUser.button")} action={action} loading={loading} />
</div>
</div>
<Level right={<DeleteButton label={t("deleteUser.button")} action={action} loading={loading} />} />
</>
);
}

View File

@@ -41,7 +41,6 @@ class EditUser extends React.Component<Props> {
<div>
<ErrorNotification error={error} />
<UserForm submitForm={user => this.modifyUser(user)} user={user} loading={loading} />
<hr />
<DeleteUser user={user} />
</div>
);