From 0d1b25131dfeaf47002a85827aa5bdf5f6ff6cc0 Mon Sep 17 00:00:00 2001 From: John Mitchell Date: Mon, 15 Oct 2018 18:04:36 -0400 Subject: [PATCH] fix scope location of json fields of settings auth form --- .../forms/auth-form/configuration-auth.controller.js | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/awx/ui/client/src/configuration/forms/auth-form/configuration-auth.controller.js b/awx/ui/client/src/configuration/forms/auth-form/configuration-auth.controller.js index 03f3213e13..251e9845f2 100644 --- a/awx/ui/client/src/configuration/forms/auth-form/configuration-auth.controller.js +++ b/awx/ui/client/src/configuration/forms/auth-form/configuration-auth.controller.js @@ -242,8 +242,8 @@ export default [ // Attach codemirror to fields that need it _.each(form.formDef.fields, function(field) { // Codemirror balks at empty values so give it one - if($scope.$parent[field.name] === null && field.codeMirror) { - $scope.$parent[field.name] = '{}'; + if($scope.$parent.$parent[field.name] === null && field.codeMirror) { + $scope.$parent.$parent[field.name] = '{}'; } if(field.codeMirror) { createIt(field.name); @@ -256,11 +256,11 @@ export default [ function createIt(name){ ParseTypeChange({ - scope: $scope.$parent, + scope: $scope.$parent.$parent, variable: name, parse_variable: 'parseType', 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); }