mirror of
https://github.com/ansible/awx.git
synced 2026-01-11 10:00:01 -03:30
Changes CredentialSubForm to TypeInputsSubForm
This commit is contained in:
parent
3dfc9328a9
commit
b5ce1fe2f3
@ -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]}
|
||||
/>
|
||||
)}
|
||||
|
||||
@ -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);
|
||||
Loading…
x
Reference in New Issue
Block a user