private function getForm() { $data = array('username' => array(GWF_Form::STRING, '', $this->module->lang('th_username'), $this->module->lang('tt_username', array(GWF_User::USERNAME_LENGTH))), 'password' => array(GWF_Form::PASSWORD, '', $this->module->lang('th_password'), $this->module->lang('tt_password'))); if ($this->module->wantEmailActivation()) { $data['email'] = array(GWF_Form::STRING, '', $this->module->lang('th_email'), $this->module->lang('tt_email')); } if ($this->module->hasMinAge()) { $data['birthdate'] = array(GWF_Form::DATE, 0, $this->module->lang('th_birthdate'), '', GWF_Date::LEN_DAY); } if ($this->module->wantCountrySelect()) { $cid = isset($_POST['countryid']) ? $_POST['countryid'] : GWF_IP2Country::detectCountryID(); $data['countryid'] = array(GWF_Form::SELECT, GWF_CountrySelect::single('countryid', $cid), $this->module->lang('th_countryid')); } if ($this->module->isTOSForced()) { if ('' !== ($href_tos = $this->module->cfgHrefTos())) { $data['tos'] = array(GWF_Form::CHECKBOX, false, $this->module->lang('th_tos2', array(htmlspecialchars($href_tos)))); } else { $data['tos'] = array(GWF_Form::CHECKBOX, false, $this->module->lang('th_tos')); } $data['eula'] = array(GWF_Form::VALIDATOR); } if ($this->module->wantCaptcha()) { $data['captcha'] = array(GWF_Form::CAPTCHA); } $data['register'] = array(GWF_Form::SUBMIT, $this->module->lang('btn_register')); return new GWF_Form($this, $data); }
public function validate_country(Module_Admin $module, $arg) { return GWF_CountrySelect::validate_countryid($arg, true); }
public function getCountrySelect($name = 'country') { return GWF_CountrySelect::single($name, Common::getPostString($name, $this->getCountryID())); }
public function validate_site_country(Module_WeChall $m, $arg) { return GWF_CountrySelect::validate_countryid($arg, false); }
private static function getObjectSelect(GWF_Module $module, GDO $gdo, $c, $classname) { if ($classname === 'GWF_Country') { return GWF_CountrySelect::single($c, $gdo->getVar($c)); } die('Unsupported object in GWF_FormGDO::getObjectSelect: ' . $classname); }
public static function validate_country(Module_Usergroups $m, $v) { return GWF_CountrySelect::validate_countryid($v, true); }