adding three fixes:

1. adding a watcher for the basePath to use for lookups that might
have dynamic lookups. Ex: The groups form -> cred depends on "source.type"

2. adding a fix for RBAC based autopopulation. Basically, if you don't have
permission to "use" something, then you shouldn't be able to see it auto-fill

3. adding a fix for the promptable fields on the job template form. The inventory
and credential are both promptable, and therefore should not auto populate
This commit is contained in:
jaredevantabor
2017-01-19 15:53:16 -08:00
parent 61ad4e3793
commit fc45603c3b
5 changed files with 53 additions and 18 deletions

View File

@@ -1368,7 +1368,8 @@ angular.module('FormGenerator', [GeneratorHelpers.name, 'Utilities', listGenerat
html += `data-basePath="${field.basePath}"`;
html += `data-source="${field.sourceModel}"`;
html += `data-query="?${field.sourceField}__iexact=:value"`;
html += (field.autopopulateLookup) ? `autopopulateLookup=${field.autopopulateLookup}` : "";
html += (field.autopopulateLookup !== undefined) ? ` autopopulateLookup=${field.autopopulateLookup} ` : "";
html += (field.watchBasePath !== undefined) ? ` watchBasePath=${field.watchBasePath} ` : "";
html += `ng-model-options="{ updateOn: 'default blur', debounce: { 'default': 300, 'blur': 0 } }"`;
html += " awlookup >\n";
html += "</div>\n";