@@ -27,13 +27,12 @@ import type {
27
27
RBACAction ,
28
28
} from "api/typesGenerated" ;
29
29
import { ErrorAlert } from "components/Alert/ErrorAlert" ;
30
+ import { FormFields , FormFooter , VerticalForm } from "components/Form/Form" ;
30
31
import {
31
- FormFields ,
32
- FormFooter ,
33
- FormSection ,
34
- VerticalForm ,
35
- } from "components/Form/Form" ;
36
- import { PageHeader , PageHeaderTitle } from "components/PageHeader/PageHeader" ;
32
+ PageHeader ,
33
+ PageHeaderSubtitle ,
34
+ PageHeaderTitle ,
35
+ } from "components/PageHeader/PageHeader" ;
37
36
import { getFormHelpers , nameValidator } from "utils/formUtils" ;
38
37
39
38
const validationSchema = Yup . object ( {
@@ -105,41 +104,39 @@ export const CreateEditRolePageView: FC<CreateEditRolePageViewProps> = ({
105
104
< PageHeaderTitle >
106
105
{ role ? "Edit" : "Create" } custom role
107
106
</ PageHeaderTitle >
107
+ < PageHeaderSubtitle >
108
+ { "Set a name and permissions for this role." }
109
+ </ PageHeaderSubtitle >
108
110
</ PageHeader >
109
111
< VerticalForm onSubmit = { form . handleSubmit } >
110
- < FormSection
111
- title = "Role settings"
112
- description = "Set a name and permissions for this role."
113
- >
114
- < FormFields >
115
- { Boolean ( error ) && ! isApiValidationError ( error ) && (
116
- < ErrorAlert error = { error } />
117
- ) }
112
+ < FormFields >
113
+ { Boolean ( error ) && ! isApiValidationError ( error ) && (
114
+ < ErrorAlert error = { error } />
115
+ ) }
118
116
119
- < TextField
120
- { ...getFieldHelpers ( "name" , {
121
- helperText :
122
- "The role name cannot be modified after the role is created." ,
123
- } ) }
124
- autoFocus
125
- fullWidth
126
- disabled = { role !== undefined }
127
- label = "Name"
128
- />
129
- < TextField
130
- { ...getFieldHelpers ( "display_name" , {
131
- helperText : "Optional: keep empty to default to the name." ,
132
- } ) }
133
- fullWidth
134
- label = "Display Name"
135
- />
136
- < ActionCheckboxes
137
- permissions = { role ?. organization_permissions || [ ] }
138
- form = { form }
139
- allResources = { allResources }
140
- />
141
- </ FormFields >
142
- </ FormSection >
117
+ < TextField
118
+ { ...getFieldHelpers ( "name" , {
119
+ helperText :
120
+ "The role name cannot be modified after the role is created." ,
121
+ } ) }
122
+ autoFocus
123
+ fullWidth
124
+ disabled = { role !== undefined }
125
+ label = "Name"
126
+ />
127
+ < TextField
128
+ { ...getFieldHelpers ( "display_name" , {
129
+ helperText : "Optional: keep empty to default to the name." ,
130
+ } ) }
131
+ fullWidth
132
+ label = "Display Name"
133
+ />
134
+ < ActionCheckboxes
135
+ permissions = { role ?. organization_permissions || [ ] }
136
+ form = { form }
137
+ allResources = { allResources }
138
+ />
139
+ </ FormFields >
143
140
{ canAssignOrgRole && (
144
141
< FormFooter
145
142
onCancel = { onCancel }
0 commit comments