add JT form callback fields

This commit is contained in:
Keith Grant
2019-09-03 10:27:11 -07:00
parent e6475f21f6
commit 4f546be87a

View File

@@ -11,6 +11,7 @@ import {
Card, Card,
Switch, Switch,
Checkbox, Checkbox,
TextInput,
} from '@patternfly/react-core'; } from '@patternfly/react-core';
import { QuestionCircleIcon as PFQuestionCircleIcon } from '@patternfly/react-icons'; import { QuestionCircleIcon as PFQuestionCircleIcon } from '@patternfly/react-icons';
import ContentError from '@components/ContentError'; import ContentError from '@components/ContentError';
@@ -673,13 +674,30 @@ class JobTemplateForm extends Component {
)} )}
/> />
</GridFormGroup> </GridFormGroup>
<FormGroup <div
css={` css={`
${allowCallbacks ? '' : 'display: none'} ${allowCallbacks ? '' : 'display: none'}
`} `}
> >
HERE <FormRow>
</FormGroup> <FormGroup
label={i18n._(t`Provisioning Callback URL`)}
fieldId="template-callback-url"
>
<TextInput
id="template-callback-url"
isDisabled
value={`${document.location.origin}${template.related.callback}`}
/>
</FormGroup>
<FormField
id="template-host-config-key"
name="host_config_key"
label={i18n._(t`Host Config Key`)}
validate={allowCallbacks ? required(null, i18n) : null}
/>
</FormRow>
</div>
</CollapsibleSection> </CollapsibleSection>
<FormActionGroup onCancel={handleCancel} onSubmit={handleSubmit} /> <FormActionGroup onCancel={handleCancel} onSubmit={handleSubmit} />
</Form> </Form>