예제 #1
0
 public static function newTracker()
 {
     $form = new PHPWS_Form('tracker');
     $form->addHidden('module', 'analytics');
     $form->addHidden('command', 'create');
     $form->addSubmit('submit', dgettext('analytics', 'Next'));
     $classes = TrackerFactory::getAvailableClasses();
     $trackers = array();
     foreach ($classes as $class) {
         $trackers[$class] = $class;
     }
     $form->addSelect('tracker', $trackers);
     $form->setLabel('tracker', dgettext('analytics', 'Tracker'));
     $form->setRequired('tracker');
     $tpl = $form->getTemplate();
     return PHPWS_Template::process($tpl, 'analytics', 'select.tpl');
 }