diff --git a/src/realm-roles/RealmRoleForm.tsx b/src/realm-roles/RealmRoleForm.tsx index bbe7c6b9a5..ec249e1628 100644 --- a/src/realm-roles/RealmRoleForm.tsx +++ b/src/realm-roles/RealmRoleForm.tsx @@ -10,8 +10,11 @@ import { } from "@patternfly/react-core"; import { useTranslation } from "react-i18next"; import type { UseFormMethods } from "react-hook-form"; +import { ViewHeader } from "../components/view-header/ViewHeader"; import { FormAccess } from "../components/form-access/FormAccess"; import type { AttributeForm } from "../components/attribute-form/AttributeForm"; +import { useRealm } from "../context/realm-context/RealmContext"; +import { useHistory } from "react-router-dom"; export type RealmRoleFormProps = { form: UseFormMethods; @@ -27,76 +30,86 @@ export const RealmRoleForm = ({ reset, }: RealmRoleFormProps) => { const { t } = useTranslation("roles"); + const history = useHistory(); + const { realm: realmName } = useRealm(); return ( - - - + + + - - !!value.trim() || t("common:required").toString(), - })} - type="text" - id="kc-name" - name="name" - isReadOnly={editMode} - /> - - -