Skip to content

Commit 6bf3483

Browse files
committed
fix(admin-ui): missing name field added in TR form #1584
Signed-off-by: Jeet Viramgama <[email protected]>
1 parent 1aa2dd7 commit 6bf3483

File tree

1 file changed

+25
-2
lines changed

1 file changed

+25
-2
lines changed

admin-ui/plugins/saml/components/TrustRelationForm.js

+25-2
Original file line numberDiff line numberDiff line change
@@ -82,6 +82,9 @@ const TrustRelationForm = ({ configs, viewOnly }) => {
8282
displayName: Yup.string().required(
8383
`${t('fields.displayName')} is Required!`
8484
),
85+
name: Yup.string().required(
86+
`${t('fields.name')} is Required!`
87+
),
8588
description: Yup.string().required(
8689
`${t('fields.description')} is Required!`
8790
),
@@ -107,6 +110,7 @@ const TrustRelationForm = ({ configs, viewOnly }) => {
107110
const initialValues = {
108111
...(configs || {}),
109112
enabled: getDefault(configs?.enabled, false),
113+
name: getDefault(configs?.name, ''),
110114
displayName: getDefault(configs?.displayName, ''),
111115
description: getDefault(configs?.description, ''),
112116
spMetaDataSourceType: getConfiguredType(configs),
@@ -278,6 +282,20 @@ const TrustRelationForm = ({ configs, viewOnly }) => {
278282
className='mt-4'
279283
>
280284
<FormGroup row>
285+
<Col sm={10}>
286+
<GluuInputRow
287+
label='fields.name'
288+
name='name'
289+
value={formik.values.name || ''}
290+
formik={formik}
291+
lsize={4}
292+
rsize={8}
293+
showError={formik.errors.name && formik.touched.name}
294+
errorMessage={formik.errors.name}
295+
disabled={viewOnly}
296+
required
297+
/>
298+
</Col>
281299
<Col sm={10}>
282300
<GluuInputRow
283301
label='fields.displayName'
@@ -462,7 +480,9 @@ const TrustRelationForm = ({ configs, viewOnly }) => {
462480
formik.errors.samlMetadata?.singleLogoutServiceUrl &&
463481
formik.touched.samlMetadata?.singleLogoutServiceUrl
464482
}
465-
errorMessage={formik.errors.samlMetadata?.singleLogoutServiceUrl}
483+
errorMessage={
484+
formik.errors.samlMetadata?.singleLogoutServiceUrl
485+
}
466486
disabled={viewOnly}
467487
/>
468488
</Col>
@@ -474,7 +494,10 @@ const TrustRelationForm = ({ configs, viewOnly }) => {
474494
formik={formik}
475495
lsize={4}
476496
rsize={8}
477-
showError={formik.errors.samlMetadata?.entityId && formik.touched.samlMetadata?.entityId}
497+
showError={
498+
formik.errors.samlMetadata?.entityId &&
499+
formik.touched.samlMetadata?.entityId
500+
}
478501
errorMessage={formik.errors.samlMetadata?.entityId}
479502
disabled={viewOnly}
480503
/>

0 commit comments

Comments
 (0)