@@ -11,6 +11,7 @@ import {
11
11
} from "components/Form/Form" ;
12
12
import { IconField } from "components/IconField/IconField" ;
13
13
import { Loader } from "components/Loader/Loader" ;
14
+ import { PageHeader , PageHeaderTitle } from "components/PageHeader/PageHeader" ;
14
15
import {
15
16
getFormHelpers ,
16
17
nameValidator ,
@@ -58,65 +59,72 @@ const UpdateGroupForm: FC<UpdateGroupFormProps> = ({
58
59
const getFieldHelpers = getFormHelpers < FormData > ( form , errors ) ;
59
60
60
61
return (
61
- < HorizontalForm onSubmit = { form . handleSubmit } >
62
- < FormSection
63
- title = "Group settings"
64
- description = "Set a name and avatar for this group."
65
- >
66
- < FormFields >
67
- < TextField
68
- { ...getFieldHelpers ( "name" ) }
69
- onChange = { onChangeTrimmed ( form ) }
70
- autoComplete = "name"
71
- autoFocus
72
- fullWidth
73
- label = "Name"
74
- disabled = { isEveryoneGroup ( group ) }
75
- />
76
- { ! isEveryoneGroup ( group ) && (
77
- < >
78
- < TextField
79
- { ...getFieldHelpers ( "display_name" , {
80
- helperText : "Optional: keep empty to default to the name." ,
81
- } ) }
82
- autoComplete = "display_name"
83
- autoFocus
84
- fullWidth
85
- label = "Display Name"
86
- disabled = { isEveryoneGroup ( group ) }
87
- />
88
- < IconField
89
- { ...getFieldHelpers ( "avatar_url" ) }
90
- onChange = { onChangeTrimmed ( form ) }
91
- fullWidth
92
- label = "Avatar URL"
93
- onPickEmoji = { ( value ) => form . setFieldValue ( "avatar_url" , value ) }
94
- />
95
- </ >
96
- ) }
97
- </ FormFields >
98
- </ FormSection >
99
- < FormSection
100
- title = "Quota"
101
- description = "You can use quotas to restrict how many resources a user can create."
102
- >
103
- < FormFields >
104
- < TextField
105
- { ...getFieldHelpers ( "quota_allowance" , {
106
- helperText : `This group gives ${ form . values . quota_allowance } quota credits to each
62
+ < >
63
+ < PageHeader css = { { padding : "8px 0" } } >
64
+ < PageHeaderTitle > { group . name } </ PageHeaderTitle >
65
+ </ PageHeader >
66
+ < HorizontalForm onSubmit = { form . handleSubmit } >
67
+ < FormSection
68
+ title = "Group settings"
69
+ description = "Set a name and avatar for this group."
70
+ >
71
+ < FormFields >
72
+ < TextField
73
+ { ...getFieldHelpers ( "name" ) }
74
+ onChange = { onChangeTrimmed ( form ) }
75
+ autoComplete = "name"
76
+ autoFocus
77
+ fullWidth
78
+ label = "Name"
79
+ disabled = { isEveryoneGroup ( group ) }
80
+ />
81
+ { ! isEveryoneGroup ( group ) && (
82
+ < >
83
+ < TextField
84
+ { ...getFieldHelpers ( "display_name" , {
85
+ helperText : "Optional: keep empty to default to the name." ,
86
+ } ) }
87
+ autoComplete = "display_name"
88
+ autoFocus
89
+ fullWidth
90
+ label = "Display Name"
91
+ disabled = { isEveryoneGroup ( group ) }
92
+ />
93
+ < IconField
94
+ { ...getFieldHelpers ( "avatar_url" ) }
95
+ onChange = { onChangeTrimmed ( form ) }
96
+ fullWidth
97
+ label = "Avatar URL"
98
+ onPickEmoji = { ( value ) =>
99
+ form . setFieldValue ( "avatar_url" , value )
100
+ }
101
+ />
102
+ </ >
103
+ ) }
104
+ </ FormFields >
105
+ </ FormSection >
106
+ < FormSection
107
+ title = "Quota"
108
+ description = "You can use quotas to restrict how many resources a user can create."
109
+ >
110
+ < FormFields >
111
+ < TextField
112
+ { ...getFieldHelpers ( "quota_allowance" , {
113
+ helperText : `This group gives ${ form . values . quota_allowance } quota credits to each
107
114
of its members.` ,
108
- } ) }
109
- onChange = { onChangeTrimmed ( form ) }
110
- autoFocus
111
- fullWidth
112
- type = "number"
113
- label = "Quota Allowance"
114
- />
115
- </ FormFields >
116
- </ FormSection >
115
+ } ) }
116
+ onChange = { onChangeTrimmed ( form ) }
117
+ autoFocus
118
+ fullWidth
119
+ type = "number"
120
+ label = "Quota Allowance"
121
+ />
122
+ </ FormFields >
123
+ </ FormSection >
117
124
118
- < FormFooter onCancel = { onCancel } isLoading = { isLoading } />
119
- </ HorizontalForm >
125
+ < FormFooter onCancel = { onCancel } isLoading = { isLoading } />
126
+ </ HorizontalForm >
127
+ </ >
120
128
) ;
121
129
} ;
122
130
0 commit comments