protected function setupTemplate()
 {
     parent::setupTemplate();
     if (isset($this->fieldData['groupToEdit'])) {
         $gid = $this->fieldData['groupToEdit'];
     } else {
         $gid = null;
     }
     $this->assignCustomFields('groups', $gid);
     $this->assign('id', $gid);
     if (isset($this->fieldData['groupToEdit'])) {
         $this->assign('treeUser', 'group');
         $this->assign('userinfo', $this->getUserInfoForGroup($gid));
         $this->assign('groupname', AuthUtil::getGroupname($gid));
     }
     $this->assign('groups', AuthUtil::getGroupList());
 }