<?php
echo input_hidden_tag('perms_type', $node->getPermsType());

$perms_groups = sfConfig::get('app_permissions_list', array());
ksort($perms_groups);

$credentials = $node->getCredentials();
if (empty($credentials)) {
    $current_perms = array();
} else {
    $current_perms = explode('|', $node->getCredentials());
}

foreach($current_perms as $perm_id => $perm_name) {
    echo input_hidden_tag('perms_groups[' . $perm_id . ']', true);
}

?>