Exemplo n.º 1
0
 private function getForm(WC_Challenge $chall)
 {
     $buttons = array('edit' => $this->module->lang('btn_edit'), 'reset' => $this->module->lang('btn_reset'), 'delete' => $this->module->lang('btn_delete'));
     $data = array('score' => array(GWF_Form::INT, $chall->getVar('chall_score'), $this->module->lang('th_chall_score')), 'title' => array(GWF_Form::STRING, $chall->getVar('chall_title'), $this->module->lang('th_chall_title')), 'tags' => array(GWF_Form::STRING, $chall->getVar('chall_tags'), $this->module->lang('th_chall_tags')), 'url' => array(GWF_Form::STRING, $chall->getVar('chall_url'), $this->module->lang('th_chall_url')), 'solution' => array(GWF_Form::STRING, '', $this->module->lang('th_chall_solution')), 'creators' => array(GWF_Form::STRING, $chall->getVar('chall_creator_name'), $this->module->lang('th_chall_creator_name')), 'case_i' => array(GWF_Form::CHECKBOX, $chall->isCaseI(), $this->module->lang('th_chall_case_i')), 'cmd' => array(GWF_Form::SUBMITS, $buttons));
     return new GWF_Form($this, $data);
 }