FSN#35817 Autorisaties via API2/Scaffolding

svn path=/Website/trunk/; revision=28565
This commit is contained in:
Jos Groot Lipman
2016-03-21 21:49:14 +00:00
parent 508479e585
commit e7a8113048
10 changed files with 109 additions and 15 deletions

View File

@@ -339,8 +339,12 @@ function scf_RWFIELDTR(model, fld, val, key, params)
if (val && val.id && params.required)
emptyOption = null;
}
if (val && typeof val == "object" && "id" in val)
{ // dereference
val = val.id;
}
FCLTselector(fld, sql, { label: field.label,
initKey: params.search?null:(val?val.id:null),
initKey: val||null,
emptyOption: emptyOption,
emptyKey: (field.typ=="key"?-1:""),
readonly: (foreign.readonly?foreign.readonly:false),