1
0
mirror of https://github.com/ansible/awx.git synced 2024-11-01 16:51:11 +03:00

fixed variable name in fieldIsAutopopulatable function

This commit is contained in:
John Mitchell 2015-05-06 14:39:16 -04:00
parent 0476725d61
commit 2ee2563e61

View File

@ -69,11 +69,11 @@ export default
// this logic makes sure that the form is being added, and that the lookup to be autopopulated is required
function fieldIsAutopopulatable() {
if (parent_scope.mode === "add") {
if (parent_scope[form.fields[field].sourceModel + "_field"].awRequiredWhen &&
parent_scope[form.fields[field].sourceModel + "_field"].awRequiredWhen.variable &&
parent_scope[parent_scope[form.fields[field].sourceModel + "_field"].awRequiredWhen.variable]) {
if (parent_scope[sourceModel + "_field"].awRequiredWhen &&
parent_scope[sourceModel + "_field"].awRequiredWhen.variable &&
parent_scope[parent_scope[sourceModel + "_field"].awRequiredWhen.variable]) {
return true;
} else if (parent_scope[form.fields[field].sourceModel + "_field"].addRequired === true) {
} else if (parent_scope[sourceModel + "_field"].addRequired === true) {
return true;
} else {
return false;