mirror of
https://github.com/ansible/awx.git
synced 2026-08-04 20:10:01 -02:30
Fixed js error. For some reason form generator was unable to get the scope for js-tree after changes related to source_regions. Added a way to pass in scope.
This commit is contained in:
@@ -68,9 +68,14 @@ angular.module('FormGenerator', ['GeneratorHelpers', 'ngCookies', 'Utilities'])
|
||||
else {
|
||||
element.html(this.build(options));
|
||||
}
|
||||
|
||||
if (options.scope) {
|
||||
this.scope = options.scope;
|
||||
}
|
||||
else {
|
||||
this.scope = element.scope();
|
||||
}
|
||||
|
||||
this.scope = element.scope(); // Set scope specific to the element we're compiling, avoids circular reference
|
||||
// From here use 'scope' to manipulate the form, as the form is not in '$scope'
|
||||
$compile(element)(this.scope);
|
||||
|
||||
if (!options.buildTree && !options.html) {
|
||||
|
||||
Reference in New Issue
Block a user