mirror of
https://github.com/ansible/awx.git
synced 2024-10-30 22:21:13 +03:00
Show grant and client type validation errors
This commit is contained in:
parent
cd6df9299f
commit
d1a4f010b9
@ -39,6 +39,7 @@ function ApplicationFormFields({
|
|||||||
name: 'client_type',
|
name: 'client_type',
|
||||||
validate: required(null, i18n),
|
validate: required(null, i18n),
|
||||||
});
|
});
|
||||||
|
|
||||||
return (
|
return (
|
||||||
<>
|
<>
|
||||||
<FormField
|
<FormField
|
||||||
@ -68,8 +69,12 @@ function ApplicationFormFields({
|
|||||||
<FormGroup
|
<FormGroup
|
||||||
fieldId="authType"
|
fieldId="authType"
|
||||||
helperTextInvalid={authorizationTypeMeta.error}
|
helperTextInvalid={authorizationTypeMeta.error}
|
||||||
|
validated={
|
||||||
|
!authorizationTypeMeta.touched || !authorizationTypeMeta.error
|
||||||
|
? 'default'
|
||||||
|
: 'error'
|
||||||
|
}
|
||||||
isRequired
|
isRequired
|
||||||
isValid={!authorizationTypeMeta.touched || !authorizationTypeMeta.error}
|
|
||||||
label={i18n._(t`Authorization grant type`)}
|
label={i18n._(t`Authorization grant type`)}
|
||||||
>
|
>
|
||||||
<FieldTooltip
|
<FieldTooltip
|
||||||
@ -79,6 +84,9 @@ function ApplicationFormFields({
|
|||||||
/>
|
/>
|
||||||
<AnsibleSelect
|
<AnsibleSelect
|
||||||
{...authorizationTypeField}
|
{...authorizationTypeField}
|
||||||
|
isValid={
|
||||||
|
!authorizationTypeMeta.touched || !authorizationTypeMeta.error
|
||||||
|
}
|
||||||
isDisabled={match.url.endsWith('edit')}
|
isDisabled={match.url.endsWith('edit')}
|
||||||
id="authType"
|
id="authType"
|
||||||
data={[{ label: '', key: 1, value: '' }, ...authorizationOptions]}
|
data={[{ label: '', key: 1, value: '' }, ...authorizationOptions]}
|
||||||
@ -105,8 +113,10 @@ function ApplicationFormFields({
|
|||||||
<FormGroup
|
<FormGroup
|
||||||
fieldId="clientType"
|
fieldId="clientType"
|
||||||
helperTextInvalid={clientTypeMeta.error}
|
helperTextInvalid={clientTypeMeta.error}
|
||||||
|
validated={
|
||||||
|
!clientTypeMeta.touched || !clientTypeMeta.error ? 'default' : 'error'
|
||||||
|
}
|
||||||
isRequired
|
isRequired
|
||||||
isValid={!clientTypeMeta.touched || !clientTypeMeta.error}
|
|
||||||
label={i18n._(t`Client type`)}
|
label={i18n._(t`Client type`)}
|
||||||
>
|
>
|
||||||
<FieldTooltip
|
<FieldTooltip
|
||||||
@ -116,6 +126,7 @@ function ApplicationFormFields({
|
|||||||
/>
|
/>
|
||||||
<AnsibleSelect
|
<AnsibleSelect
|
||||||
{...clientTypeField}
|
{...clientTypeField}
|
||||||
|
isValid={!clientTypeMeta.touched || !clientTypeMeta.error}
|
||||||
id="clientType"
|
id="clientType"
|
||||||
data={[{ label: '', key: 1, value: '' }, ...clientTypeOptions]}
|
data={[{ label: '', key: 1, value: '' }, ...clientTypeOptions]}
|
||||||
onChange={(event, value) => {
|
onChange={(event, value) => {
|
||||||
|
Loading…
Reference in New Issue
Block a user