Changes CredentialSubForm to TypeInputsSubForm

This commit is contained in:
mabashian 2020-06-08 14:59:16 -04:00
parent 3dfc9328a9
commit b5ce1fe2f3
2 changed files with 6 additions and 6 deletions

View File

@ -10,7 +10,7 @@ import AnsibleSelect from '../../../components/AnsibleSelect';
import { required } from '../../../util/validators';
import OrganizationLookup from '../../../components/Lookup/OrganizationLookup';
import { FormColumnLayout } from '../../../components/FormLayout';
import CredentialSubForm from './CredentialSubForm';
import TypeInputsSubForm from './TypeInputsSubForm';
function CredentialFormFields({
i18n,
@ -125,7 +125,7 @@ function CredentialFormFields({
/>
</FormGroup>
{credTypeField.value !== undefined && credTypeField.value !== '' && (
<CredentialSubForm
<TypeInputsSubForm
credentialType={credentialTypes[credTypeField.value]}
/>
)}

View File

@ -12,7 +12,7 @@ import { CheckboxField } from '../../../components/FormField';
import { CredentialType } from '../../../types';
import { CredentialField, GceFileUploadField } from './CredentialFormFields';
function CredentialSubForm({ credentialType, i18n }) {
function TypeInputsSubForm({ credentialType, i18n }) {
const stringFields = credentialType.inputs.fields.filter(
fieldOptions => fieldOptions.type === 'string' || fieldOptions.choices
);
@ -65,10 +65,10 @@ function CredentialSubForm({ credentialType, i18n }) {
);
}
CredentialSubForm.propTypes = {
TypeInputsSubForm.propTypes = {
credentialType: CredentialType.isRequired,
};
CredentialSubForm.defaultProps = {};
TypeInputsSubForm.defaultProps = {};
export default withI18n()(CredentialSubForm);
export default withI18n()(TypeInputsSubForm);