mirror of
https://github.com/ZwareBear/awx.git
synced 2026-04-21 15:31:48 -05:00
begin re-implementation of auto-populate feature
This commit is contained in:
committed by
jaredevantabor
parent
0d8d9b3643
commit
67f282f64d
@@ -376,6 +376,11 @@ angular.module('FormGenerator', [GeneratorHelpers.name, 'Utilities', listGenerat
|
||||
},
|
||||
|
||||
applyDefaults: function (form, scope) {
|
||||
// Note: This is a hack. Ideally, mode should be set in each <resource>-<mode>.controller.js
|
||||
// The mode is needed by the awlookup directive to auto-populate form fields when there is a
|
||||
// single related resource.
|
||||
scope.mode = this.mode;
|
||||
|
||||
for (var fld in form.fields) {
|
||||
if (form.fields[fld]['default'] || form.fields[fld]['default'] === 0) {
|
||||
if (form.fields[fld].type === 'select' && scope[fld + '_options']) {
|
||||
|
||||
Reference in New Issue
Block a user