Exemplo n.º 1
0
 private function formEdit(WC_Warbox $box)
 {
     $data = array('name' => array(GWF_Form::STRING, $box->getVar('wb_name'), $this->l('th_wb_name')), 'url' => array(GWF_Form::STRING, $box->getVar('wb_weburl'), $this->l('th_wb_url')), 'host' => array(GWF_Form::STRING, $box->getVar('wb_host'), $this->l('th_wb_host')), 'port' => array(GWF_Form::INT, $box->getVar('wb_port'), $this->l('th_wb_port')), 'user' => array(GWF_Form::STRING, $box->getVar('wb_user'), $this->l('th_wb_user')), 'pass' => array(GWF_Form::STRING, $box->getVar('wb_pass'), $this->l('th_wb_pass')), 'wlist' => array(GWF_Form::STRING, $box->getVar('wb_whitelist'), $this->l('th_wb_wlist')), 'blist' => array(GWF_Form::STRING, $box->getVar('wb_blacklist'), $this->l('th_wb_blist')), 'launch' => array(GWF_Form::DATE, $box->getVar('wb_launched_at'), $this->l('th_wb_launch'), '', 8), 'status' => array(GWF_Form::ENUM, $box->getVar('wb_status'), $this->l('th_wb_status'), '', $this->statusValues()), 'warbox' => array(GWF_Form::CHECKBOX, $box->isWarbox(), $this->l('th_warbox')), 'multi' => array(GWF_Form::CHECKBOX, $box->isMultisolve(), $this->l('th_multisolve')), 'buttons' => array(GWF_Form::SUBMITS, array('edit' => $this->l('btn_edit_warbox'), 'flags' => $this->l('btn_edit_warflags'))));
     return new GWF_Form($this, $data);
 }