mirror of
https://github.com/scm-manager/scm-manager.git
synced 2026-03-07 04:40:53 +01:00
add subtitle, missing props
This commit is contained in:
@@ -3,7 +3,7 @@ import React from "react";
|
||||
import RepositoryRoleForm from "./RepositoryRoleForm";
|
||||
import { connect } from "react-redux";
|
||||
import { translate } from "react-i18next";
|
||||
import { ErrorNotification, Title } from "@scm-manager/ui-components";
|
||||
import {ErrorNotification, Subtitle, Title} from "@scm-manager/ui-components";
|
||||
import {
|
||||
createRole,
|
||||
getCreateRoleFailure,
|
||||
@@ -52,6 +52,7 @@ class CreateRepositoryRole extends React.Component<Props> {
|
||||
return (
|
||||
<>
|
||||
<Title title={t("repositoryRole.title")} />
|
||||
<Subtitle subtitle={t("repositoryRole.createSubtitle")} />
|
||||
<RepositoryRoleForm
|
||||
disabled={this.props.disabled}
|
||||
submitForm={role => this.createRepositoryRole(role)}
|
||||
|
||||
@@ -8,8 +8,9 @@ import {
|
||||
isModifyRolePending,
|
||||
modifyRole
|
||||
} from "../modules/roles";
|
||||
import { ErrorNotification } from "@scm-manager/ui-components";
|
||||
import { ErrorNotification, Subtitle } from "@scm-manager/ui-components";
|
||||
import type { RepositoryRole } from "@scm-manager/ui-types";
|
||||
import type { History } from "history";
|
||||
|
||||
type Props = {
|
||||
disabled: boolean,
|
||||
@@ -17,6 +18,10 @@ type Props = {
|
||||
repositoryRolesLink: string,
|
||||
error?: Error,
|
||||
|
||||
// context objects
|
||||
t: string => string,
|
||||
history: History,
|
||||
|
||||
//dispatch function
|
||||
updateRole: (
|
||||
link: string,
|
||||
@@ -36,7 +41,7 @@ class EditRepositoryRole extends React.Component<Props> {
|
||||
};
|
||||
|
||||
render() {
|
||||
const { error } = this.props;
|
||||
const { error, t } = this.props;
|
||||
|
||||
if (error) {
|
||||
return <ErrorNotification error={error} />;
|
||||
@@ -44,6 +49,7 @@ class EditRepositoryRole extends React.Component<Props> {
|
||||
|
||||
return (
|
||||
<>
|
||||
<Subtitle subtitle={t("repositoryRole.editSubtitle")} />
|
||||
<RepositoryRoleForm
|
||||
nameDisabled={true}
|
||||
role={this.props.role}
|
||||
|
||||
Reference in New Issue
Block a user