Fixed related host add and edit forms.

This commit is contained in:
Michael Abashian 2017-06-06 11:23:44 -04:00
parent b1d4c44c51
commit 08850fccf7
2 changed files with 5 additions and 2 deletions

View File

@ -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

View File

@ -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,