// the fields current value
currentValue = attributes.currentValues[fqFieldName];
// the param structure which will hold all of the fields from the props dialog
xparams = parameters[fieldQuery.inputID];
/*
Establish the layout options with security access for specific users.
The layoutOptions Array stores the option name, thumbnail image, and
security groups that have permissions to select the option.
Array contains the following substructures with the fields:
name = Name of the layout option stored in the metadata form.
description = Description for the layout option - Displayed to the user.
security = Group Names
image = Path to the image file
After the newOption structure is built, it is appended into the layoutOptions Array.
*/
layoutOptions = ArrayNew(1);
// Home Layout
newOption = structNew();
newOption.name = "Home";
newOption.description = "Home";
newOption.security = "";
newOption.image = "/ADF/extensions/customfields/page_layout/thumbs/home.gif";
ArrayAppend(layoutOptions, newOption);
// Landing Layout
newOption = structNew();
newOption.name = "Landing";
newOption.description = "Landing Page";
newOption.security = "";
newOption.image = "/ADF/extensions/customfields/page_layout/thumbs/landing.gif";
ArrayAppend(layoutOptions, newOption);
// Full Width Layout
newOption = structNew();
newOption.name = "Full-Width";
newOption.description = "Full Width";
newOption.security = "";
newOption.image = "/ADF/extensions/customfields/page_layout/thumbs/full_width.gif";
ArrayAppend(layoutOptions, newOption);
// Equal Width Layout
newOption = structNew();
newOption.name = "Equal-Width";
newOption.description = "Equal Width";
newOption.security = "";
newOption.image = "/ADF/extensions/customfields/page_layout/thumbs/equal_width.gif";
ArrayAppend(layoutOptions, newOption);
// Right Channel Layout
newOption = structNew();
newOption.name = "Right-Channel";
newOption.description = "Right Channel";
newOption.security = "";
newOption.image = "/ADF/extensions/customfields/page_layout/thumbs/right_channel.gif";
ArrayAppend(layoutOptions, newOption);
var showChoice = "true";
var itm = 1;
var groupID = 0;
if( listLen(arguments.securityGroups) )
{
// reset value to false then determine if they have access
showChoice = "false";
for( itm; itm lte listLen(arguments.securityGroups); itm = itm + 1 )
{
if( listFind(request.user.groupList, listGetAt(arguments.securityGroups, itm) ) )
{
showChoice = "true";
break;
}
}
}