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:
commit
7923468c0e
@ -9,8 +9,8 @@ export default {
|
|||||||
},
|
},
|
||||||
views: {
|
views: {
|
||||||
'hostForm@inventories': {
|
'hostForm@inventories': {
|
||||||
templateProvider: function(GenerateForm, RelatedHostsFormDefinition) {
|
templateProvider: function(GenerateForm, RelatedHostsFormDefinition, NestedHostsFormDefinition, $stateParams) {
|
||||||
let form = RelatedHostsFormDefinition;
|
let form = ($stateParams.group_id) ? NestedHostsFormDefinition : RelatedHostsFormDefinition;
|
||||||
return GenerateForm.buildHTML(form, {
|
return GenerateForm.buildHTML(form, {
|
||||||
mode: 'add',
|
mode: 'add',
|
||||||
related: false
|
related: false
|
||||||
|
@ -8,10 +8,7 @@ export default {
|
|||||||
views: {
|
views: {
|
||||||
'hostForm@inventories': {
|
'hostForm@inventories': {
|
||||||
templateProvider: function(GenerateForm, RelatedHostsFormDefinition, NestedHostsFormDefinition, $stateParams) {
|
templateProvider: function(GenerateForm, RelatedHostsFormDefinition, NestedHostsFormDefinition, $stateParams) {
|
||||||
let form = RelatedHostsFormDefinition;
|
let form = ($stateParams.group_id) ? NestedHostsFormDefinition : RelatedHostsFormDefinition;
|
||||||
if($stateParams.group_id){
|
|
||||||
form = NestedHostsFormDefinition;
|
|
||||||
}
|
|
||||||
return GenerateForm.buildHTML(form, {
|
return GenerateForm.buildHTML(form, {
|
||||||
mode: 'edit',
|
mode: 'edit',
|
||||||
related: false
|
related: false
|
||||||
|
@ -64,7 +64,7 @@ function(i18n) {
|
|||||||
ngDisabled: '!(host.summary_fields.user_capabilities.edit || canAdd)',
|
ngDisabled: '!(host.summary_fields.user_capabilities.edit || canAdd)',
|
||||||
type: 'text'
|
type: 'text'
|
||||||
},
|
},
|
||||||
variables: {
|
host_variables: {
|
||||||
label: i18n._('Variables'),
|
label: i18n._('Variables'),
|
||||||
type: 'textarea',
|
type: 'textarea',
|
||||||
rows: 6,
|
rows: 6,
|
||||||
|
Loading…
Reference in New Issue
Block a user