fix border/padding while loading jt edit form

This commit is contained in:
Keith Grant
2019-10-23 16:05:56 -07:00
parent f57cf03f4b
commit 4f90406e91
2 changed files with 13 additions and 12 deletions

View File

@@ -179,11 +179,19 @@ class JobTemplateEdit extends Component {
const canEdit = template.summary_fields.user_capabilities.edit; const canEdit = template.summary_fields.user_capabilities.edit;
if (hasContentLoading) { if (hasContentLoading) {
return <ContentLoading />; return (
<CardBody>
<ContentLoading />
</CardBody>
);
} }
if (contentError) { if (contentError) {
return <ContentError error={contentError} />; return (
<CardBody>
<ContentError error={contentError} />
</CardBody>
);
} }
if (!canEdit) { if (!canEdit) {

View File

@@ -8,6 +8,7 @@ import {
Form, Form,
FormGroup, FormGroup,
Card, Card,
CardBody,
Switch, Switch,
Checkbox, Checkbox,
TextInput, TextInput,
@@ -165,19 +166,11 @@ class JobTemplateForm extends Component {
} }
if (hasContentLoading) { if (hasContentLoading) {
return ( return <ContentLoading />;
<Card className="awx-c-card">
<ContentLoading />
</Card>
);
} }
if (contentError) { if (contentError) {
return ( return <ContentError error={contentError} />;
<Card className="awx-c-card">
<ContentError error={contentError} />
</Card>
);
} }
const AdvancedFieldsWrapper = template.isNew ? CollapsibleSection : 'div'; const AdvancedFieldsWrapper = template.isNew ? CollapsibleSection : 'div';
return ( return (