diff --git a/awx/ui/client/src/shared/form-generator.js b/awx/ui/client/src/shared/form-generator.js index 9c82498e24..bb7e76a0b3 100644 --- a/awx/ui/client/src/shared/form-generator.js +++ b/awx/ui/client/src/shared/form-generator.js @@ -1793,7 +1793,7 @@ angular.module('FormGenerator', [GeneratorHelpers.name, 'Utilities', listGenerat form = params.form, itm = params.related, collection = form.related[itm], - act, fld, cnt, base, fAction; + act, fld, cnt, base, fAction, width; if (collection.instructions) { html += "
\n"; @@ -1817,10 +1817,18 @@ angular.module('FormGenerator', [GeneratorHelpers.name, 'Utilities', listGenerat }); var hideOnSuperuser = (hideOnSuperuser === true) ? true : false; + if(actionButtons.length === 0 ){ + // The search bar should be full width if there are no + // action buttons + width = "col-lg-12 col-md-12 col-sm-12 col-xs-12"; + } + else { + width = "col-lg-8 col-md-8 col-sm-8 col-xs-12"; + } html += `
-
0) && !(is_superuser && ${hideOnSuperuser})\"> ${tagSearch} +
`; + + if(actionButtons.length>0){ + html += `
+
+ ${actionButtons}
-
-
- ${actionButtons} -
-
-
- `; +
`; + } + html += "
"; // Message for when a search returns no results. This should only get shown after a search is executed with no results.