FCLT#69806 model.autfunction kan ook een array zijn
svn path=/Website/trunk/; revision=54729
This commit is contained in:
@@ -115,8 +115,18 @@
|
||||
//if ("autfunction" in model && !user.has(model.autfunction))
|
||||
// return {};
|
||||
var auttext = "";
|
||||
if (model.autfunction)
|
||||
auttext = "Requires authorization `{0}` ({1})".format(model.autfunction, L("lcl_" + model.autfunction));
|
||||
if ("autfunction" in model)
|
||||
{
|
||||
if (typeof model.autfunction == "string")
|
||||
auttext = "Requires authorization `{0}` ({1})".format(model.autfunction, L("lcl_" + model.autfunction));
|
||||
else if (typeof model.autfunction == "object" && model.autfunction instanceof Array && model.autfunction.length)
|
||||
{
|
||||
var lcls = [];
|
||||
for (i in model.autfunction)
|
||||
lcls.push(L("lcl_" + model.autfunction[i]));
|
||||
auttext = "Requires authorization `{0}` ({1})".format(model.autfunction.join(" or "), lcls.join(", "));
|
||||
}
|
||||
}
|
||||
model.records_title = model.records_title || model.records_name;
|
||||
model.record_title = model.record_title || model.record_name;
|
||||
var result = {
|
||||
|
||||
Reference in New Issue
Block a user