1
0
mirror of https://github.com/ansible/awx.git synced 2024-11-02 09:51:09 +03:00

Merge pull request #6471 from mabashian/6428-related-host-edit

Fixed nested host add/edit forms
This commit is contained in:
Michael Abashian 2017-06-06 14:36:05 -04:00 committed by GitHub
commit 7923468c0e
3 changed files with 4 additions and 7 deletions

View File

@ -9,8 +9,8 @@ export default {
},
views: {
'hostForm@inventories': {
templateProvider: function(GenerateForm, RelatedHostsFormDefinition) {
let form = RelatedHostsFormDefinition;
templateProvider: function(GenerateForm, RelatedHostsFormDefinition, NestedHostsFormDefinition, $stateParams) {
let form = ($stateParams.group_id) ? NestedHostsFormDefinition : RelatedHostsFormDefinition;
return GenerateForm.buildHTML(form, {
mode: 'add',
related: false

View File

@ -8,10 +8,7 @@ export default {
views: {
'hostForm@inventories': {
templateProvider: function(GenerateForm, RelatedHostsFormDefinition, NestedHostsFormDefinition, $stateParams) {
let form = RelatedHostsFormDefinition;
if($stateParams.group_id){
form = NestedHostsFormDefinition;
}
let form = ($stateParams.group_id) ? NestedHostsFormDefinition : RelatedHostsFormDefinition;
return GenerateForm.buildHTML(form, {
mode: 'edit',
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,