mirror of
https://github.com/ansible/awx.git
synced 2026-03-17 08:57:33 -02:30
Fixes errors thrown when saving groups add / edit forms
Fixes incorrect ng-required statement affecting group form validity
This commit is contained in:
@@ -76,7 +76,6 @@ export default
|
||||
ngShow: "source && source.value !== '' && source.value !== 'custom'",
|
||||
sourceModel: 'credential',
|
||||
sourceField: 'name',
|
||||
ngClick: 'lookupCredential()',
|
||||
awRequiredWhen: {
|
||||
reqExpression: "cloudCredentialRequired",
|
||||
init: "false"
|
||||
@@ -146,12 +145,14 @@ export default
|
||||
label : "Custom Inventory Script",
|
||||
type: 'lookup',
|
||||
basePath: 'inventory_scripts',
|
||||
list: 'InventoryScriptList',
|
||||
list: 'InventoryScriptsList',
|
||||
ngShow: "source && source.value === 'custom'",
|
||||
sourceModel: 'inventory_script',
|
||||
sourceField: 'name',
|
||||
ngClick: 'lookUpInventory_script()' ,
|
||||
ngRequired: "source && source.value === 'custom'",
|
||||
awRequiredWhen: {
|
||||
reqExpression: "source && source.value === 'custom'",
|
||||
init: "false"
|
||||
},
|
||||
ngDisabled: '!(group_obj.summary_fields.user_capabilities.edit || canAdd)',
|
||||
},
|
||||
custom_variables: {
|
||||
|
||||
@@ -12,7 +12,7 @@ export default ['$state', '$stateParams', '$scope', 'GroupForm', 'CredentialList
|
||||
form = GroupForm();
|
||||
init();
|
||||
|
||||
function init() {n
|
||||
function init() {
|
||||
// apply form definition's default field values
|
||||
GenerateForm.applyDefaults(form, $scope);
|
||||
|
||||
@@ -45,7 +45,7 @@ export default ['$state', '$stateParams', '$scope', 'GroupForm', 'CredentialList
|
||||
};
|
||||
|
||||
$scope.formSave = function() {
|
||||
var params, source;
|
||||
var params, source, json_data;
|
||||
json_data = ToJSON($scope.parseType, $scope.variables, true);
|
||||
// group fields
|
||||
var group = {
|
||||
|
||||
@@ -61,7 +61,7 @@ export default ['$state', '$stateParams', '$scope', 'ToggleNotification', 'Parse
|
||||
$state.go('^');
|
||||
};
|
||||
$scope.formSave = function() {
|
||||
var params, source;
|
||||
var params, source, json_data;
|
||||
json_data = ToJSON($scope.parseType, $scope.variables, true);
|
||||
// group fields
|
||||
var group = {
|
||||
|
||||
@@ -31,7 +31,8 @@ export default {
|
||||
page: '1',
|
||||
order_by: 'name',
|
||||
},
|
||||
squash: true
|
||||
squash: true,
|
||||
dynamic: true
|
||||
},
|
||||
host_search: {
|
||||
value: {
|
||||
@@ -39,7 +40,8 @@ export default {
|
||||
page: '1',
|
||||
order_by: 'name',
|
||||
},
|
||||
squash: true
|
||||
squash: true,
|
||||
dynamic: true
|
||||
}
|
||||
},
|
||||
ncyBreadcrumb: {
|
||||
|
||||
Reference in New Issue
Block a user