mirror of
https://github.com/ansible/awx.git
synced 2026-01-14 11:20:39 -03: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:
commit
0d5a46a6e1
@ -3,27 +3,30 @@ import PropTypes from 'prop-types';
|
||||
import { withI18n } from '@lingui/react';
|
||||
import { t } from '@lingui/macro';
|
||||
import { ActionGroup, Button } from '@patternfly/react-core';
|
||||
import { FormFullWidthLayout } from '@components/FormLayout';
|
||||
|
||||
const FormActionGroup = ({ onSubmit, submitDisabled, onCancel, i18n }) => (
|
||||
<ActionGroup>
|
||||
<Button
|
||||
aria-label={i18n._(t`Save`)}
|
||||
variant="primary"
|
||||
type="submit"
|
||||
onClick={onSubmit}
|
||||
isDisabled={submitDisabled}
|
||||
>
|
||||
{i18n._(t`Save`)}
|
||||
</Button>
|
||||
<Button
|
||||
aria-label={i18n._(t`Cancel`)}
|
||||
variant="secondary"
|
||||
type="button"
|
||||
onClick={onCancel}
|
||||
>
|
||||
{i18n._(t`Cancel`)}
|
||||
</Button>
|
||||
</ActionGroup>
|
||||
<FormFullWidthLayout>
|
||||
<ActionGroup>
|
||||
<Button
|
||||
aria-label={i18n._(t`Save`)}
|
||||
variant="primary"
|
||||
type="submit"
|
||||
onClick={onSubmit}
|
||||
isDisabled={submitDisabled}
|
||||
>
|
||||
{i18n._(t`Save`)}
|
||||
</Button>
|
||||
<Button
|
||||
aria-label={i18n._(t`Cancel`)}
|
||||
variant="secondary"
|
||||
type="button"
|
||||
onClick={onCancel}
|
||||
>
|
||||
{i18n._(t`Cancel`)}
|
||||
</Button>
|
||||
</ActionGroup>
|
||||
</FormFullWidthLayout>
|
||||
);
|
||||
|
||||
FormActionGroup.propTypes = {
|
||||
|
||||
@ -9,11 +9,7 @@ import FormActionGroup from '@components/FormActionGroup/FormActionGroup';
|
||||
import AnsibleSelect from '@components/AnsibleSelect';
|
||||
import { required } from '@util/validators';
|
||||
import OrganizationLookup from '@components/Lookup/OrganizationLookup';
|
||||
import {
|
||||
FormColumnLayout,
|
||||
FormFullWidthLayout,
|
||||
SubFormLayout,
|
||||
} from '@components/FormLayout';
|
||||
import { FormColumnLayout, SubFormLayout } from '@components/FormLayout';
|
||||
import { ManualSubForm, SourceControlSubForm } from './CredentialSubForms';
|
||||
|
||||
function CredentialFormFields({
|
||||
@ -50,7 +46,7 @@ function CredentialFormFields({
|
||||
};
|
||||
|
||||
return (
|
||||
<FormFullWidthLayout>
|
||||
<>
|
||||
<FormField
|
||||
id="credential-name"
|
||||
label={i18n._(t`Name`)}
|
||||
@ -113,7 +109,7 @@ function CredentialFormFields({
|
||||
}
|
||||
</SubFormLayout>
|
||||
)}
|
||||
</FormFullWidthLayout>
|
||||
</>
|
||||
);
|
||||
}
|
||||
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user