'btn-success',
'medium' => 'btn-info',
'advanced' => 'btn-warning',
);
foreach ($setsNames as $num => $title) :
// Check whether the values exists, and if empty then use from preset
if (empty($value['toolbars'][$num]['menu'])
&& empty($value['toolbars'][$num]['toolbar1'])
&& empty($value['toolbars'][$num]['toolbar2']))
{
// Take the preset for default value
switch ($num) {
case 0:
$preset = $toolbarPreset['advanced'];
break;
case 1:
$preset = $toolbarPreset['medium'];
break;
default:
$preset = $toolbarPreset['simple'];
}
$value['toolbars'][$num] = $preset;
}
// Take existing values
$valMenu = empty($value['toolbars'][$num]['menu']) ? array() : $value['toolbars'][$num]['menu'];
$valBar1 = empty($value['toolbars'][$num]['toolbar1']) ? array() : $value['toolbars'][$num]['toolbar1'];
$valBar2 = empty($value['toolbars'][$num]['toolbar2']) ? array() : $value['toolbars'][$num]['toolbar2'];
?>
sublayout('setaccess', array('form' => $setsForms[$num])); ?>
sublayout('setoptions', array('form' => $setsForms[$num])); ?>