/** * */ public function init() { parent::init(); $this->removeElement('date_start'); $this->removeElement('date_finish'); $elements = array(); $elements[] = $this->createElement('hidden', 'path')->setAttrib('class', 'no-clear')->setValue('register/institution-report')->setDecorators(array('ViewHelper')); $elements[] = $this->createElement('hidden', 'title')->setAttrib('class', 'no-clear')->setValue('Relatoriu: Rejistu Inst. Ensinu')->setDecorators(array('ViewHelper')); $elements[] = $this->createElement('hidden', 'orientation')->setValue('landscape')->setAttrib('class', 'no-clear')->setDecorators(array('ViewHelper')); $mapperDistrict = new Register_Model_Mapper_AddDistrict(); $rows = $mapperDistrict->listAll(); $optDistrict[''] = ''; foreach ($rows as $row) { $optDistrict[$row->id_adddistrict] = $row->District; } $elements[] = $this->createElement('select', 'fk_id_adddistrict')->setDecorators($this->getDefaultElementDecorators())->setAttrib('class', 'm-wrap span12')->setLabel('Distritu')->addMultiOptions($optDistrict); $dbTypeInstitution = App_Model_DbTable_Factory::get('TypeInstitution'); $rows = $dbTypeInstitution->fetchAll(array(), array('type_institution')); $optType[''] = ''; foreach ($rows as $row) { $optType[$row->id_typeinstitution] = $row->type_institution; } $elements[] = $this->createElement('select', 'fk_typeinstitution')->setDecorators($this->getDefaultElementDecorators())->setLabel('Tipu Instituisaun')->addMultiOptions($optType)->setAttrib('class', 'm-wrap span12'); $optRegister[''] = ''; $optRegister['1'] = 'Sim'; $optRegister['0'] = 'Lae'; $elements[] = $this->createElement('select', 'register')->setDecorators($this->getDefaultElementDecorators())->setLabel('Rejistu ?')->addMultiOptions($optRegister)->setAttrib('class', 'm-wrap span6'); $mapperScholarity = new Register_Model_Mapper_PerScholarity(); $optScholarity = $mapperScholarity->getOptionsScholarity(); $elements[] = $this->createElement('select', 'fk_id_perscholarity')->setDecorators($this->getDefaultElementDecorators())->setRegisterInArrayValidator(false)->addMultiOptions($optScholarity)->setAttrib('class', 'm-wrap span12 chosen')->setLabel('Kursu'); $this->addElements($elements); }
/** * */ public function init() { parent::init(); $elements = array(); $elements[] = $this->createElement('hidden', 'path')->setValue('student-class/school-report')->setAttrib('class', 'no-clear')->setDecorators(array('ViewHelper')); $elements[] = $this->createElement('hidden', 'title')->setValue('Relatoriu: Graduadu liu husi Nivel Eskola')->setAttrib('class', 'no-clear')->setDecorators(array('ViewHelper')); $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)->setRegisterInArrayValidator(false)->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); $filters = array('type' => Register_Model_Mapper_PerTypeScholarity::NON_FORMAL); $mapperScholarity = new Register_Model_Mapper_PerScholarity(); $optScholarity = $mapperScholarity->getOptionsScholarity($filters); $elements[] = $this->createElement('select', 'fk_id_perscholarity')->setDecorators($this->getDefaultElementDecorators())->setRegisterInArrayValidator(false)->addMultiOptions($optScholarity)->setAttrib('class', 'm-wrap span12 chosen')->setLabel('Kursu'); $this->addElements($elements); }
/** * */ public function init() { parent::init(); $elements = array(); $elements[] = $this->createElement('hidden', 'path')->setValue('job/register-report')->setAttrib('class', 'no-clear')->setDecorators(array('ViewHelper')); $elements[] = $this->createElement('hidden', 'title')->setValue('Relatoriu: List Vagas Rejista')->setAttrib('class', 'no-clear')->setDecorators(array('ViewHelper')); $elements[] = $this->createElement('hidden', 'orientation')->setValue('landscape')->setAttrib('class', 'no-clear')->setDecorators(array('ViewHelper')); $optTransport['1'] = 'Loke'; $optTransport['0'] = 'Taka'; $optTransport['2'] = 'Kansela'; $elements[] = $this->createElement('select', 'active')->setDecorators($this->getDefaultElementDecorators())->setLabel('Status')->setAttrib('class', 'm-wrap span12')->addMultiOptions($optTransport)->setValue(1)->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_profocupation')->setDecorators($this->getDefaultElementDecorators())->setAttrib('class', 'm-wrap span12 chosen')->setLabel('Okupasaun')->addMultiOptions($optOccupations); $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)->setAttrib('class', 'm-wrap span12 chosen'); $this->addElements($elements); }
/** * */ public function init() { parent::init(); $this->removeElement('fk_id_dec'); $elements = array(); $elements[] = $this->createElement('hidden', 'path')->setAttrib('class', 'no-clear')->setValue('sms/sending-report')->setDecorators(array('ViewHelper')); $elements[] = $this->createElement('hidden', 'title')->setAttrib('class', 'no-clear')->setValue('Relatoriu: Enviu sira')->setDecorators(array('ViewHelper')); $elements[] = $this->createElement('hidden', 'orientation')->setValue('landscape')->setAttrib('class', 'no-clear')->setDecorators(array('ViewHelper')); $mapperDepartment = new Admin_Model_Mapper_Department(); $rows = $mapperDepartment->fetchAll(); $optDepartment[''] = ''; foreach ($rows as $row) { $optDepartment[$row->id_department] = $row->name; } $elements[] = $this->createElement('select', 'fk_id_department')->setDecorators($this->getDefaultElementDecorators())->setAttrib('class', 'm-wrap span12 chosen')->setLabel('Departamentu')->addMultiOptions($optDepartment); $mapperCampaign = new Sms_Model_Mapper_Campaign(); $rows = $mapperCampaign->listByFilters(); $optCampaign[''] = ''; foreach ($rows as $row) { $optCampaign[$row->id_campaign] = $row->campaign_title; } $elements[] = $this->createElement('select', 'fk_id_campaign')->setDecorators($this->getDefaultElementDecorators())->setAttrib('class', 'm-wrap span12 chosen')->setLabel('Kampanha')->addMultiOptions($optCampaign); $optStatus[''] = ''; $optStatus['E'] = 'Sala'; $optStatus['S'] = 'Loos'; $elements[] = $this->createElement('select', 'status_sending')->setDecorators($this->getDefaultElementDecorators())->setAttrib('class', 'm-wrap span6')->setLabel('Status enviu')->addMultiOptions($optStatus); $this->addElements($elements); }
/** * @access public * @return void */ public function init() { parent::init(); $elements = array(); $elements[] = $this->createElement('hidden', 'path')->setAttrib('class', 'no-clear')->setValue(self::PATH)->setDecorators(array('ViewHelper')); $elements[] = $this->createElement('hidden', 'title')->setAttrib('class', 'no-clear')->setValue(self::TITLE)->setDecorators(array('ViewHelper')); $elements[] = $this->createElement('hidden', 'orientation')->setValue('landscape')->setAttrib('class', 'no-clear')->setDecorators(array('ViewHelper')); $this->removeElement('fk_id_dec'); $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('multiselect', 'fk_id_fefop_type_transaction')->setDecorators($this->getDefaultElementDecorators())->setAttrib('class', 'm-wrap span12 chosen')->addMultiOptions($optTypeTransaction)->setLabel('Tipu Transasaun'); $mapperFund = new Fefop_Model_Mapper_Fund(); $funds = $mapperFund->fetchAll(); $optFunds = array(); foreach ($funds as $fund) { $optFunds[$fund['id_fefopfund']] = $fund['name_fund']; } $elements[] = $this->createElement('multiselect', 'fk_id_fefopfund')->setDecorators($this->getDefaultElementDecorators())->setAttrib('class', 'm-wrap span12 chosen')->addMultiOptions($optFunds)->setLabel('Fundu'); $optStatus = array(); $optStatus['C'] = 'Consolidado'; $optStatus['P'] = 'Pendente'; $optStatus['A'] = 'Parcial'; $elements[] = $this->createElement('multiselect', 'status')->setDecorators($this->getDefaultElementDecorators())->setAttrib('class', 'm-wrap span12 chosen')->addMultiOptions($optStatus)->setLabel('Status'); $optPayment[''] = 'Hotu-hotu'; $optPayment['C'] = 'Kontratu'; $optPayment['F'] = 'Fundu'; $elements[] = $this->createElement('select', 'bank_payment')->setDecorators($this->getDefaultElementDecorators())->setAttrib('class', 'm-wrap span12 chosen')->addMultiOptions($optPayment)->setLabel('Pagamentu'); $this->addElements($elements); }
/** * */ public function init() { parent::init(); $elements = array(); $elements[] = $this->createElement('hidden', 'path')->setAttrib('class', 'no-clear')->setValue('client/visit-purpose-report')->setDecorators(array('ViewHelper')); $elements[] = $this->createElement('hidden', 'title')->setAttrib('class', 'no-clear')->setValue('Relatoriu: Objetivu Vizita')->setDecorators(array('ViewHelper')); $this->addElements($elements); }
/** * */ public function init() { parent::init(); $elements = array(); $elements[] = $this->createElement('hidden', 'path')->setAttrib('class', 'no-clear')->setValue('client/district-report')->setDecorators(array('ViewHelper')); $elements[] = $this->createElement('hidden', 'title')->setAttrib('class', 'no-clear')->setValue('Relatoriu: Kliente husi Distritu')->setDecorators(array('ViewHelper')); $this->addElements($elements); }
/** * */ public function init() { parent::init(); $elements = array(); $elements[] = $this->createElement('hidden', 'path')->setAttrib('class', 'no-clear')->setValue('job/placement-report')->setDecorators(array('ViewHelper')); $elements[] = $this->createElement('hidden', 'title')->setAttrib('class', 'no-clear')->setValue('Relatoriu: Job Placements')->setDecorators(array('ViewHelper')); $this->addElements($elements); }
/** * */ public function init() { parent::init(); $elements = array(); $elements[] = $this->createElement('hidden', 'path')->setAttrib('class', 'no-clear')->setValue('job/youth-indicator-report')->setDecorators(array('ViewHelper')); $elements[] = $this->createElement('hidden', 'title')->setAttrib('class', 'no-clear')->setValue('Relatoriu: Indikador juventude nian / 15 - 29')->setDecorators(array('ViewHelper')); $this->addElements($elements); }
/** * @access public * @return void */ public function init() { parent::init(); $elements = array(); $elements[] = $this->createElement('hidden', 'path')->setAttrib('class', 'no-clear')->setValue(self::PATH)->setDecorators(array('ViewHelper')); $elements[] = $this->createElement('hidden', 'title')->setAttrib('class', 'no-clear')->setValue(self::TITLE)->setDecorators(array('ViewHelper')); $this->getElement('fk_id_dec')->setRequired(false); $this->addElements($elements); }
/** * */ public function init() { parent::init(); $this->removeElement('date_start'); $this->removeElement('date_finish'); $elements = array(); $elements[] = $this->createElement('hidden', 'path')->setValue('admin/user-report')->setAttrib('class', 'no-clear')->setDecorators(array('ViewHelper')); $elements[] = $this->createElement('hidden', 'title')->setValue('Relatoriu: Uzuariu')->setAttrib('class', 'no-clear')->setDecorators(array('ViewHelper')); $this->addElements($elements); }
/** * */ public function init() { parent::init(); $this->removeElement('date_start'); $this->removeElement('date_finish'); $this->removeElement('fk_id_dec'); $this->removeElement('clear'); $elements = array(); $elements[] = $this->createElement('hidden', 'path')->setAttrib('class', 'no-clear')->setValue('sms/balance-report')->setDecorators(array('ViewHelper')); $elements[] = $this->createElement('hidden', 'title')->setAttrib('class', 'no-clear')->setValue('Relatoriu: Total Pulsa Departamentu')->setDecorators(array('ViewHelper')); $this->addElements($elements); }
/** * */ public function init() { parent::init(); $elements = array(); $this->removeElement('date_start'); $this->removeElement('date_finish'); $elements[] = $this->createElement('hidden', 'path')->setAttrib('class', 'no-clear')->setValue('client/age-group-quarter-report')->setDecorators(array('ViewHelper')); $elements[] = $this->createElement('hidden', 'title')->setAttrib('class', 'no-clear')->setValue('Relatoriu: Grupu Idade / Quarter')->setDecorators(array('ViewHelper')); $optYear[''] = ''; for ($i = 2005; $i <= date('Y') + 3; $i++) { $optYear[$i] = $i; } $elements[] = $this->createElement('select', 'year')->setDecorators($this->getDefaultElementDecorators())->setLabel('Tinan')->addMultiOptions($optYear)->setRequired(true)->setAttrib('class', 'm-wrap span12'); $this->addElements($elements); }
/** * */ public function init() { parent::init(); $elements = array(); $elements[] = $this->createElement('hidden', 'path')->setValue('student-class/area-report')->setAttrib('class', 'no-clear')->setDecorators(array('ViewHelper')); $elements[] = $this->createElement('hidden', 'title')->setValue('Relatoriu: Graduadu liu husi Area')->setAttrib('class', 'no-clear')->setDecorators(array('ViewHelper')); $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)->setRegisterInArrayValidator(false)->setAttrib('class', 'm-wrap span12 chosen'); $this->addElements($elements); }
/** * */ public function init() { parent::init(); $elements = array(); $elements[] = $this->createElement('hidden', 'path')->setValue('job/placement-report')->setDecorators(array('ViewHelper'))->setAttrib('class', 'no-clear'); $elements[] = $this->createElement('hidden', 'overseas')->setValue(1)->setDecorators(array('ViewHelper'))->setAttrib('class', 'no-clear'); $elements[] = $this->createElement('hidden', 'title')->setValue('Relatoriu: Job Placements Overseas')->setDecorators(array('ViewHelper'))->setAttrib('class', 'no-clear'); $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('Lokalizasaun Internasional')->addMultiOptions($optNations); $this->addElements($elements); }
/** * @access public * @return void */ public function init() { parent::init(); $elements = array(); $elements[] = $this->createElement('hidden', 'path')->setAttrib('class', 'no-clear')->setValue(self::PATH)->setDecorators(array('ViewHelper')); $elements[] = $this->createElement('hidden', 'title')->setAttrib('class', 'no-clear')->setValue(self::TITLE)->setDecorators(array('ViewHelper')); $optKonselleiru = array(); array_unshift($optKonselleiru, ''); $dbSysUser = App_Model_DbTable_Factory::get('SysUser'); $rows = $dbSysUser->fetchAll(array('active = ?' => 1)); foreach ($rows as $row) { $optKonselleiru[$row->id_sysuser] = $row->name; } $elements[] = $this->createElement('multiselect', 'fk_id_counselor')->setDecorators($this->getDefaultElementDecorators())->setLabel('Konselleiru')->addMultiOptions($optKonselleiru)->setAttrib('class', 'm-wrap span12 chosen'); $this->getElement('fk_id_dec')->setRequired(false); $this->addElements($elements); }
/** * @see Report_Form_StandardSearch::init() */ public function init() { parent::init(); $elements = array(); $elements[] = $this->createElement('hidden', 'path')->setAttrib('class', 'no-clear')->setDecorators(array('ViewHelper')); $elements[] = $this->createElement('hidden', 'title')->setAttrib('class', 'no-clear')->setDecorators(array('ViewHelper')); //CEOP $optCeop = $this->getElement('fk_id_dec')->getMultiOptions(); $this->removeElement('fk_id_dec'); $elements[] = $this->createElement('multiselect', 'fk_id_dec')->setDecorators($this->getDefaultElementDecorators())->setLabel('CEOP')->addMultiOptions($optCeop)->setRequired(true)->setAttrib('class', 'm-wrap span12 chosen'); //Programs $rows = App_Model_DbTable_Factory::get('FEFOPPrograms')->fetchAll(); $optProgram = array(); array_unshift($optProgram, ''); foreach ($rows as $row) { $optProgram[$row->id_fefop_programs] = $row->acronym . ' - ' . $row->description; } $elements[] = $this->createElement('multiselect', 'id_fefop_programs')->setLabel('Programa')->setRegisterInArrayValidator(false)->setAttrib('class', 'm-wrap span12 chosen')->setDecorators($this->getDefaultElementDecorators())->addMultiOptions($optProgram); //Modules $rows = App_Model_DbTable_Factory::get('FEFOPModules')->fetchAll(); $optModule = array(); array_unshift($optModule, ''); foreach ($rows as $row) { $optModule[$row->id_fefop_modules] = $row->acronym . ' - ' . $row->description; } $elements[] = $this->createElement('multiselect', 'id_fefop_modules')->setLabel('Modulu')->setRegisterInArrayValidator(false)->setAttrib('class', 'm-wrap span12 chosen')->setDecorators($this->getDefaultElementDecorators())->addMultiOptions($optModule); $this->addElements($elements); //Districts $rows = App_Model_DbTable_Factory::get('AddDistrict')->fetchAll(); $optDistrito = array(); array_unshift($optDistrito, ''); foreach ($rows as $row) { $optDistrito[$row->id_adddistrict] = $row->District; } $elements[] = $this->createElement('multiselect', 'id_adddistrict')->setLabel('Distritu')->setRegisterInArrayValidator(false)->setAttrib('class', 'm-wrap span12 chosen')->setDecorators($this->getDefaultElementDecorators())->addMultiOptions($optDistrito); //Status $rows = App_Model_DbTable_Factory::get('FEFOPStatus')->fetchAll(null, array('order ASC')); $optStatus = array(); array_unshift($optStatus, ''); foreach ($rows as $row) { $optStatus[$row->id_fefop_status] = $row->status_description; } $elements[] = $this->createElement('multiselect', 'id_fefop_status')->setLabel('Status')->setRegisterInArrayValidator(false)->setAttrib('class', 'm-wrap span12 chosen')->setDecorators($this->getDefaultElementDecorators())->addMultiOptions($optStatus); $this->addElements($elements); }
/** * */ public function init() { parent::init(); $this->removeElement('date_start'); $this->removeElement('date_finish'); $this->removeElement('fk_id_dec'); $elements = array(); $elements[] = $this->createElement('hidden', 'path')->setAttrib('class', 'no-clear')->setValue('register/course-report')->setDecorators(array('ViewHelper')); $elements[] = $this->createElement('hidden', 'title')->setAttrib('class', 'no-clear')->setValue('Relatoriu: Rejistu Kursu')->setDecorators(array('ViewHelper')); $elements[] = $this->createElement('hidden', 'orientation')->setValue('landscape')->setAttrib('class', 'no-clear')->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); $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); $dbLevelScholarity = App_Model_DbTable_Factory::get('PerLevelScholarity'); $rows = $dbLevelScholarity->fetchAll(array(), array('id_perlevelscholarity')); $optLevelScholarity[''] = ''; foreach ($rows as $row) { $optLevelScholarity[$row['id_perlevelscholarity']] = $row['level_scholarity']; } $elements[] = $this->createElement('select', 'fk_id_perlevelscholarity')->setDecorators($this->getDefaultElementDecorators())->addMultiOptions($optLevelScholarity)->setAttrib('class', 'm-wrap span12 chosen')->setLabel('Nivel'); $optCategory[''] = ''; $optCategory['S'] = 'Eskola'; $optCategory['U'] = 'Superior'; $optCategory['V'] = 'Formasaun Teknika Profisional'; $optCategory['C'] = 'Formasaun Comunitaria'; $optCategory['N'] = 'Formasaun Profisional'; $elements[] = $this->createElement('select', 'category_school')->setDecorators($this->getDefaultElementDecorators())->setAttrib('class', 'm-wrap span12 chosen')->addMultiOptions($optCategory)->setRegisterInArrayValidator(false)->setLabel('Kategoria'); $this->addElements($elements); }
/** * */ public function init() { parent::init(); $this->removeElement('date_start'); $this->removeElement('date_finish'); $elements = array(); $elements[] = $this->createElement('hidden', 'path')->setAttrib('class', 'no-clear')->setValue('register/enterprise-report')->setDecorators(array('ViewHelper')); $elements[] = $this->createElement('hidden', 'title')->setAttrib('class', 'no-clear')->setValue('Relatoriu: Rejistu Empreza')->setDecorators(array('ViewHelper')); $elements[] = $this->createElement('hidden', 'orientation')->setValue('landscape')->setAttrib('class', 'no-clear')->setDecorators(array('ViewHelper')); $mapperDistrict = new Register_Model_Mapper_AddDistrict(); $rows = $mapperDistrict->listAll(); $optDistrict[''] = ''; foreach ($rows as $row) { $optDistrict[$row->id_adddistrict] = $row->District; } $elements[] = $this->createElement('select', 'fk_id_adddistrict')->setDecorators($this->getDefaultElementDecorators())->setAttrib('class', 'm-wrap span12 chosen')->setLabel('Distritu')->addMultiOptions($optDistrict); $dbTypeEnterprise = App_Model_DbTable_Factory::get('FEFPTypeEnterprise'); $rows = $dbTypeEnterprise->fetchAll(array(), array('type_enterprise')); $optTypeEnterprise[''] = ''; foreach ($rows as $row) { $optTypeEnterprise[$row->id_fefptypeenterprise] = $row->type_enterprise; } $elements[] = $this->createElement('select', 'fk_fefptypeenterprite')->setDecorators($this->getDefaultElementDecorators())->setAttrib('class', 'm-wrap span12 chosen')->setLabel('Tipu Empreza')->addMultiOptions($optTypeEnterprise); $mapperClassTimor = new Register_Model_Mapper_IsicTimor(); $rows = $mapperClassTimor->listAll(); $optClassTimor[''] = ''; foreach ($rows as $row) { $optClassTimor[$row->id_isicclasstimor] = $row->name_classtimor; } $elements[] = $this->createElement('select', 'fk_id_sectorindustry')->setDecorators($this->getDefaultElementDecorators())->setAttrib('class', 'm-wrap span12 chosen')->setLabel('Setor da Industria')->addMultiOptions($optClassTimor); $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('Nasionalidade')->addMultiOptions($optCountry); $this->addElements($elements); }
/** * */ public function init() { parent::init(); $this->removeElement('date_start'); $this->removeElement('date_finish'); $this->removeElement('fk_id_dec'); $elements = array(); $elements[] = $this->createElement('hidden', 'path')->setAttrib('class', 'no-clear')->setValue('sms/campaign-report')->setDecorators(array('ViewHelper')); $elements[] = $this->createElement('hidden', 'title')->setAttrib('class', 'no-clear')->setValue('Relatoriu: Kampanha')->setDecorators(array('ViewHelper')); $elements[] = $this->createElement('hidden', 'orientation')->setValue('landscape')->setAttrib('class', 'no-clear')->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'); $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)->setAttrib('class', 'm-wrap span12 chosen'); $mapperDepartment = new Admin_Model_Mapper_Department(); $rows = $mapperDepartment->fetchAll(); $optDepartment[''] = ''; foreach ($rows as $row) { $optDepartment[$row->id_department] = $row->name; } $elements[] = $this->createElement('select', 'fk_id_department')->setDecorators($this->getDefaultElementDecorators())->setAttrib('class', 'm-wrap span12 chosen')->setLabel('Departamentu')->addMultiOptions($optDepartment); $mapperGroup = new Sms_Model_Mapper_Group(); $rows = $mapperGroup->fetchAll(); $optGroups = array(); foreach ($rows as $row) { $optGroups[$row['id_sms_group']] = $row['sms_group_name']; } $elements[] = $this->createElement('multiCheckbox', 'group')->setDecorators(array('ViewHelper'))->addMultiOptions($optGroups)->setAttrib('class', 'group-sending')->setRequired(true)->setSeparator(''); $view = $this->getView(); $optStatuses = $view->campaign()->getStatuses(); array_unshift($optStatuses, ''); $elements[] = $this->createElement('select', 'status_campaign')->setDecorators($this->getDefaultElementDecorators())->addMultiOptions($optStatuses)->setLabel('Status')->setAttrib('class', 'm-wrap span12'); $this->addElements($elements); }
/** * */ public function init() { parent::init(); $this->removeElement('fk_id_dec'); $elements = array(); $elements[] = $this->createElement('hidden', 'path')->setAttrib('class', 'no-clear')->setValue('sms/credit-report')->setDecorators(array('ViewHelper')); $elements[] = $this->createElement('hidden', 'title')->setAttrib('class', 'no-clear')->setValue('Relatoriu: Pulsa Departamentu')->setDecorators(array('ViewHelper')); $mapperDepartment = new Admin_Model_Mapper_Department(); $rows = $mapperDepartment->fetchAll(); $optDepartment[''] = ''; foreach ($rows as $row) { $optDepartment[$row->id_department] = $row->name; } $elements[] = $this->createElement('select', 'fk_id_department')->setDecorators($this->getDefaultElementDecorators())->setAttrib('class', 'm-wrap span12 chosen')->setLabel('Departamentu')->addMultiOptions($optDepartment); $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_sysuser')->setDecorators($this->getDefaultElementDecorators())->setAttrib('class', 'm-wrap span12 chosen')->setLabel('Uzuariu mak halo')->addMultiOptions($users); $this->addElements($elements); }