Merge pull request #5086 from keithjgrant/4614-fix-template-edit-border

Fix border/padding while loading jt edit form

Reviewed-by: https://github.com/apps/softwarefactory-project-zuul
This commit is contained in:
softwarefactory-project-zuul[bot] 2019-10-25 16:31:53 +00:00 committed by GitHub
commit 480c8516ab
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 12 additions and 13 deletions

View File

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

View File

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