mirror of
https://github.com/scm-manager/scm-manager.git
synced 2025-11-11 07:55:47 +01:00
Move Button to right side (and remove doubled note)
This commit is contained in:
@@ -2,7 +2,7 @@ import React from "react";
|
||||
import { WithTranslation, withTranslation } from "react-i18next";
|
||||
import { ExtensionPoint } from "@scm-manager/ui-extensions";
|
||||
import { Repository, RepositoryType } from "@scm-manager/ui-types";
|
||||
import { Subtitle, InputField, Select, SubmitButton, Textarea } from "@scm-manager/ui-components";
|
||||
import { Subtitle, InputField, Select, Textarea, Level, SubmitButton } from "@scm-manager/ui-components";
|
||||
import * as validator from "./repositoryValidation";
|
||||
|
||||
type Props = WithTranslation & {
|
||||
@@ -54,7 +54,6 @@ class RepositoryForm extends React.Component<Props, State> {
|
||||
|
||||
isFalsy(value) {
|
||||
return !value;
|
||||
|
||||
}
|
||||
|
||||
isValid = () => {
|
||||
@@ -91,7 +90,7 @@ class RepositoryForm extends React.Component<Props, State> {
|
||||
const disabled = !this.isModifiable() && !this.isCreateMode();
|
||||
|
||||
const submitButton = disabled ? null : (
|
||||
<SubmitButton disabled={!this.isValid()} loading={loading} label={t("repositoryForm.submit")} />
|
||||
<Level right={<SubmitButton disabled={!this.isValid()} loading={loading} label={t("repositoryForm.submit")} />} />
|
||||
);
|
||||
|
||||
let subtitle = null;
|
||||
|
||||
@@ -4,7 +4,7 @@ import { withRouter } from "react-router-dom";
|
||||
import { WithTranslation, withTranslation } from "react-i18next";
|
||||
import { History } from "history";
|
||||
import { Repository } 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 { deleteRepo, getDeleteRepoFailure, isDeleteRepoPending } from "../modules/repos";
|
||||
|
||||
type Props = WithTranslation & {
|
||||
@@ -65,13 +65,8 @@ class DeleteRepo extends React.Component<Props> {
|
||||
return (
|
||||
<>
|
||||
<hr />
|
||||
<Subtitle subtitle={t("deleteRepo.subtitle")} />
|
||||
<ErrorNotification error={error} />
|
||||
<div className="columns">
|
||||
<div className="column">
|
||||
<DeleteButton label={t("deleteRepo.button")} action={action} loading={loading} />
|
||||
</div>
|
||||
</div>
|
||||
<Level right={<DeleteButton label={t("deleteRepo.button")} action={action} loading={loading} />} />
|
||||
</>
|
||||
);
|
||||
}
|
||||
|
||||
@@ -6,6 +6,7 @@ import {
|
||||
GroupAutocomplete,
|
||||
LabelWithHelpIcon,
|
||||
Radio,
|
||||
Level,
|
||||
SubmitButton,
|
||||
Subtitle,
|
||||
UserAutocomplete
|
||||
@@ -141,8 +142,8 @@ class CreatePermissionForm extends React.Component<Props, State> {
|
||||
</div>
|
||||
</div>
|
||||
<div className="columns">
|
||||
<div className="column is-three-fifths">{this.renderAutocompletionField()}</div>
|
||||
<div className="column is-two-fifths">
|
||||
<div className="column is-half">{this.renderAutocompletionField()}</div>
|
||||
<div className="column is-half">
|
||||
<div className="columns">
|
||||
<div className="column is-narrow">
|
||||
<RoleSelector
|
||||
@@ -163,15 +164,15 @@ class CreatePermissionForm extends React.Component<Props, State> {
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div className="columns">
|
||||
<div className="column">
|
||||
<Level
|
||||
right={
|
||||
<SubmitButton
|
||||
label={t("permission.add-permission.submit-button")}
|
||||
loading={loading}
|
||||
disabled={!this.state.valid || this.state.name === ""}
|
||||
/>
|
||||
</div>
|
||||
</div>
|
||||
}
|
||||
/>
|
||||
</form>
|
||||
</>
|
||||
);
|
||||
|
||||
Reference in New Issue
Block a user