mirror of
https://github.com/ansible/awx.git
synced 2026-03-26 13:25:02 -02:30
Merge pull request #6233 from marshmalien/6210-user-teams-form-btn-layout
Fix form action button layout Reviewed-by: https://github.com/apps/softwarefactory-project-zuul
This commit is contained in:
@@ -3,27 +3,30 @@ import PropTypes from 'prop-types';
|
|||||||
import { withI18n } from '@lingui/react';
|
import { withI18n } from '@lingui/react';
|
||||||
import { t } from '@lingui/macro';
|
import { t } from '@lingui/macro';
|
||||||
import { ActionGroup, Button } from '@patternfly/react-core';
|
import { ActionGroup, Button } from '@patternfly/react-core';
|
||||||
|
import { FormFullWidthLayout } from '@components/FormLayout';
|
||||||
|
|
||||||
const FormActionGroup = ({ onSubmit, submitDisabled, onCancel, i18n }) => (
|
const FormActionGroup = ({ onSubmit, submitDisabled, onCancel, i18n }) => (
|
||||||
<ActionGroup>
|
<FormFullWidthLayout>
|
||||||
<Button
|
<ActionGroup>
|
||||||
aria-label={i18n._(t`Save`)}
|
<Button
|
||||||
variant="primary"
|
aria-label={i18n._(t`Save`)}
|
||||||
type="submit"
|
variant="primary"
|
||||||
onClick={onSubmit}
|
type="submit"
|
||||||
isDisabled={submitDisabled}
|
onClick={onSubmit}
|
||||||
>
|
isDisabled={submitDisabled}
|
||||||
{i18n._(t`Save`)}
|
>
|
||||||
</Button>
|
{i18n._(t`Save`)}
|
||||||
<Button
|
</Button>
|
||||||
aria-label={i18n._(t`Cancel`)}
|
<Button
|
||||||
variant="secondary"
|
aria-label={i18n._(t`Cancel`)}
|
||||||
type="button"
|
variant="secondary"
|
||||||
onClick={onCancel}
|
type="button"
|
||||||
>
|
onClick={onCancel}
|
||||||
{i18n._(t`Cancel`)}
|
>
|
||||||
</Button>
|
{i18n._(t`Cancel`)}
|
||||||
</ActionGroup>
|
</Button>
|
||||||
|
</ActionGroup>
|
||||||
|
</FormFullWidthLayout>
|
||||||
);
|
);
|
||||||
|
|
||||||
FormActionGroup.propTypes = {
|
FormActionGroup.propTypes = {
|
||||||
|
|||||||
@@ -9,11 +9,7 @@ import FormActionGroup from '@components/FormActionGroup/FormActionGroup';
|
|||||||
import AnsibleSelect from '@components/AnsibleSelect';
|
import AnsibleSelect from '@components/AnsibleSelect';
|
||||||
import { required } from '@util/validators';
|
import { required } from '@util/validators';
|
||||||
import OrganizationLookup from '@components/Lookup/OrganizationLookup';
|
import OrganizationLookup from '@components/Lookup/OrganizationLookup';
|
||||||
import {
|
import { FormColumnLayout, SubFormLayout } from '@components/FormLayout';
|
||||||
FormColumnLayout,
|
|
||||||
FormFullWidthLayout,
|
|
||||||
SubFormLayout,
|
|
||||||
} from '@components/FormLayout';
|
|
||||||
import { ManualSubForm, SourceControlSubForm } from './CredentialSubForms';
|
import { ManualSubForm, SourceControlSubForm } from './CredentialSubForms';
|
||||||
|
|
||||||
function CredentialFormFields({
|
function CredentialFormFields({
|
||||||
@@ -50,7 +46,7 @@ function CredentialFormFields({
|
|||||||
};
|
};
|
||||||
|
|
||||||
return (
|
return (
|
||||||
<FormFullWidthLayout>
|
<>
|
||||||
<FormField
|
<FormField
|
||||||
id="credential-name"
|
id="credential-name"
|
||||||
label={i18n._(t`Name`)}
|
label={i18n._(t`Name`)}
|
||||||
@@ -113,7 +109,7 @@ function CredentialFormFields({
|
|||||||
}
|
}
|
||||||
</SubFormLayout>
|
</SubFormLayout>
|
||||||
)}
|
)}
|
||||||
</FormFullWidthLayout>
|
</>
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user