From 08850fccf7bad9f03b5275f4a87d0c7853ae5913 Mon Sep 17 00:00:00 2001 From: Michael Abashian Date: Tue, 6 Jun 2017 11:23:44 -0400 Subject: [PATCH] Fixed related host add and edit forms. --- .../groups/nested-hosts/nested-hosts-add.route.js | 5 ++++- .../src/inventories/groups/nested-hosts/nested-hosts.form.js | 2 +- 2 files changed, 5 insertions(+), 2 deletions(-) diff --git a/awx/ui/client/src/inventories/groups/nested-hosts/nested-hosts-add.route.js b/awx/ui/client/src/inventories/groups/nested-hosts/nested-hosts-add.route.js index 3559192274..7bb02951aa 100644 --- a/awx/ui/client/src/inventories/groups/nested-hosts/nested-hosts-add.route.js +++ b/awx/ui/client/src/inventories/groups/nested-hosts/nested-hosts-add.route.js @@ -9,8 +9,11 @@ export default { }, views: { 'hostForm@inventories': { - templateProvider: function(GenerateForm, RelatedHostsFormDefinition) { + templateProvider: function(GenerateForm, RelatedHostsFormDefinition, NestedHostsFormDefinition, $stateParams) { let form = RelatedHostsFormDefinition; + if($stateParams.group_id){ + form = NestedHostsFormDefinition; + } return GenerateForm.buildHTML(form, { mode: 'add', related: false diff --git a/awx/ui/client/src/inventories/groups/nested-hosts/nested-hosts.form.js b/awx/ui/client/src/inventories/groups/nested-hosts/nested-hosts.form.js index 50cc60cdb4..b3f2eed211 100644 --- a/awx/ui/client/src/inventories/groups/nested-hosts/nested-hosts.form.js +++ b/awx/ui/client/src/inventories/groups/nested-hosts/nested-hosts.form.js @@ -64,7 +64,7 @@ function(i18n) { ngDisabled: '!(host.summary_fields.user_capabilities.edit || canAdd)', type: 'text' }, - variables: { + host_variables: { label: i18n._('Variables'), type: 'textarea', rows: 6,