/** * (non-PHPdoc) * @see SpecialEPFormPage::getFormFields() * @return array */ protected function getFormFields() { $fields = parent::getFormFields(); $fields['name'] = array('type' => 'text', 'label-message' => 'educationprogram-org-edit-name', 'maxlength' => 255, 'required' => true, 'validation-callback' => function ($value, array $alldata = null) { return strlen($value) < 2 ? wfMsg('educationprogram-org-invalid-name') : true; }); $fields['city'] = array('type' => 'text', 'label-message' => 'educationprogram-org-edit-city', 'required' => true, 'validation-callback' => function ($value, array $alldata = null) { return strlen($value) < 2 ? wfMsg('educationprogram-org-invalid-city') : true; }); $fields['country'] = array('type' => 'select', 'label-message' => 'educationprogram-org-edit-country', 'maxlength' => 255, 'required' => true, 'options' => EPUtils::getCountryOptions($this->getLanguage()->getCode()), 'validation-callback' => array($this, 'countryIsValid')); return $this->processFormFields($fields); }
/** * (non-PHPdoc) * @see EPPager::getFilterOptions() */ protected function getFilterOptions() { return array('country' => array('type' => 'select', 'options' => EPUtils::getCountryOptions($this->getLanguage()->getCode()), 'value' => ''), 'active' => array('type' => 'select', 'options' => array('' => '', wfMsg('eporgpager-yes') => '1', wfMsg('eporgpager-no') => '0'), 'value' => '')); }