mirror of
https://github.com/ansible/awx.git
synced 2024-11-02 01:21:21 +03:00
Merge pull request #6471 from mabashian/6428-related-host-edit
Fixed nested host add/edit forms
This commit is contained in:
commit
7923468c0e
@ -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
|
||||
|
@ -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
|
||||
|
@ -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,
|
||||
|
Loading…
Reference in New Issue
Block a user