示例#1
0
 public function init()
 {
     $this->setAttrib('class', 'horizontal-form');
     $elements = array();
     $elements[] = $this->createElement('hidden', 'id_fp_contract')->setDecorators(array('ViewHelper'));
     $elements[] = $this->createElement('hidden', 'fk_id_annual_planning')->setDecorators(array('ViewHelper'));
     $elements[] = $this->createElement('hidden', 'fk_id_perscholarity')->setDecorators(array('ViewHelper'));
     $elements[] = $this->createElement('hidden', 'fk_id_planning_course')->setDecorators(array('ViewHelper'));
     $elements[] = $this->createElement('hidden', 'fk_id_fefop_contract')->setDecorators(array('ViewHelper'));
     $elements[] = $this->createElement('hidden', 'fk_id_unit_cost')->setDecorators(array('ViewHelper'));
     $elements[] = $this->createElement('hidden', 'fk_id_fefpstudentclass')->setDecorators(array('ViewHelper'));
     $elements[] = $this->createElement('hidden', 'fk_id_fefpeduinstitution')->setDecorators(array('ViewHelper'));
     $elements[] = $this->createElement('hidden', 'id_budget_category')->setDecorators(array('ViewHelper'));
     $elements[] = $this->createElement('hidden', 'cost_client')->setIsArray(true);
     $elements[] = $this->createElement('hidden', 'client_handicapped')->setIsArray(true);
     $elements[] = $this->createElement('text', 'institute')->setDecorators($this->getDefaultElementDecorators())->setAttrib('readOnly', true)->setAttrib('class', 'm-wrap span12')->setLabel('Sentru ba formasaun ne\'ebé akreditadu')->setRequired(true);
     $elements[] = $this->createElement('text', 'class_name')->setDecorators($this->getDefaultElementDecorators())->setAttrib('readOnly', true)->setAttrib('class', 'm-wrap span12')->setLabel('Turma')->setRequired(true);
     $elements[] = $this->createElement('text', 'scholarity')->setDecorators($this->getDefaultElementDecorators())->setAttrib('readOnly', true)->setAttrib('class', 'm-wrap span12')->setLabel('Kursu')->setRequired(true);
     $elements[] = $this->createElement('text', 'amount')->setDecorators($this->getDefaultElementDecorators())->setAttrib('readOnly', true)->setAttrib('class', 'm-wrap span6 money-mask')->setLabel('Total')->setRequired(true);
     $elements[] = $this->createElement('text', 'unit_cost')->setDecorators($this->getDefaultElementDecorators())->setAttrib('readOnly', true)->setAttrib('class', 'm-wrap span6 money-mask')->setLabel('Kustu Unitariu')->setRequired(true);
     $dbDistrict = App_Model_DbTable_Factory::get('AddDistrict');
     $districts = $dbDistrict->fetchAll();
     $optCountry[''] = '';
     foreach ($districts as $district) {
         $optCountry[$district['id_adddistrict']] = $district['District'];
     }
     $elements[] = $this->createElement('select', 'fk_id_adddistrict')->setDecorators($this->getDefaultElementDecorators())->setAttrib('class', 'm-wrap span12')->addMultiOptions($optCountry)->setValue(Admin_Model_Mapper_SysUser::userCeopToDistrict())->setLabel('Distritu')->setRequired(true);
     $elements[] = $this->createElement('text', 'start_date')->setDecorators($this->getDefaultElementDecorators())->setAttrib('maxlength', 10)->setAttrib('readOnly', true)->setRequired(true)->setAttrib('class', 'm-wrap span12 date')->setLabel('Loron Inisiu');
     $elements[] = $this->createElement('text', 'finish_date')->setDecorators($this->getDefaultElementDecorators())->setAttrib('maxlength', 10)->setAttrib('class', 'm-wrap span12 date')->setAttrib('readOnly', true)->setRequired(true)->setLabel('Loron Remata');
     $this->addElements($elements);
     App_Form_Toolbar::build($this, self::ID);
     $this->setDecorators($this->getDefaultFormDecorators());
 }
示例#2
0
文件: User.php 项目: fredcido/simuweb
 public function init()
 {
     $this->setAttrib('class', 'horizontal-form');
     $elements = array();
     $elements[] = $this->createElement('hidden', 'id_sysuser')->setDecorators(array('ViewHelper'));
     $elements[] = $this->createElement('text', 'name')->setDecorators($this->getDefaultElementDecorators())->addFilter('StringTrim')->addFilter('StringToUpper')->setAttrib('maxlength', 200)->setAttrib('class', 'm-wrap span12 focused')->setLabel('Naran Usuario')->setRequired(true);
     $elements[] = $this->createElement('text', 'number_document')->setDecorators($this->getDefaultElementDecorators())->addFilter('StringTrim')->setAttrib('maxlength', 50)->setAttrib('class', 'm-wrap span12')->setLabel('Numeru Documento');
     //->setRequired( true );
     $elements[] = $this->createElement('text', 'login')->setDecorators($this->getDefaultElementDecorators())->addFilter('StringTrim')->addFilter('StringToUpper')->setAttrib('maxlength', 200)->setAttrib('class', 'm-wrap span12')->setLabel('Login')->setRequired(true);
     $elements[] = $this->createElement('password', 'password')->setDecorators($this->getDefaultElementDecorators())->setAttrib('maxlength', 100)->setAttrib('class', 'm-wrap span12')->setLabel('Password')->setRequired(true);
     $elements[] = $this->createElement('password', 'confirm_password')->setDecorators($this->getDefaultElementDecorators())->setAttrib('maxlength', 100)->setAttrib('class', 'm-wrap span12')->setLabel('Repete Password')->setRequired(true);
     $optRadio['1'] = 'Sim';
     $optRadio['0'] = 'Lai';
     $elements[] = $this->createElement('radio', 'active')->setDecorators($this->getDefaultElementDecorators())->setLabel('Ativu')->addMultiOptions($optRadio)->setAttrib('label_class', 'radio')->setSeparator('')->setValue(1)->setRequired(true);
     $dbDec = App_Model_DbTable_Factory::get('Dec');
     $rows = $dbDec->fetchAll(array(), array('name_dec'));
     $optCeop[''] = '';
     foreach ($rows as $row) {
         $optCeop[$row->id_dec] = $row->name_dec;
     }
     $elements[] = $this->createElement('select', 'fk_id_dec')->setDecorators($this->getDefaultElementDecorators())->setLabel('CEOP')->addMultiOptions($optCeop)->setAttrib('class', 'm-wrap span12')->setRequired(true);
     $this->addElements($elements);
     App_Form_Toolbar::build($this, self::ID);
     $this->setDecorators($this->getDefaultFormDecorators());
 }
示例#3
0
 public function init()
 {
     $this->setAttrib('class', 'horizontal-form');
     $elements = array();
     $elements[] = $this->createElement('hidden', 'fk_id_perdata')->setAttrib('class', 'no-clear')->setDecorators(array('ViewHelper'));
     $elements[] = $this->createElement('hidden', 'step')->setDecorators(array('ViewHelper'))->setAttrib('class', 'no-clear')->setValue('knowledge');
     $dbTypeLanguage = App_Model_DbTable_Factory::get('PerTypeKnowledge');
     $typesKnowledge = $dbTypeLanguage->fetchAll(array(), array('type_knowledge'));
     $optTypeKnowledges[''] = '';
     foreach ($typesKnowledge as $typeKnowledge) {
         $optTypeKnowledges[$typeKnowledge['id_pertypeknowledge']] = $typeKnowledge['type_knowledge'];
     }
     $elements[] = $this->createElement('select', 'fk_id_pertypeknowlegde')->setDecorators($this->getDefaultElementDecorators())->setAttrib('class', 'm-wrap span12 chosen')->setLabel('Tipu Konesimentu')->setRequired(true)->addMultiOptions($optTypeKnowledges);
     $dbKnowledge = App_Model_DbTable_Factory::get('PerKnowledge');
     $knowledges = $dbKnowledge->fetchAll(array(), array('name_knowledge'));
     $optKnowledge[''] = '';
     foreach ($knowledges as $knowledge) {
         $optKnowledge[$knowledge['id_perknowledge']] = $knowledge['name_knowledge'];
     }
     $elements[] = $this->createElement('select', 'fk_id_perknowledge')->setDecorators($this->getDefaultElementDecorators())->setAttrib('class', 'm-wrap span12 chosen')->setLabel('Koñesimentu')->setRequired(true)->addMultiOptions($optKnowledge);
     $dbLevelKnowledge = App_Model_DbTable_Factory::get('PerLevelKnowledge');
     $levels = $dbLevelKnowledge->fetchAll(array(), array('name_level'));
     $optLevel[''] = '';
     foreach ($levels as $level) {
         $optLevel[$level['id_levelknowledge']] = $level['name_level'] . ' - ' . $level['description'];
     }
     $elements[] = $this->createElement('select', 'fk_id_levelknowledge')->setDecorators($this->getDefaultElementDecorators())->setAttrib('class', 'm-wrap span12 chosen')->setLabel('Nivel Koñesimentu')->setRequired(true)->addMultiOptions($optLevel);
     $elements[] = $this->createElement('textarea', 'comment')->setDecorators($this->getDefaultElementDecorators())->addFilter('StringTrim')->addFilter('StringToUpper')->setAttrib('class', 'span12')->setAttrib('cols', 100)->setAttrib('rows', 4)->setLabel('Komentariu');
     App_Form_Toolbar::build($this, self::ID);
     $this->addElements($elements);
 }
示例#4
0
 public function init()
 {
     $this->setAttrib('class', 'horizontal-form');
     $elements = array();
     $elements[] = $this->createElement('hidden', 'id_drh_contract')->setDecorators(array('ViewHelper'));
     $elements[] = $this->createElement('hidden', 'fk_id_drh_trainingplan')->setDecorators(array('ViewHelper'));
     $elements[] = $this->createElement('hidden', 'fk_id_fefop_contract')->setDecorators(array('ViewHelper'));
     $elements[] = $this->createElement('hidden', 'fk_id_drh_beneficiary')->setDecorators(array('ViewHelper'));
     $elements[] = $this->createElement('hidden', 'fk_id_perdata')->setDecorators(array('ViewHelper'));
     $elements[] = $this->createElement('hidden', 'expense')->setIsArray(true);
     $elements[] = $this->createElement('text', 'num_training_plan')->setDecorators($this->getDefaultElementDecorators())->setAttrib('readOnly', true)->setRequired(true)->setAttrib('class', 'm-wrap span12')->setLabel('Plano ba Formasaun');
     $elements[] = $this->createElement('text', 'modality')->setDecorators($this->getDefaultElementDecorators())->setAttrib('readOnly', true)->setRequired(true)->setAttrib('class', 'm-wrap span12')->setLabel('Modalidade');
     $elements[] = $this->createElement('text', 'scholarity_area')->setDecorators($this->getDefaultElementDecorators())->setAttrib('readOnly', true)->setRequired(true)->setAttrib('class', 'm-wrap span12')->setLabel('Área');
     $elements[] = $this->createElement('text', 'ocupation_name_timor')->setDecorators($this->getDefaultElementDecorators())->setAttrib('readOnly', true)->setRequired(true)->setAttrib('class', 'm-wrap span12')->setLabel('Dezignasaun');
     $elements[] = $this->createElement('text', 'country')->setDecorators($this->getDefaultElementDecorators())->setAttrib('readOnly', true)->setRequired(true)->setAttrib('class', 'm-wrap span12')->setLabel('Nasaun');
     $elements[] = $this->createElement('text', 'city')->setDecorators($this->getDefaultElementDecorators())->setRequired(true)->setAttrib('class', 'm-wrap span12')->setAttrib('readonly', true)->setLabel('Sidade');
     $elements[] = $this->createElement('text', 'entity')->setDecorators($this->getDefaultElementDecorators())->setRequired(true)->setAttrib('class', 'm-wrap span12')->setAttrib('readonly', true)->setLabel('Sentru Formasaun');
     $elements[] = $this->createElement('text', 'training_provider')->setDecorators($this->getDefaultElementDecorators())->setRequired(true)->setAttrib('class', 'm-wrap span12')->setAttrib('readonly', true)->setLabel('Entidade responsável ba formasaun');
     $elements[] = $this->createElement('text', 'beneficiary')->setDecorators($this->getDefaultElementDecorators())->setRequired(true)->setAttrib('class', 'm-wrap span12')->setAttrib('readonly', true)->setLabel('Benefisiáriu ikus');
     $elements[] = $this->createElement('text', 'date_start')->setDecorators($this->getDefaultElementDecorators())->setAttrib('maxlength', 10)->setRequired(true)->setAttrib('class', 'm-wrap span12 date-mask')->setLabel('Data hahú');
     $elements[] = $this->createElement('text', 'date_finish')->setDecorators($this->getDefaultElementDecorators())->setAttrib('maxlength', 10)->setAttrib('class', 'm-wrap span12 date-mask')->setRequired(true)->setLabel('Data finalizasaun');
     $elements[] = $this->createElement('text', 'duration_days')->setDecorators($this->getDefaultElementDecorators())->setRequired(true)->setAttrib('class', 'm-wrap span12')->setAttrib('readonly', true)->setLabel('Durasaun');
     $dbDistrict = App_Model_DbTable_Factory::get('AddDistrict');
     $districts = $dbDistrict->fetchAll();
     $optCountry[''] = '';
     foreach ($districts as $district) {
         $optCountry[$district['id_adddistrict']] = $district['District'];
     }
     $elements[] = $this->createElement('select', 'fk_id_adddistrict')->setDecorators($this->getDefaultElementDecorators())->setAttrib('class', 'm-wrap span12')->addMultiOptions($optCountry)->setValue(Admin_Model_Mapper_SysUser::userCeopToDistrict())->setLabel('Distritu')->setRequired(true);
     $this->addElements($elements);
     App_Form_Toolbar::build($this, self::ID);
     $this->setDecorators($this->getDefaultFormDecorators());
 }
示例#5
0
 public function init()
 {
     $this->setAttrib('class', 'horizontal-form');
     $elements = array();
     $elements[] = $this->createElement('hidden', 'id_perscholarity')->setDecorators(array('ViewHelper'));
     $mapperTypeScholarity = new Register_Model_Mapper_PerTypeScholarity();
     $sections = $mapperTypeScholarity->fetchAll();
     $optTypeScholarity[''] = '';
     foreach ($sections as $section) {
         $optTypeScholarity[$section['id_pertypescholarity']] = $section['type_scholarity'];
     }
     $elements[] = $this->createElement('select', 'fk_id_pertypescholarity')->setDecorators($this->getDefaultElementDecorators())->setAttrib('class', 'm-wrap span12 chosen')->setLabel('Tipu Kursu')->addMultiOptions($optTypeScholarity)->setRequired(true);
     $mapperScholarityArea = new Register_Model_Mapper_ScholarityArea();
     $sections = $mapperScholarityArea->fetchAll();
     $optScholarityArea[''] = '';
     foreach ($sections as $section) {
         $optScholarityArea[$section['id_scholarity_area']] = $section['scholarity_area'];
     }
     $elements[] = $this->createElement('select', 'fk_id_scholarity_area')->setDecorators($this->getDefaultElementDecorators())->setAttrib('class', 'm-wrap span12 chosen focused')->setLabel('Area Kursu')->addMultiOptions($optScholarityArea)->setRequired(true);
     $elements[] = $this->createElement('text', 'scholarity')->setDecorators($this->getDefaultElementDecorators())->addFilter('StringTrim')->addFilter('StringToUpper')->setAttrib('maxlength', 200)->setAttrib('class', 'm-wrap span12')->setLabel('Naran Kursu')->setRequired(true);
     $elements[] = $this->createElement('text', 'Title')->setDecorators($this->getDefaultElementDecorators())->addFilter('StringTrim')->addFilter('StringToUpper')->setAttrib('maxlength', 200)->setAttrib('class', 'm-wrap span12')->setLabel('Titulu');
     $elements[] = $this->createElement('select', 'fk_id_perlevelscholarity')->setDecorators($this->getDefaultElementDecorators())->setAttrib('maxlength', 200)->setRegisterInArrayValidator(false)->setAttrib('class', 'm-wrap span12 chosen')->setLabel('Nivel');
     $elements[] = $this->createElement('select', 'category')->setDecorators($this->getDefaultElementDecorators())->setAttrib('maxlength', 200)->setAttrib('class', 'm-wrap span12 chosen')->setRegisterInArrayValidator(false)->setRequired(true)->setLabel('Kategoria');
     $elements[] = $this->createElement('text', 'external_code')->setDecorators($this->getDefaultElementDecorators())->addFilter('StringTrim')->addFilter('StringToUpper')->setAttrib('maxlength', 50)->setAttrib('class', 'm-wrap span12')->setLabel('Kodigu Esterno');
     $this->addElements($elements);
     App_Form_Toolbar::build($this, self::ID);
     $this->setDecorators($this->getDefaultFormDecorators());
 }
示例#6
0
 public function init()
 {
     $this->setAttrib('class', 'horizontal-form');
     $elements = array();
     $elements[] = $this->createElement('hidden', 'fk_id_jobvacancy')->setAttrib('class', 'no-clear')->setDecorators(array('ViewHelper'));
     $elements[] = $this->createElement('hidden', 'id_relationship')->setDecorators(array('ViewHelper'));
     $elements[] = $this->createElement('hidden', 'step')->setDecorators(array('ViewHelper'))->setAttrib('class', 'no-clear')->setValue('address');
     $mapperCountry = new Register_Model_Mapper_AddCountry();
     $countries = $mapperCountry->fetchAll();
     $optNations[''] = '';
     foreach ($countries as $country) {
         $optNations[$country['id_addcountry']] = $country['country'];
     }
     $elements[] = $this->createElement('select', 'fk_id_addcountry')->setDecorators($this->getDefaultElementDecorators())->setAttrib('class', 'm-wrap span12 chosen')->setLabel('Nasaun')->setRequired(true)->addMultiOptions($optNations);
     // List Districts just from Timor
     $mapperDistrict = new Register_Model_Mapper_AddDistrict();
     $districts = $mapperDistrict->listAll(1);
     $optDistrict[''] = '';
     foreach ($districts as $district) {
         $optDistrict[$district->id_adddistrict] = $district->District;
     }
     $elements[] = $this->createElement('select', 'fk_id_adddistrict')->setDecorators($this->getDefaultElementDecorators())->setAttrib('class', 'm-wrap span12 chosen')->addMultiOptions($optDistrict)->setLabel('Distritu')->setRegisterInArrayValidator(false);
     $elements[] = $this->createElement('select', 'fk_id_addsubdistrict')->setDecorators($this->getDefaultElementDecorators())->setAttrib('class', 'm-wrap span12 chosen')->setRegisterInArrayValidator(false)->setLabel('Sub-Distritu');
     App_Form_Toolbar::build($this, self::ID);
     $this->addElements($elements);
 }
示例#7
0
 public function init()
 {
     $this->setAttrib('class', 'horizontal-form');
     $elements = array();
     $elements[] = $this->createElement('hidden', 'id_campaign')->setDecorators(array('ViewHelper'));
     $elements[] = $this->createElement('hidden', 'fk_id_department')->setDecorators(array('ViewHelper'));
     $elements[] = $this->createElement('text', 'campaign_title')->setDecorators($this->getDefaultElementDecorators())->addFilter('StringTrim')->addFilter('StringToUpper')->setAttrib('maxlength', 200)->setAttrib('class', 'm-wrap span12 focused')->setLabel('Naran Kampanha')->setRequired(true);
     $mapperConfig = new Admin_Model_Mapper_SmsConfig();
     $config = $mapperConfig->getConfig();
     $maxLength = $config->max_length - (strlen($config->sms_prefix) + strlen($config->sms_sufix) + 16);
     $elements[] = $this->createElement('textarea', 'content')->setDecorators($this->getDefaultElementDecorators())->addFilter('StringTrim')->setAttrib('class', 'm-wrap span12')->setAttrib('rows', 3)->setAttrib('maxlength', $maxLength)->setLabel('Mensajem')->setRequired(true);
     $elements[] = $this->createElement('text', 'date_scheduled')->setDecorators($this->getDefaultElementDecorators())->setAttrib('maxlength', 10)->setAttrib('class', 'm-wrap span12 date-mask date')->setLabel('Data atu haruka');
     $dbCampaignType = App_Model_DbTable_Factory::get('CampaignType');
     $rows = $dbCampaignType->fetchAll(array(), array('campaign_type'));
     $optCampaignType[''] = '';
     foreach ($rows as $row) {
         $optCampaignType[$row->id_campaign_type] = $row->campaign_type;
     }
     $elements[] = $this->createElement('select', 'fk_id_campaign_type')->setDecorators($this->getDefaultElementDecorators())->setLabel('Tipu Kampanha')->addMultiOptions($optCampaignType)->setRequired(true)->setAttrib('class', 'm-wrap span12 chosen');
     $mapperGroup = new Sms_Model_Mapper_Group();
     $rows = $mapperGroup->listGroupWithTotals();
     $optGroups = array();
     foreach ($rows as $row) {
         $optGroups[$row['id_sms_group']] = $row['sms_group_name'] . ' (' . $row['total'] . ')';
     }
     $elements[] = $this->createElement('multiCheckbox', 'group')->setDecorators(array('ViewHelper'))->addMultiOptions($optGroups)->setAttrib('onchange', 'Sms.Campaign.calcTotalSending( this );')->setAttrib('class', 'group-sending')->setRequired(true)->setSeparator('');
     $optWaitResponse['0'] = 'Lae';
     $optWaitResponse['1'] = 'Loos';
     $elements[] = $this->createElement('select', 'wait_response')->setDecorators($this->getDefaultElementDecorators())->setLabel('Hein Resposta')->addMultiOptions($optWaitResponse)->setValue('0')->setRequired(true)->setAttrib('class', 'm-wrap span12');
     $this->addElements($elements);
     App_Form_Toolbar::build($this, self::ID);
     $this->setDecorators($this->getDefaultFormDecorators());
 }
示例#8
0
 public function init()
 {
     $this->setAttrib('class', 'horizontal-form');
     $elements = array();
     $elements[] = $this->createElement('text', 'start_date')->setDecorators($this->getDefaultElementDecorators())->setAttrib('maxlength', 10)->setAttrib('readonly', true)->setRequired(true)->setAttrib('class', 'm-wrap span12')->setLabel('Data Iniciu');
     $elements[] = $this->createElement('text', 'finish_date')->setDecorators($this->getDefaultElementDecorators())->setAttrib('maxlength', 10)->setAttrib('readonly', true)->setRequired(true)->setAttrib('class', 'm-wrap span12')->setLabel('Data Fim');
     $mapperSysUser = new Admin_Model_Mapper_SysUser();
     $users = $mapperSysUser->listAll();
     $optUsers[''] = '';
     foreach ($users as $user) {
         $optUsers[$user['id_sysuser']] = $user['name'];
     }
     $elements[] = $this->createElement('select', 'fk_id_sysuser')->setDecorators($this->getDefaultElementDecorators())->setAttrib('class', 'm-wrap span12 chosen')->setLabel('Usuariu')->addMultiOptions($optUsers)->setRequired(true);
     $elements[] = $this->createElement('text', 'description')->setDecorators($this->getDefaultElementDecorators())->addFilter('StringTrim')->addFilter('StringToUpper')->setAttrib('maxlength', 200)->setAttrib('class', 'm-wrap span12')->setLabel('Deskrisaun');
     $dbModule = App_Model_DbTable_Factory::get('SysModule');
     $modules = $dbModule->fetchAll(array(), array('module'));
     $optModule[''] = '';
     foreach ($modules as $module) {
         $optModule[$module['id_sysmodule']] = $module['module'];
     }
     $elements[] = $this->createElement('select', 'fk_id_sysmodule')->setDecorators($this->getDefaultElementDecorators())->setAttrib('class', 'm-wrap span12 chosen')->setLabel('Modulu')->addMultiOptions($optModule);
     $elements[] = $this->createElement('select', 'fk_id_sysform')->setDecorators($this->getDefaultElementDecorators())->setAttrib('class', 'm-wrap span12 chosen')->setRegisterInArrayValidator(false)->setLabel('Formulariu');
     $this->addElements($elements);
     App_Form_Toolbar::build($this, self::ID);
 }
 public function init()
 {
     $this->setAttrib('class', 'horizontal-form');
     $elements = array();
     $elements[] = $this->createElement('hidden', 'fk_id_fefpeduinstitution')->setDecorators(array('ViewHelper'))->setAttrib('class', 'no-clear');
     $elements[] = $this->createElement('hidden', 'id_relationship')->setDecorators(array('ViewHelper'));
     $elements[] = $this->createElement('hidden', 'step')->setDecorators(array('ViewHelper'))->setAttrib('class', 'no-clear')->setValue('course');
     $elements[] = $this->createElement('hidden', 'scholarity_classification')->setDecorators(array('ViewHelper'))->setValue('course');
     $mapperTypeScholarity = new Register_Model_Mapper_PerTypeScholarity();
     $sections = $mapperTypeScholarity->fetchAll();
     $optTypeScholarity[''] = '';
     foreach ($sections as $section) {
         $optTypeScholarity[$section['id_pertypescholarity']] = $section['type_scholarity'];
     }
     $elements[] = $this->createElement('select', 'fk_id_pertypescholarity')->setDecorators($this->getDefaultElementDecorators())->setAttrib('class', 'm-wrap span12 chosen')->setLabel('Tipu Kursu')->addMultiOptions($optTypeScholarity)->setRequired(true);
     $elements[] = $this->createElement('select', 'category')->setDecorators($this->getDefaultElementDecorators())->setAttrib('maxlength', 200)->setAttrib('class', 'm-wrap span12 chosen')->setRequired(true)->setRegisterInArrayValidator(false)->setLabel('Kategoria');
     $elements[] = $this->createElement('select', 'fk_id_scholarity')->setDecorators($this->getDefaultElementDecorators())->setAttrib('class', 'm-wrap span12 chosen')->setLabel('Kursu')->setRegisterInArrayValidator(false)->setRequired(true);
     /*
     	$optClassification[''] = '';
     	$optClassification['R'] = 'Rejistrasaun';
     	//$optClassification['A'] = 'Acreditasaun';
     	$optClassification['C'] = 'Formasaun Comunitaria';
     	
     	$elements[] = $this->createElement( 'select', 'classification' )
     			    ->setDecorators( $this->getDefaultElementDecorators() )
     			    ->setAttrib( 'class', 'm-wrap span12' )
     			    ->setLabel( 'Klasifikasaun' )
     			    ->addMultiOptions( $optClassification );
     */
     App_Form_Toolbar::build($this, self::ID);
     $this->addElements($elements);
 }
 public function init()
 {
     $this->setAttrib('class', 'horizontal-form');
     $elements = array();
     $elements[] = $this->createElement('hidden', 'fk_id_perdata')->setAttrib('class', 'no-clear')->setDecorators(array('ViewHelper'));
     $elements[] = $this->createElement('hidden', 'step')->setDecorators(array('ViewHelper'))->setAttrib('class', 'no-clear')->setValue('nonFormalScholarity');
     $elements[] = $this->createElement('hidden', 'fk_id_pertypescholarity')->setDecorators(array('ViewHelper'))->setValue(2)->setAttrib('class', 'no-clear');
     $mapperScholarity = new Register_Model_Mapper_PerScholarity();
     $optCategory = $mapperScholarity->getOptionsCategory(Register_Model_Mapper_PerTypeScholarity::NON_FORMAL);
     $elements[] = $this->createElement('select', 'category')->setDecorators($this->getDefaultElementDecorators())->setAttrib('maxlength', 200)->setAttrib('class', 'm-wrap span12 chosen')->setRequired(true)->addMultiOptions($optCategory)->setLabel('Kategoria');
     $elements[] = $this->createElement('select', 'fk_id_perscholarity')->setDecorators($this->getDefaultElementDecorators())->setAttrib('class', 'm-wrap span12 chosen')->setRegisterInArrayValidator(false)->setRequired(true)->setLabel('Kursu');
     // Search just for Non Formal Education Institute
     $filters['fk_id_pertypescholarity'] = Register_Model_Mapper_PerTypeScholarity::NON_FORMAL;
     $mapperEducationInsitute = new Register_Model_Mapper_EducationInstitute();
     $rows = $mapperEducationInsitute->listByFilters($filters);
     $optEducationInstitute[''] = '';
     foreach ($rows as $row) {
         $optEducationInstitute[$row->id_fefpeduinstitution] = $row->institution;
     }
     $elements[] = $this->createElement('select', 'fk_id_fefpeduinstitution')->setDecorators($this->getDefaultElementDecorators())->setLabel('Instituisaun Ensinu')->addMultiOptions($optEducationInstitute)->setRequired(true)->setAttrib('class', 'm-wrap span12 chosen');
     $elements[] = $this->createElement('text', 'start_date')->setDecorators($this->getDefaultElementDecorators())->setAttrib('maxlength', 10)->setRequired(true)->setAttrib('class', 'm-wrap span12 date-mask')->setLabel('Data Iniciu');
     $elements[] = $this->createElement('text', 'finish_date')->setDecorators($this->getDefaultElementDecorators())->setAttrib('maxlength', 10)->setRequired(true)->setAttrib('class', 'm-wrap span12 date-mask')->setLabel('Data Fim');
     App_Form_Toolbar::build($this, self::ID);
     $this->addElements($elements);
 }
示例#11
0
 public function init()
 {
     $this->setAttrib('class', 'horizontal-form');
     $elements = array();
     $elements[] = $this->createElement('hidden', 'id_action_barrier')->setIsArray(true);
     $elements[] = $this->createElement('hidden', 'fk_id_barrier_type')->setIsArray(true);
     $elements[] = $this->createElement('hidden', 'fk_id_barrier_name')->setIsArray(true);
     $elements[] = $this->createElement('hidden', 'fk_id_barrier_intervention')->setIsArray(true);
     $elements[] = $this->createElement('hidden', 'id_action_plan')->setAttrib('class', 'no-clear')->setDecorators(array('ViewHelper'));
     $elements[] = $this->createElement('hidden', 'fk_id_perdata')->setAttrib('class', 'no-clear')->setDecorators(array('ViewHelper'));
     $elements[] = $this->createElement('hidden', 'step')->setDecorators(array('ViewHelper'))->setAttrib('class', 'no-clear')->setValue('actionPlan');
     $dbUser = App_Model_DbTable_Factory::get('SysUser');
     $rows = $dbUser->fetchAll(array(), array('name'));
     $users[''] = '';
     foreach ($rows as $row) {
         $users[$row->id_sysuser] = $row->name . ' (' . $row->login . ')';
     }
     $elements[] = $this->createElement('select', 'fk_id_counselor')->setDecorators($this->getDefaultElementDecorators())->setAttrib('class', 'm-wrap span12 chosen')->setRequired(true)->setLabel('Konselleru')->addMultiOptions($users);
     $dbOccupationTimor = App_Model_DbTable_Factory::get('PROFOcupationTimor');
     $occupations = $dbOccupationTimor->fetchAll();
     $optOccupations[''] = '';
     foreach ($occupations as $occupation) {
         $optOccupations[$occupation['id_profocupationtimor']] = $occupation['acronym'] . ' ' . $occupation['ocupation_name_timor'];
     }
     $elements[] = $this->createElement('select', 'fk_id_profocupationtimor')->setDecorators($this->getDefaultElementDecorators())->setAttrib('class', 'm-wrap span12 chosen')->setLabel('Meta Empregu')->addMultiOptions($optOccupations)->setRequired(true);
     $elements[] = $this->createElement('textarea', 'observation')->setDecorators($this->getDefaultElementDecorators())->addFilter('StringTrim')->addFilter('StringToUpper')->setAttrib('rows', 3)->setAttrib('class', 'm-wrap span12')->setLabel('Observasaun');
     $printButton = $this->createElement('button', 'print_case')->setAttrib('type', 'button')->setAttrib('disabled', 'disabled')->setAttrib('onClick', 'Client.Case.printCase();')->setDecorators(array('ViewHelper'))->setAttrib('class', 'btn green')->setLabel('Imprime');
     App_Form_Toolbar::build($this, self::ID, array($printButton));
     $this->addElements($elements);
 }
示例#12
0
文件: Form.php 项目: fredcido/simuweb
 public function init()
 {
     $this->setAttrib('class', 'horizontal-form');
     $elements = array();
     $elements[] = $this->createElement('hidden', 'id_sysform')->setDecorators(array('ViewHelper'));
     $dbModule = App_Model_DbTable_Factory::get('SysModule');
     $modules = $dbModule->fetchAll(array(), array('module'));
     $optModule[''] = '';
     foreach ($modules as $module) {
         $optModule[$module['id_sysmodule']] = $module['module'];
     }
     $elements[] = $this->createElement('select', 'fk_id_sysmodule')->setDecorators($this->getDefaultElementDecorators())->setAttrib('class', 'm-wrap span12 focused')->setLabel('Modulu')->addMultiOptions($optModule)->setRequired(true);
     $elements[] = $this->createElement('text', 'form')->setDecorators($this->getDefaultElementDecorators())->addFilter('StringTrim')->addFilter('StringToUpper')->setAttrib('maxlength', 200)->setAttrib('class', 'm-wrap span12')->setLabel('Naran Formulário')->setRequired(true);
     $elements[] = $this->createElement('textarea', 'description')->setDecorators($this->getDefaultElementDecorators())->addFilter('StringTrim')->addFilter('StringToUpper')->setAttrib('class', 'span12 focused')->setAttrib('cols', 100)->setAttrib('rows', 5)->setLabel('Deskrisaun');
     $dbOperations = App_Model_DbTable_Factory::get('SysOperations');
     $operations = $dbOperations->fetchAll();
     $optOperations = array();
     foreach ($operations as $operation) {
         $optOperations[$operation->id_sysoperation] = $operation->operation;
     }
     $elements[] = $this->createElement('multiCheckbox', 'operations')->setDecorators($this->getDefaultElementDecorators())->addMultiOptions($optOperations)->setAttrib('class', 'm-wrap span12')->setSeparator('')->setLabel('Operações');
     $optRadio['1'] = 'Sim';
     $optRadio['0'] = 'Lai';
     $elements[] = $this->createElement('radio', 'active')->setDecorators($this->getDefaultElementDecorators())->setLabel('Ativu')->addMultiOptions($optRadio)->setAttrib('label_class', 'radio')->setSeparator('')->setValue(1)->setRequired(true);
     $this->addElements($elements);
     App_Form_Toolbar::build($this, self::ID);
 }
示例#13
0
 public function init()
 {
     $this->setAttrib('class', 'horizontal-form');
     $elements = array();
     $elements[] = $this->createElement('hidden', 'fk_id_jobvacancy')->setAttrib('class', 'no-clear')->setDecorators(array('ViewHelper'));
     $elements[] = $this->createElement('hidden', 'id_relationship')->setDecorators(array('ViewHelper'));
     $elements[] = $this->createElement('hidden', 'step')->setDecorators(array('ViewHelper'))->setAttrib('class', 'no-clear')->setValue('language');
     $dbLanguage = App_Model_DbTable_Factory::get('PerLanguage');
     $languages = $dbLanguage->fetchAll(array(), array('language'));
     $optLanguage[''] = '';
     foreach ($languages as $language) {
         $optLanguage[$language['id_perlanguage']] = $language['language'];
     }
     $elements[] = $this->createElement('select', 'fk_id_perlanguage')->setDecorators($this->getDefaultElementDecorators())->setAttrib('class', 'm-wrap span12 chosen')->setLabel('Lian Fuan')->setRequired(true)->addMultiOptions($optLanguage);
     $dbLevelKnowledge = App_Model_DbTable_Factory::get('PerLevelKnowledge');
     $levels = $dbLevelKnowledge->fetchAll(array(), array('name_level'));
     $optLevel[''] = '';
     foreach ($levels as $level) {
         $optLevel[$level['id_levelknowledge']] = $level['name_level'] . ' - ' . $level['description'];
     }
     $elements[] = $this->createElement('select', 'fk_id_levelknowledge')->setDecorators($this->getDefaultElementDecorators())->setAttrib('class', 'm-wrap span12 chosen')->setLabel('Nivel Koñesimentu')->setRequired(true)->addMultiOptions($optLevel);
     $optUsage[''] = '';
     $optUsage['KUALIA'] = 'KUALIA';
     $optUsage['HATENE'] = 'HATENE';
     $optUsage['HAKEREK'] = 'HAKEREK';
     $optUsage['LE'] = 'HATENE LE';
     $elements[] = $this->createElement('select', 'usage')->setDecorators($this->getDefaultElementDecorators())->setAttrib('class', 'm-wrap span12 chosen')->setLabel('Utilizasaun')->setRequired(true)->addMultiOptions($optUsage);
     App_Form_Toolbar::build($this, self::ID);
     $this->addElements($elements);
 }
示例#14
0
 public function init()
 {
     $this->setAttrib('class', 'horizontal-form');
     $elements = array();
     $elements[] = $this->createElement('hidden', 'id_ri_contract')->setDecorators(array('ViewHelper'));
     $elements[] = $this->createElement('hidden', 'fk_id_fefop_contract')->setDecorators(array('ViewHelper'));
     $elements[] = $this->createElement('hidden', 'fk_id_fefpeduinstitution')->setDecorators(array('ViewHelper'));
     $elements[] = $this->createElement('hidden', 'cost_expense')->setIsArray(true);
     $elements[] = $this->createElement('hidden', 'item_expense')->setIsArray(true);
     $elements[] = $this->createElement('hidden', 'quantity')->setIsArray(true);
     $elements[] = $this->createElement('hidden', 'amount_unit')->setIsArray(true);
     $elements[] = $this->createElement('hidden', 'amount_total')->setIsArray(true);
     $elements[] = $this->createElement('hidden', 'comments')->setIsArray(true);
     $elements[] = $this->createElement('text', 'institute')->setDecorators($this->getDefaultElementDecorators())->setAttrib('readOnly', true)->setRequired(true)->setAttrib('class', 'm-wrap span12 focused')->setLabel('Sentru Formasaun');
     $dbDistrict = App_Model_DbTable_Factory::get('AddDistrict');
     $districts = $dbDistrict->fetchAll();
     $optCountry[''] = '';
     foreach ($districts as $district) {
         $optCountry[$district['id_adddistrict']] = $district['District'];
     }
     $elements[] = $this->createElement('select', 'fk_id_adddistrict')->setDecorators($this->getDefaultElementDecorators())->setAttrib('class', 'm-wrap span12')->setValue(Admin_Model_Mapper_SysUser::userCeopToDistrict())->addMultiOptions($optCountry)->setLabel('Distritu')->setRequired(true);
     $elements[] = $this->createElement('select', 'fk_id_addsubdistrict')->setDecorators($this->getDefaultElementDecorators())->setAttrib('class', 'm-wrap span12')->setRegisterInArrayValidator(false)->setLabel('Sub-Distritu')->setRequired(true);
     $elements[] = $this->createElement('text', 'date_start')->setDecorators($this->getDefaultElementDecorators())->setAttrib('maxlength', 10)->setRequired(true)->setAttrib('class', 'm-wrap span12 date-mask')->setLabel('Loron Inisiu');
     $elements[] = $this->createElement('text', 'date_finish')->setDecorators($this->getDefaultElementDecorators())->setAttrib('maxlength', 10)->setAttrib('class', 'm-wrap span12 date-mask')->setRequired(true)->setLabel('Loron Remata');
     $elements[] = $this->createElement('text', 'amount')->setDecorators($this->getDefaultElementDecorators())->setAttrib('readOnly', true)->removeDecorator('Label')->setAttrib('class', 'm-wrap span12 money-mask required')->setLabel('Total')->setRequired(true);
     $this->addElements($elements);
     App_Form_Toolbar::build($this, self::ID);
     $this->setDecorators($this->getDefaultFormDecorators());
 }
示例#15
0
 public function init()
 {
     $this->setAttrib('class', 'horizontal-form');
     $elements = array();
     $elements[] = $this->createElement('hidden', 'id_action_plan_group')->setAttrib('class', 'no-clear')->setDecorators(array('ViewHelper'));
     $elements[] = $this->createElement('hidden', 'step')->setDecorators(array('ViewHelper'))->setAttrib('class', 'no-clear')->setValue('caseGroup');
     $dbUser = App_Model_DbTable_Factory::get('SysUser');
     $rows = $dbUser->fetchAll(array('fk_id_dec = ?' => Zend_Auth::getInstance()->getIdentity()->fk_id_dec), array('name'));
     $users[''] = '';
     foreach ($rows as $row) {
         $users[$row->id_sysuser] = $row->name . ' (' . $row->login . ')';
     }
     $elements[] = $this->createElement('select', 'fk_id_counselor')->setDecorators($this->getDefaultElementDecorators())->setAttrib('class', 'm-wrap span12 chosen')->setRequired(true)->setLabel('Konselleru')->addMultiOptions($users);
     $mapperEducationInsitute = new Register_Model_Mapper_EducationInstitute();
     $rows = $mapperEducationInsitute->listByFilters();
     $optEducationInstitute[''] = '';
     foreach ($rows as $row) {
         $optEducationInstitute[$row->id_fefpeduinstitution] = $row->institution;
     }
     $elements[] = $this->createElement('select', 'fk_id_fefpeduinstitution')->setDecorators($this->getDefaultElementDecorators())->setLabel('Instituisaun Ensinu')->addMultiOptions($optEducationInstitute)->setAttrib('onchange', 'Client.CaseGroup.setRequiredGroup( this.value, "E" )')->setRegisterInArrayValidator(false)->setAttrib('class', 'm-wrap span12 chosen');
     $dbCountry = App_Model_DbTable_Factory::get('AddCountry');
     $countries = $dbCountry->fetchAll();
     $optCountry[''] = '';
     foreach ($countries as $country) {
         $optCountry[$country['id_addcountry']] = $country['country'];
     }
     $elements[] = $this->createElement('select', 'fk_id_addcountry')->setDecorators($this->getDefaultElementDecorators())->setAttrib('class', 'm-wrap span12 chosen')->setAttrib('onchange', 'Client.CaseGroup.setRequiredGroup( this.value, "C" )')->setLabel('Nasaun')->addMultiOptions($optCountry)->setRequired(true);
     $elements[] = $this->createElement('text', 'name')->setDecorators($this->getDefaultElementDecorators())->setAttrib('maxlength', 50)->addFilter('StringTrim')->addFilter('StringToUpper')->setRequired(true)->setAttrib('class', 'm-wrap span12')->setLabel('Naran');
     App_Form_Toolbar::build($this, self::ID);
     $this->addElements($elements);
 }
示例#16
0
 public function init()
 {
     $this->setAttrib('class', 'horizontal-form');
     $elements = array();
     $elements[] = $this->createElement('hidden', 'fk_id_perdata')->setAttrib('class', 'no-clear')->setDecorators(array('ViewHelper'));
     $elements[] = $this->createElement('hidden', 'id_addaddress')->setDecorators(array('ViewHelper'));
     $elements[] = $this->createElement('hidden', 'step')->setDecorators(array('ViewHelper'))->setAttrib('class', 'no-clear')->setValue('address');
     $dbCountry = App_Model_DbTable_Factory::get('AddCountry');
     $countries = $dbCountry->fetchAll();
     $optCountry[''] = '';
     foreach ($countries as $country) {
         $optCountry[$country['id_addcountry']] = $country['country'];
     }
     $elements[] = $this->createElement('select', 'fk_id_addcountry')->setDecorators($this->getDefaultElementDecorators())->setAttrib('class', 'm-wrap span12 chosen')->setLabel('Nasaun')->addMultiOptions($optCountry)->setRequired(true);
     $elements[] = $this->createElement('select', 'fk_id_adddistrict')->setDecorators($this->getDefaultElementDecorators())->setAttrib('class', 'm-wrap span12 chosen')->setRegisterInArrayValidator(false)->setLabel('Distritu')->setRequired(true);
     $elements[] = $this->createElement('select', 'fk_id_addsubdistrict')->setDecorators($this->getDefaultElementDecorators())->setAttrib('class', 'm-wrap span12 chosen')->setRegisterInArrayValidator(false)->setLabel('Sub-Distritu')->setRequired(true);
     $elements[] = $this->createElement('select', 'fk_id_addsucu')->setDecorators($this->getDefaultElementDecorators())->setAttrib('class', 'm-wrap span12 chosen')->setRegisterInArrayValidator(false)->setLabel('Suku')->setRequired(true);
     $elements[] = $this->createElement('text', 'street')->setDecorators($this->getDefaultElementDecorators())->setAttrib('maxlength', 200)->addFilter('StringTrim')->addFilter('StringToUpper')->setAttrib('class', 'm-wrap span12')->setLabel('Dalan');
     $elements[] = $this->createElement('text', 'number')->setDecorators($this->getDefaultElementDecorators())->setAttrib('maxlength', 50)->addFilter('StringTrim')->addFilter('StringToUpper')->setAttrib('class', 'm-wrap span12')->setLabel('Numeru');
     $elements[] = $this->createElement('text', 'postal_code')->setDecorators($this->getDefaultElementDecorators())->setAttrib('maxlength', 50)->addFilter('StringTrim')->addFilter('StringToUpper')->setAttrib('class', 'm-wrap span12')->setLabel('Kodiu Postal');
     $elements[] = $this->createElement('text', 'village')->setDecorators($this->getDefaultElementDecorators())->setAttrib('maxlength', 200)->addFilter('StringTrim')->addFilter('StringToUpper')->setAttrib('class', 'm-wrap span12')->setLabel('Vila');
     $elements[] = $this->createElement('textarea', 'complement')->setDecorators($this->getDefaultElementDecorators())->addFilter('StringTrim')->addFilter('StringToUpper')->setAttrib('class', 'span12')->setAttrib('cols', 100)->setAttrib('rows', 3)->setLabel('Komplementu');
     App_Form_Toolbar::build($this, self::ID);
     $this->addElements($elements);
 }
示例#17
0
 /**
  * 
  */
 public function init()
 {
     $this->setAttrib('class', 'horizontal-form')->setName('formstatement');
     $elements = array();
     $elements[] = $this->createElement('hidden', 'id_fefop_bank_statements')->setDecorators(array('ViewHelper'));
     $elements[] = $this->createElement('hidden', 'status')->setDecorators(array('ViewHelper'));
     $elements[] = $this->createElement('hidden', 'id_fefop_bank_contract')->setIsArray(true);
     $elements[] = $this->createElement('hidden', 'fk_id_fefop_contract')->setIsArray(true);
     $elements[] = $this->createElement('hidden', 'total_contract')->setIsArray(true);
     $elements[] = $this->createElement('hidden', 'total_expense')->setIsArray(true);
     $elements[] = $this->createElement('hidden', 'fk_id_budget_category')->setIsArray(true);
     $elements[] = $this->createElement('text', 'date_statement')->setDecorators($this->getDefaultElementDecorators())->setRequired(true)->setAttrib('class', 'm-wrap span12 date-mask')->setValue(Zend_Date::now()->toString('dd/MM/yyyy'))->setLabel('Data');
     $elements[] = $this->createElement('text', 'amount')->setDecorators($this->getDefaultElementDecorators())->setRequired(true)->setValue(0)->setAttrib('class', 'm-wrap span12 money-mask bold text-right')->setAttrib('style', 'font-size: 19px')->setLabel('Total');
     $dbTypeTransaction = App_Model_DbTable_Factory::get('FEFOPTypeTransaction');
     $rows = $dbTypeTransaction->fetchAll();
     $optTypeTransaction = array('' => '');
     foreach ($rows as $row) {
         $optTypeTransaction[$row['id_fefop_type_transaction']] = $row['acronym'] . ' - ' . $row['description'];
     }
     $elements[] = $this->createElement('select', 'fk_id_fefop_type_transaction')->setDecorators($this->getDefaultElementDecorators())->setAttrib('class', 'm-wrap span12')->addMultiOptions($optTypeTransaction)->setRequired(true)->setLabel('Tipu Transasaun');
     $optOperation[Fefop_Model_Mapper_BankStatement::DEBIT] = 'Saída';
     $optOperation[Fefop_Model_Mapper_BankStatement::CREDIT] = 'Entrada';
     $elements[] = $this->createElement('select', 'operation')->setDecorators($this->getDefaultElementDecorators())->setAttrib('class', 'm-wrap span12')->addMultiOptions($optOperation)->setRequired(true)->setLabel('Operasaun');
     $mapperFund = new Fefop_Model_Mapper_Fund();
     $funds = $mapperFund->fetchAll();
     $optFunds[''] = '';
     foreach ($funds as $fund) {
         $optFunds[$fund['id_fefopfund']] = $fund['name_fund'];
     }
     $elements[] = $this->createElement('select', 'fk_id_fefopfund')->setDecorators($this->getDefaultElementDecorators())->setAttrib('class', 'm-wrap span12 chosen')->addMultiOptions($optFunds)->setLabel('Fundu');
     $elements[] = $this->createElement('textarea', 'description')->setDecorators($this->getDefaultElementDecorators())->setAttrib('class', 'm-wrap span12')->setAttrib('rows', '2')->setRequired(true)->setLabel('Deskrisaun');
     $this->addElements($elements);
     App_Form_Toolbar::build($this, self::ID);
     $this->setDecorators($this->getDefaultFormDecorators());
 }
示例#18
0
 public function init()
 {
     $this->setAttrib('class', 'horizontal-form');
     $elements = array();
     $elements[] = $this->createElement('hidden', 'id_fefpenterprise')->setAttrib('class', 'no-clear')->setDecorators(array('ViewHelper'));
     $elements[] = $this->createElement('hidden', 'id_staff')->setDecorators(array('ViewHelper'));
     $elements[] = $this->createElement('hidden', 'step')->setDecorators(array('ViewHelper'))->setAttrib('class', 'no-clear')->setValue('staff');
     $elements[] = $this->createElement('text', 'staff_name')->setDecorators($this->getDefaultElementDecorators())->addFilter('StringTrim')->addFilter('StringToUpper')->setAttrib('maxlength', 250)->setRequired(true)->setAttrib('class', 'm-wrap span12 focused')->setLabel('Naran Funcionariu');
     $elements[] = $this->createElement('text', 'birth_date')->setDecorators($this->getDefaultElementDecorators())->setAttrib('maxlength', 10)->setRequired(true)->setAttrib('class', 'm-wrap span8 date-mask date')->setLabel('Data Moris');
     $optGender[''] = '';
     $optGender['M'] = 'MANE';
     $optGender['F'] = 'FETO';
     $elements[] = $this->createElement('select', 'gender')->setDecorators($this->getDefaultElementDecorators())->setAttrib('class', 'm-wrap span8')->setLabel('Seksu')->addMultiOptions($optGender);
     $optPost[''] = '';
     $optPost['Formandu'] = 'Formandu';
     $optPost['Trabalhador'] = 'Traballador';
     $optPost['Assistente'] = 'Assistente';
     $optPost['Chefe'] = 'Xefe';
     $optPost['Diretor'] = 'Diretor';
     $elements[] = $this->createElement('select', 'post')->setDecorators($this->getDefaultElementDecorators())->setAttrib('class', 'm-wrap span12')->setLabel('Kargo')->setRequired(true)->addMultiOptions($optPost);
     $dbOccupationTimor = App_Model_DbTable_Factory::get('PROFOcupationTimor');
     $occupations = $dbOccupationTimor->fetchAll();
     $optOccupations[''] = '';
     foreach ($occupations as $occupation) {
         $optOccupations[$occupation['id_profocupationtimor']] = $occupation['ocupation_name_timor'];
     }
     $elements[] = $this->createElement('select', 'position')->setDecorators($this->getDefaultElementDecorators())->setAttrib('class', 'm-wrap span12 chosen')->setLabel('Okupasaun')->addMultiOptions($optOccupations)->setRequired(true);
     $elements[] = $this->createElement('textarea', 'description')->setDecorators($this->getDefaultElementDecorators())->addFilter('StringTrim')->addFilter('StringToUpper')->setAttrib('class', 'span12')->setAttrib('cols', 100)->setAttrib('rows', 5)->setLabel('Deskrisaun Funcionariu');
     App_Form_Toolbar::build($this, self::ID);
     $this->addElements($elements);
 }
示例#19
0
 public function init()
 {
     $this->setAttrib('class', 'horizontal-form');
     $elements = array();
     $elements[] = $this->createElement('hidden', 'id_appointment')->setDecorators(array('ViewHelper'));
     $elements[] = $this->createElement('hidden', 'objective')->setIsArray(true);
     $elements[] = $this->createElement('hidden', 'fk_id_action_plan')->setDecorators(array('ViewHelper'))->setAttrib('class', 'no-clear');
     $dbUser = App_Model_DbTable_Factory::get('SysUser');
     $rows = $dbUser->fetchAll(array('fk_id_dec = ?' => Zend_Auth::getInstance()->getIdentity()->fk_id_dec), array('name'));
     $users[''] = '';
     foreach ($rows as $row) {
         $users[$row->id_sysuser] = $row->name . ' (' . $row->login . ')';
     }
     $elements[] = $this->createElement('select', 'fk_id_counselor')->setDecorators($this->getDefaultElementDecorators())->setAttrib('class', 'm-wrap span12 chosen')->setRequired(true)->setLabel('Ho Jestor Kazu')->addMultiOptions($users);
     $elements[] = $this->createElement('select', 'fk_id_sysuser')->setDecorators($this->getDefaultElementDecorators())->setAttrib('class', 'm-wrap span12 chosen')->setRequired(true)->setLabel('Ema neebe halo')->addMultiOptions($users);
     $dbDec = App_Model_DbTable_Factory::get('Dec');
     $rows = $dbDec->fetchAll(array(), array('name_dec'));
     $optCeop[''] = '';
     foreach ($rows as $row) {
         $optCeop[$row->id_dec] = $row->name_dec;
     }
     $elements[] = $this->createElement('select', 'fk_id_dec')->setDecorators($this->getDefaultElementDecorators())->setLabel('Distritu')->addMultiOptions($optCeop)->setRequired(true)->setAttrib('class', 'm-wrap span12');
     $elements[] = $this->createElement('text', 'date_appointment')->setDecorators($this->getDefaultElementDecorators())->setAttrib('maxlength', 10)->setRequired(true)->setAttrib('class', 'm-wrap span12 date-mask date')->setLabel('Data ba audiensia');
     $elements[] = $this->createElement('text', 'time_appointment')->setDecorators($this->getDefaultElementDecorators())->setAttrib('maxlength', 10)->setRequired(true)->setAttrib('class', 'm-wrap span12 time-mask')->setLabel('Oras');
     $elements[] = $this->createElement('textarea', 'appointment_desc')->setDecorators($this->getDefaultElementDecorators())->addFilter('StringTrim')->addFilter('StringToUpper')->setRequired(true)->setAttrib('rows', 2)->setAttrib('class', 'm-wrap span12')->setLabel('Deskrisaun');
     $elements[] = $this->createElement('checkbox', 'appointment_filled')->setDecorators($this->getDefaultElementDecorators())->setCheckedValue(1)->setUncheckedValue(0)->setValue(0)->setAttrib('class', 'toggle-check')->setLabel('Kliente mai?');
     App_Form_Toolbar::build($this, self::ID);
     $this->addElements($elements);
 }
示例#20
0
 public function init()
 {
     $this->setAttrib('class', 'horizontal-form');
     $elements = array();
     $this->addElements($elements);
     App_Form_Toolbar::build($this, self::ID);
     $this->setDecorators($this->getDefaultFormDecorators());
 }
示例#21
0
 public function init()
 {
     $this->setAttrib('class', 'horizontal-form');
     $elements = $this->getDocumentElements();
     $elements[] = $this->createElement('hidden', 'step')->setDecorators(array('ViewHelper'))->setAttrib('class', 'no-clear')->setValue('document');
     App_Form_Toolbar::build($this, self::ID);
     $this->addElements($elements);
 }
示例#22
0
 /**
  * 
  */
 public function init()
 {
     $this->setAttrib('class', 'horizontal-form')->setName('formconsolidate');
     $elements = array();
     $elements[] = $this->createElement('hidden', 'consolidate')->setIsArray(true);
     $this->addElements($elements);
     App_Form_Toolbar::build($this, self::ID);
     $this->setDecorators($this->getDefaultFormDecorators());
 }
示例#23
0
 public function init()
 {
     $this->setAttrib('class', 'horizontal-form');
     $elements = array();
     $elements[] = $this->createElement('hidden', 'id_drh_trainingplan')->setDecorators(array('ViewHelper'));
     $elements[] = $this->createElement('hidden', 'fk_id_fefpeduinstitution')->setDecorators(array('ViewHelper'));
     $elements[] = $this->createElement('hidden', 'fk_id_addcountry')->setDecorators(array('ViewHelper'));
     $elements[] = $this->createElement('hidden', 'need_insurance')->setDecorators(array('ViewHelper'))->setValue(0);
     $elements[] = $this->createElement('hidden', 'expense')->setIsArray(true);
     $elements[] = $this->createElement('hidden', 'amount_expense')->setIsArray(true);
     $elements[] = $this->createElement('hidden', 'staff')->setIsArray(true);
     $elements[] = $this->createElement('hidden', 'handicapped')->setIsArray(true);
     $elements[] = $this->createElement('hidden', 'gender')->setIsArray(true);
     $elements[] = $this->createElement('hidden', 'unit_cost')->setIsArray(true);
     $elements[] = $this->createElement('hidden', 'final_cost')->setIsArray(true);
     $elements[] = $this->createElement('hidden', 'training_fund')->setIsArray(true);
     $elements[] = $this->createElement('text', 'entity')->setDecorators($this->getDefaultElementDecorators())->setAttrib('readOnly', true)->setRequired(true)->setAttrib('class', 'm-wrap span12 focused')->setLabel('Entidade responsável ba formasaun');
     $mapperScholarityArea = new Register_Model_Mapper_ScholarityArea();
     $sections = $mapperScholarityArea->fetchAll();
     $optScholarityArea[''] = '';
     foreach ($sections as $section) {
         $optScholarityArea[$section['id_scholarity_area']] = $section['scholarity_area'];
     }
     $elements[] = $this->createElement('select', 'fk_id_scholarity_area')->setDecorators($this->getDefaultElementDecorators())->setAttrib('class', 'm-wrap span12 chosen focused')->setLabel('Area Kursu')->addMultiOptions($optScholarityArea)->setRequired(true);
     $dbOccupationTimor = App_Model_DbTable_Factory::get('PROFOcupationTimor');
     $occupations = $dbOccupationTimor->fetchAll();
     $optOccupations[''] = '';
     foreach ($occupations as $occupation) {
         $optOccupations[$occupation['id_profocupationtimor']] = $occupation['acronym'] . ' ' . $occupation['ocupation_name_timor'];
     }
     $elements[] = $this->createElement('select', 'fk_id_profocupationtimor')->setDecorators($this->getDefaultElementDecorators())->setAttrib('class', 'm-wrap span12 chosen')->setLabel('Dezignasaun')->addMultiOptions($optOccupations);
     $elements[] = $this->createElement('text', 'country_timor')->setDecorators($this->getDefaultElementDecorators())->setAttrib('readOnly', true)->setRequired(true)->setAttrib('class', 'm-wrap span12 focused')->setValue('Timor-Leste')->setLabel('Nasaun');
     $dbCountry = App_Model_DbTable_Factory::get('AddCountry');
     $countries = $dbCountry->fetchAll();
     $optCountry[''] = '';
     foreach ($countries as $country) {
         if ($country['id_addcountry'] != 1) {
             $optCountry[$country['id_addcountry']] = $country['country'];
         }
     }
     $elements[] = $this->createElement('select', 'country')->setDecorators($this->getDefaultElementDecorators())->setAttrib('class', 'm-wrap span12 chosen')->setLabel('Nasaun')->addMultiOptions($optCountry);
     $optModality[''] = '';
     $optModality['L'] = 'Iha territóriu no ho entidade nasionál';
     $optModality['A'] = 'Iha rai liur';
     $optModality['T'] = 'Iha territóriu nasionál ho entidade formadora husi rai liur';
     $elements[] = $this->createElement('select', 'modality')->setDecorators($this->getDefaultElementDecorators())->setAttrib('class', 'm-wrap span12')->setLabel('Modalidade')->addMultiOptions($optModality)->setRequired(true);
     $elements[] = $this->createElement('text', 'date_start')->setDecorators($this->getDefaultElementDecorators())->setAttrib('maxlength', 10)->setRequired(true)->setAttrib('class', 'm-wrap span12 date-mask')->setLabel('Data hahú');
     $elements[] = $this->createElement('text', 'date_finish')->setDecorators($this->getDefaultElementDecorators())->setAttrib('maxlength', 10)->setAttrib('class', 'm-wrap span12 date-mask')->setRequired(true)->setLabel('Data finalizasaun');
     $elements[] = $this->createElement('text', 'duration_days')->setDecorators($this->getDefaultElementDecorators())->setRequired(true)->setAttrib('class', 'm-wrap span12')->setAttrib('readonly', true)->setLabel('Durasaun');
     $elements[] = $this->createElement('text', 'city')->setDecorators($this->getDefaultElementDecorators())->setRequired(true)->setAttrib('class', 'm-wrap span12')->setLabel('Sidade');
     $elements[] = $this->createElement('text', 'amount')->setDecorators($this->getDefaultElementDecorators())->setRequired(true)->setAttrib('readonly', true)->setAttrib('class', 'm-wrap span12 money-mask')->setLabel('KUSTU TOTÁL BA FORMASAUN');
     $elements[] = $this->createElement('text', 'amount_expenses')->setDecorators($this->getDefaultElementDecorators())->setRequired(true)->removeDecorator('Label')->setAttrib('readonly', true)->setAttrib('class', 'm-wrap span12 money-mask')->setLabel('Totál');
     $this->addElements($elements);
     App_Form_Toolbar::build($this, self::ID);
     $this->setDecorators($this->getDefaultFormDecorators());
 }
 /**
  * 
  */
 public function init()
 {
     $this->setAttrib('class', 'horizontal-form');
     $elements = array();
     $elements[] = $this->createElement('hidden', 'id_beneficiary_blacklist')->setDecorators(array('ViewHelper'));
     $elements[] = $this->createElement('textarea', 'comment_remove')->setDecorators($this->getDefaultElementDecorators())->addFilter('StringTrim')->setAttrib('class', 'm-wrap span12')->setAttrib('rows', 3)->setAttrib('maxlength', 400)->setRequired(true)->setLabel('Comentariu');
     $this->addElements($elements);
     App_Form_Toolbar::build($this, self::ID);
     $this->setDecorators($this->getDefaultFormDecorators());
 }
示例#25
0
 public function init()
 {
     $this->setAttrib('class', 'horizontal-form');
     $elements = array();
     $elements[] = $this->createElement('hidden', 'id_budget_category_type')->setDecorators(array('ViewHelper'));
     $elements[] = $this->createElement('text', 'description')->setDecorators($this->getDefaultElementDecorators())->addFilter('StringTrim')->addFilter('StringToUpper')->setAttrib('maxlength', 200)->setAttrib('class', 'm-wrap span12 focused')->setLabel('Naran Komponente')->setRequired(true);
     $this->addElements($elements);
     App_Form_Toolbar::build($this, self::ID);
     $this->setDecorators($this->getDefaultFormDecorators());
 }
示例#26
0
 public function init()
 {
     $this->setAttrib('class', 'horizontal-form');
     $elements = array();
     $elements[] = $this->createElement('hidden', 'id_sysmodule')->setDecorators(array('ViewHelper'));
     $elements[] = $this->createElement('text', 'module')->setDecorators($this->getDefaultElementDecorators())->addFilter('StringTrim')->addFilter('StringToUpper')->setAttrib('maxlength', 200)->setAttrib('class', 'm-wrap span12 focused')->setLabel('Naran Modulo')->setRequired(true);
     $elements[] = $this->createElement('textarea', 'description')->setDecorators($this->getDefaultElementDecorators())->addFilter('StringTrim')->addFilter('StringToUpper')->setAttrib('class', 'span12')->setAttrib('cols', 100)->setAttrib('rows', 5)->setLabel('Deskrisaun');
     $this->addElements($elements);
     App_Form_Toolbar::build($this, self::ID);
 }
示例#27
0
 public function init()
 {
     $this->setAttrib('class', 'horizontal-form');
     $elements = array();
     $elements[] = $this->createElement('hidden', 'fk_id_fefpeduinstitution')->setDecorators(array('ViewHelper'));
     $elements[] = $this->createElement('hidden', 'fk_id_fefpenterprise')->setDecorators(array('ViewHelper'));
     $elements[] = $this->createElement('hidden', 'id_jobtraining')->setAttrib('class', 'no-clear')->setDecorators(array('ViewHelper'));
     $elements[] = $this->createElement('hidden', 'step')->setDecorators(array('ViewHelper'))->setAttrib('class', 'no-clear')->setValue('information');
     $elements[] = $this->createElement('text', 'title')->setDecorators($this->getDefaultElementDecorators())->addFilter('StringTrim')->addFilter('StringToUpper')->setAttrib('maxlength', 100)->setRequired(true)->setAttrib('class', 'm-wrap span12 focused')->setLabel('Titulu');
     $dbDec = App_Model_DbTable_Factory::get('Dec');
     $rows = $dbDec->fetchAll(array(), array('name_dec'));
     $optCeop[''] = '';
     foreach ($rows as $row) {
         $optCeop[$row->id_dec] = $row->name_dec;
     }
     $elements[] = $this->createElement('select', 'fk_id_dec')->setDecorators($this->getDefaultElementDecorators())->setLabel('CEOP')->addMultiOptions($optCeop)->setRequired(true)->setAttrib('class', 'm-wrap span12');
     $elements[] = $this->createElement('text', 'entity')->setDecorators($this->getDefaultElementDecorators())->setAttrib('readOnly', true)->setRequired(true)->setAttrib('class', 'm-wrap span12 focused')->setLabel('Entidade promotora');
     /*
     	$mapperEnterprise = new Register_Model_Mapper_Enterprise();
     	$rows = $mapperEnterprise->listByFilters();
     	
     	$optEnterprise[''] = '';
     	foreach ( $rows as $row )
        $optEnterprise[$row->id_fefpenterprise] = $row->enterprise_name;
     	
     	$elements[] = $this->createElement( 'select', 'fk_id_fefpenterprise' )
     			    ->setDecorators( $this->getDefaultElementDecorators() )
     			    ->setLabel( 'Empreza' )
     			    ->addMultiOptions( $optEnterprise )
     			    ->setRequired( true )
     			    ->setAttrib( 'class', 'm-wrap span12 chosen' );
     */
     $mapperScholarityArea = new Register_Model_Mapper_ScholarityArea();
     $sections = $mapperScholarityArea->fetchAll();
     $optScholarityArea[''] = '';
     foreach ($sections as $section) {
         $optScholarityArea[$section['id_scholarity_area']] = $section['scholarity_area'];
     }
     $elements[] = $this->createElement('select', 'fk_id_scholarity_area')->setDecorators($this->getDefaultElementDecorators())->setAttrib('class', 'm-wrap span12 chosen focused')->setLabel('Area Kursu')->addMultiOptions($optScholarityArea)->setRequired(true);
     $elements[] = $this->createElement('text', 'total_woman')->setDecorators($this->getDefaultElementDecorators())->setAttrib('maxlength', 10)->setRequired(true)->setAttrib('class', 'm-wrap span12 text-numeric4')->setLabel('Feto Nain Hira');
     $elements[] = $this->createElement('text', 'total_man')->setDecorators($this->getDefaultElementDecorators())->setAttrib('maxlength', 10)->setRequired(true)->setAttrib('class', 'm-wrap span12 text-numeric4')->setLabel('Mane Nain Hira');
     $elements[] = $this->createElement('text', 'total_participants')->setDecorators($this->getDefaultElementDecorators())->setAttrib('maxlength', 10)->setAttrib('readOnly', true)->setAttrib('class', 'm-wrap span12 text-numeric4')->setLabel('Total Partisipante');
     $elements[] = $this->createElement('text', 'salary')->setDecorators($this->getDefaultElementDecorators())->setAttrib('maxlength', 20)->setRequired(true)->setAttrib('class', 'm-wrap span12 money-mask')->setLabel('Subsidiu');
     $elements[] = $this->createElement('text', 'date_start')->setDecorators($this->getDefaultElementDecorators())->setAttrib('maxlength', 10)->setRequired(true)->setAttrib('class', 'm-wrap span12 date-mask date')->setLabel('Loron Inisiu');
     $elements[] = $this->createElement('text', 'date_finish')->setDecorators($this->getDefaultElementDecorators())->setAttrib('maxlength', 10)->setRequired(true)->setAttrib('class', 'm-wrap span12 date-mask date')->setLabel('Loron Planu Remata');
     $elements[] = $this->createElement('text', 'duration')->setDecorators($this->getDefaultElementDecorators())->setAttrib('maxlength', 10)->setAttrib('readonly', true)->setRequired(true)->setAttrib('class', 'm-wrap span12 text-numeric4')->setLabel('Durasaun - Fulan');
     $optStatus[''] = '';
     $optStatus['1'] = 'Loke';
     $optStatus['0'] = 'Taka';
     $optStatus['2'] = 'Kansela';
     $elements[] = $this->createElement('select', 'status')->setDecorators($this->getDefaultElementDecorators())->setAttrib('class', 'm-wrap span12')->setLabel('Status')->setValue(1)->setAttrib('readOnly', true)->addMultiOptions($optStatus);
     $elements[] = $this->createElement('textarea', 'description')->setDecorators($this->getDefaultElementDecorators())->addFilter('StringTrim')->addFilter('StringToUpper')->setAttrib('class', 'm-wrap span12')->setAttrib('rows', 3)->setLabel('Deskrisaum Jeral');
     App_Form_Toolbar::build($this, self::ID);
     $this->addElements($elements);
 }
示例#28
0
 public function init()
 {
     $this->setAttrib('class', 'horizontal-form');
     $elements = array();
     $elements[] = $this->createElement('hidden', 'id_fe_registration')->setDecorators(array('ViewHelper'));
     $elements[] = $this->createElement('hidden', 'fk_id_perdata')->setDecorators(array('ViewHelper'));
     $elements[] = $this->createElement('hidden', 'entity')->setIsArray(true);
     $elements[] = $this->createElement('text', 'client_name')->setDecorators($this->getDefaultElementDecorators())->setAttrib('readOnly', true)->setRequired(true)->setAttrib('class', 'm-wrap span12 focused')->setLabel('Naran Kompletu');
     $elements[] = $this->createElement('text', 'client_fone')->setDecorators($this->getDefaultElementDecorators())->setAttrib('readOnly', true)->setAttrib('class', 'm-wrap span12 focused')->setLabel('Kontatu');
     $elements[] = $this->createElement('text', 'email')->setDecorators($this->getDefaultElementDecorators())->setAttrib('readOnly', true)->setAttrib('class', 'm-wrap span12 focused')->setLabel('E-mail');
     $elements[] = $this->createElement('text', 'evidence')->setDecorators($this->getDefaultElementDecorators())->setAttrib('readOnly', true)->setRequired(true)->setAttrib('class', 'm-wrap span12 focused')->setLabel('Kartaun Evidensia');
     $elements[] = $this->createElement('text', 'electoral')->setDecorators($this->getDefaultElementDecorators())->setAttrib('readOnly', true)->setRequired(true)->setAttrib('class', 'm-wrap span12 focused')->setLabel('Kartaun Eleitoral');
     $elements[] = $this->createElement('text', 'date_inserted')->setDecorators($this->getDefaultElementDecorators())->setAttrib('maxlength', 10)->setAttrib('class', 'm-wrap span12')->setLabel('Data');
     $mapperScholarityArea = new Register_Model_Mapper_ScholarityArea();
     $sections = $mapperScholarityArea->fetchAll();
     $optScholarityArea[''] = '';
     foreach ($sections as $section) {
         $optScholarityArea[$section['id_scholarity_area']] = $section['scholarity_area'];
     }
     $dbOccupationTimor = App_Model_DbTable_Factory::get('PROFOcupationTimor');
     $occupations = $dbOccupationTimor->fetchAll();
     $optOccupations[''] = '';
     foreach ($occupations as $occupation) {
         $optOccupations[$occupation['id_profocupationtimor']] = $occupation['acronym'] . ' ' . $occupation['ocupation_name_timor'];
     }
     $dbScholarityLevel = App_Model_DbTable_Factory::get('PerLevelScholarity');
     $levels = $dbScholarityLevel->fetchAll(array(), array('id_perlevelscholarity'));
     $optLevel[''] = '';
     foreach ($levels as $level) {
         $optLevel[$level->id_perlevelscholarity] = $level->level_scholarity;
     }
     $elementsProfessional = array();
     $elementsProfessional[] = $this->createElement('select', 'area')->setDecorators($this->getDefaultElementDecorators())->setAttrib('class', 'm-wrap span12 chosen focused')->setLabel('Area Kursu')->setBelongsTo('professional')->addMultiOptions($optScholarityArea);
     $elementsProfessional[] = $this->createElement('select', 'occupation')->setDecorators($this->getDefaultElementDecorators())->setAttrib('class', 'm-wrap span12 chosen')->setLabel('Dezignasaun')->setBelongsTo('professional')->addMultiOptions($optOccupations);
     $elementsProfessional[] = $this->createElement('select', 'level')->setDecorators($this->getDefaultElementDecorators())->setAttrib('class', 'm-wrap span12 chosen')->addMultiOptions($optLevel)->setBelongsTo('professional')->setLabel('Nivel');
     $professionalSubForm = new Zend_Form_SubForm();
     $professionalSubForm->addElements($elementsProfessional);
     $this->addSubForm($professionalSubForm, 'professional');
     $elementsFormation = array();
     $elementsFormation[] = $this->createElement('select', 'area')->setDecorators($this->getDefaultElementDecorators())->setAttrib('class', 'm-wrap span12 chosen focused')->setLabel('Area Kursu')->setBelongsTo('formation')->addMultiOptions($optScholarityArea);
     $elementsFormation[] = $this->createElement('select', 'occupation')->setDecorators($this->getDefaultElementDecorators())->setAttrib('class', 'm-wrap span12 chosen')->setLabel('Dezignasaun')->setBelongsTo('formation')->addMultiOptions($optOccupations);
     $elementsFormation[] = $this->createElement('select', 'level')->setDecorators($this->getDefaultElementDecorators())->setAttrib('class', 'm-wrap span12 chosen')->addMultiOptions($optLevel)->setBelongsTo('formation')->setLabel('Nivel');
     $formationSubForm = new Zend_Form_SubForm();
     $formationSubForm->addElements($elementsFormation);
     $this->addSubForm($formationSubForm, 'formation');
     $selectedElements = array();
     $selectedElements[] = $this->createElement('select', 'area')->setDecorators($this->getDefaultElementDecorators())->setAttrib('class', 'm-wrap span12 chosen focused')->setLabel('Area Kursu')->setBelongsTo('selected')->setRequired(true)->addMultiOptions($optScholarityArea);
     $selectedElements[] = $this->createElement('select', 'occupation')->setDecorators($this->getDefaultElementDecorators())->setAttrib('class', 'm-wrap span12 chosen')->setLabel('Dezignasaun')->setBelongsTo('selected')->setRequired(true)->addMultiOptions($optOccupations);
     $selectedSubForm = new Zend_Form_SubForm();
     $selectedSubForm->addElements($selectedElements);
     $this->addSubForm($selectedSubForm, 'selected');
     $this->addElements($elements);
     App_Form_Toolbar::build($this, self::ID);
     $this->setDecorators($this->getDefaultFormDecorators());
 }
示例#29
0
 public function init()
 {
     $this->setAttrib('class', 'horizontal-form');
     $elements = array();
     $elements[] = $this->createElement('hidden', 'id_scholarity_area')->setDecorators(array('ViewHelper'));
     $elements[] = $this->createElement('text', 'scholarity_area')->setDecorators($this->getDefaultElementDecorators())->addFilter('StringTrim')->addFilter('StringToUpper')->setAttrib('maxlength', 200)->setAttrib('class', 'm-wrap span12 focused')->setLabel('Area Kursu')->setRequired(true);
     $elements[] = $this->createElement('text', 'acronym')->setDecorators($this->getDefaultElementDecorators())->addFilter('StringTrim')->addFilter('StringToUpper')->setAttrib('maxlength', 3)->setAttrib('class', 'm-wrap span4')->setLabel('Sigla');
     $this->addElements($elements);
     App_Form_Toolbar::build($this, self::ID);
     $this->setDecorators($this->getDefaultFormDecorators());
 }
示例#30
0
 public function init()
 {
     $this->setAttrib('class', 'horizontal-form');
     $elements = array();
     $elements[] = $this->createElement('hidden', 'id_perdata')->setAttrib('class', 'no-clear')->setDecorators(array('ViewHelper'));
     $elements[] = $this->createElement('hidden', 'step')->setDecorators(array('ViewHelper'))->setAttrib('class', 'no-clear')->setValue('information');
     $elements[] = $this->createElement('hidden', 'by_pass_name')->setDecorators(array('ViewHelper'))->setValue('0');
     $elements[] = $this->createElement('text', 'first_name')->setDecorators($this->getDefaultElementDecorators())->addFilter('StringTrim')->addFilter('StringToUpper')->setAttrib('maxlength', 80)->setRequired(true)->setAttrib('class', 'm-wrap span12 focused')->setLabel('Naran Primeiru');
     $elements[] = $this->createElement('text', 'medium_name')->setDecorators($this->getDefaultElementDecorators())->addFilter('StringTrim')->addFilter('StringToUpper')->setAttrib('maxlength', 80)->setAttrib('class', 'm-wrap span12')->setLabel('Naran Segundu');
     $elements[] = $this->createElement('text', 'last_name')->setDecorators($this->getDefaultElementDecorators())->addFilter('StringTrim')->addFilter('StringToUpper')->setAttrib('maxlength', 80)->setRequired(true)->setAttrib('class', 'm-wrap span12')->setLabel('Naran Apelidu');
     $elements[] = $this->createElement('text', 'date_registration')->setDecorators($this->getDefaultElementDecorators())->setAttrib('maxlength', 10)->setRequired(true)->setAttrib('class', 'm-wrap span12 date-mask date')->setValue(Zend_Date::now()->toString('dd/MM/yyyy'))->setLabel('Data Rejistu');
     $optMaritalStatus['KABENNAIN'] = 'KABENNAIN';
     $optMaritalStatus['SOLTEIRU'] = 'SOLTEIRU';
     $optMaritalStatus['DIVORS'] = 'DIVORS';
     $optMaritalStatus['FALUK'] = 'FALUK';
     $elements[] = $this->createElement('select', 'marital_status')->setDecorators($this->getDefaultElementDecorators())->setLabel('Estadu Sivil')->addMultiOptions($optMaritalStatus);
     $elements[] = $this->createElement('text', 'father_name')->setDecorators($this->getDefaultElementDecorators())->addFilter('StringTrim')->addFilter('StringToUpper')->setAttrib('maxlength', 80)->setAttrib('class', 'm-wrap span12')->setLabel('Naran Aman');
     $elements[] = $this->createElement('text', 'birth_date')->setDecorators($this->getDefaultElementDecorators())->setAttrib('maxlength', 10)->setRequired(true)->setAttrib('class', 'm-wrap span12 date-mask date')->setLabel('Data Moris');
     $elements[] = $this->createElement('text', 'age')->setDecorators($this->getDefaultElementDecorators())->setAttrib('class', 'm-wrap span6')->setAttrib('readOnly', 'true')->setLabel('Tinan');
     $elements[] = $this->createElement('text', 'mother_name')->setDecorators($this->getDefaultElementDecorators())->addFilter('StringTrim')->addFilter('StringToUpper')->setAttrib('maxlength', 80)->setAttrib('class', 'm-wrap span12')->setLabel('Naran Inan');
     $optGender['FETO'] = 'FETO';
     $optGender['MANE'] = 'MANE';
     $elements[] = $this->createElement('select', 'gender')->setDecorators($this->getDefaultElementDecorators())->setLabel('Seksu')->setRequired(true)->addMultiOptions($optGender);
     $mapperCountry = new Register_Model_Mapper_AddCountry();
     $countries = $mapperCountry->fetchAll();
     $optNations[''] = '';
     foreach ($countries as $country) {
         $optNations[$country['id_addcountry']] = $country['country'];
     }
     $elements[] = $this->createElement('select', 'fk_country_birth')->setDecorators($this->getDefaultElementDecorators())->setAttrib('class', 'm-wrap span12 chosen')->setRequired(true)->setLabel('Nasionalidade')->addMultiOptions($optNations);
     // List Districts just from Timor
     $mapperDistrict = new Register_Model_Mapper_AddDistrict();
     $districts = $mapperDistrict->listAll(1);
     $optDistrict[''] = '';
     foreach ($districts as $district) {
         $optDistrict[$district->id_adddistrict] = $district->District;
     }
     $elements[] = $this->createElement('select', 'fk_id_adddistrict')->setDecorators($this->getDefaultElementDecorators())->setAttrib('class', 'm-wrap span12 chosen')->addMultiOptions($optDistrict)->setLabel('Distritu Kliente')->setRequired(true);
     $elements[] = $this->createElement('select', 'num_subdistrict')->setDecorators($this->getDefaultElementDecorators())->setAttrib('class', 'm-wrap span12 chosen')->setRegisterInArrayValidator(false)->setRequired(true)->setLabel('Sub-Distritu');
     $dbDec = App_Model_DbTable_Factory::get('Dec');
     $rows = $dbDec->fetchAll(array(), array('name_dec'));
     $optCeop[''] = '';
     foreach ($rows as $row) {
         $optCeop[$row->id_dec] = $row->name_dec;
     }
     $elements[] = $this->createElement('select', 'fk_id_dec')->setDecorators($this->getDefaultElementDecorators())->setLabel('Rejistu iha CEOP')->addMultiOptions($optCeop)->setRequired(true)->setAttrib('class', 'm-wrap span12');
     $elements[] = $this->createElement('text', 'client_fone')->setDecorators($this->getDefaultElementDecorators())->setAttrib('maxlength', 15)->setAttrib('class', 'm-wrap span12 phone-mask')->setLabel('Telefone');
     $elements[] = $this->createElement('text', 'website')->setDecorators($this->getDefaultElementDecorators())->setAttrib('maxlength', 250)->addFilter('StringTrim')->setAttrib('class', 'm-wrap span12')->setLabel('Website');
     $elements[] = $this->createElement('text', 'email')->setDecorators($this->getDefaultElementDecorators())->setAttrib('maxlength', 250)->addFilter('StringTrim')->addValidator('EmailAddress')->setAttrib('class', 'm-wrap span12')->setLabel('E-mail');
     $elements[] = $this->createElement('checkbox', 'active')->setDecorators($this->getDefaultElementDecorators())->setCheckedValue(1)->setUncheckedValue(0)->setValue(1)->setAttrib('class', 'toggle-check')->setLabel('Ativu?');
     $elements[] = $this->createElement('checkbox', 'hired')->setDecorators($this->getDefaultElementDecorators())->setCheckedValue(1)->setUncheckedValue(0)->setAttrib('class', 'toggle-check')->setLabel('Iha serbisu?');
     App_Form_Toolbar::build($this, self::ID);
     $this->addElements($elements);
 }