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

fix scope location of json fields of settings auth form

This commit is contained in:
John Mitchell 2018-10-15 18:04:36 -04:00
parent d2118b8d25
commit 0d1b25131d
No known key found for this signature in database
GPG Key ID: FE6A9B5BD4EB5C94

View File

@ -242,8 +242,8 @@ export default [
// Attach codemirror to fields that need it // Attach codemirror to fields that need it
_.each(form.formDef.fields, function(field) { _.each(form.formDef.fields, function(field) {
// Codemirror balks at empty values so give it one // Codemirror balks at empty values so give it one
if($scope.$parent[field.name] === null && field.codeMirror) { if($scope.$parent.$parent[field.name] === null && field.codeMirror) {
$scope.$parent[field.name] = '{}'; $scope.$parent.$parent[field.name] = '{}';
} }
if(field.codeMirror) { if(field.codeMirror) {
createIt(field.name); createIt(field.name);
@ -256,11 +256,11 @@ export default [
function createIt(name){ function createIt(name){
ParseTypeChange({ ParseTypeChange({
scope: $scope.$parent, scope: $scope.$parent.$parent,
variable: name, variable: name,
parse_variable: 'parseType', parse_variable: 'parseType',
field_id: form.formDef.name + '_' + name, field_id: form.formDef.name + '_' + name,
readOnly: $scope.$parent.configDataResolve[name] && $scope.$parent.configDataResolve[name].disabled ? true : false readOnly: $scope.configDataResolve[name] && $scope.configDataResolve[name].disabled ? true : false
}); });
$scope.parseTypeChange('parseType', name); $scope.parseTypeChange('parseType', name);
} }