Exemple #1
0
 public function init()
 {
     $this->setAttrib('class', 'global_form form_search_dt')->setMethod('get');
     $don_vi = new Default_Model_DonVi();
     $dv = $don_vi->getDSDVSGU();
     unset($dv['1']);
     $dv = array('' => '') + $dv;
     $dvOptions = array("multiOptions" => $dv);
     $ma_don_vi = new Khcn_Form_Element_Select('ma_don_vi', $dvOptions);
     $ma_don_vi->setLabel('Đơn vị')->setAttribs(array('onchange' => 'this.form.submit()'));
     $this->addElement($ma_don_vi);
     $capQLs = Default_Model_Constraints::detai_capquanly();
     $capQLsOptions = array("multiOptions" => array('' => '') + $capQLs);
     $cap_quan_ly = new Khcn_Form_Element_Select('cap_quan_ly', $capQLsOptions);
     $cap_quan_ly->setLabel('Cấp quản lý')->setAttribs(array('id' => 'cap_quan_ly', 'onchange' => 'this.form.submit()'));
     $this->addElement($cap_quan_ly);
     $this->addDisplayGroup(array('ma_don_vi', 'cap_quan_ly'), 'submitbtn');
     $status = Default_Model_Constraints::detai_tinhtrang();
     $status = array('' => '') + $status;
     $statusOptions = array("multiOptions" => $status);
     $tinh_trang = new Khcn_Form_Element_Select('tinh_trang', $statusOptions);
     $tinh_trang->setLabel('Tình trạng')->setAttribs(array('onchange' => 'this.form.submit()'));
     $this->addElement($tinh_trang);
     $linh_vuc = new Default_Model_LinhVuc();
     $lv = $linh_vuc->getDSLV();
     $lv = array('' => '') + $lv;
     $lvOptions = array("multiOptions" => $lv);
     $ma_linh_vuc = new Khcn_Form_Element_Select('ma_linh_vuc', $lvOptions);
     $ma_linh_vuc->setLabel('Lĩnh vực')->setAttribs(array('onchange' => 'this.form.submit()'));
     $this->addElement($ma_linh_vuc);
     $sorts = array('' => 'Mã & Năm', 'ma' => 'Mã', 'nam' => 'Năm');
     $sortsOption = array("multiOptions" => $sorts);
     $order = new Khcn_Form_Element_Select('order', $sortsOption);
     $order->setLabel('Sắp xếp')->setAttribs(array('onchange' => 'this.form.submit()'));
     //$this->addElement($ma_don_vi);
     $directions = array('asc' => 'Tăng dần', 'desc' => 'Giảm dần');
     $directionsOption = array("multiOptions" => $directions);
     $direction = new Khcn_Form_Element_Select('direction', $directionsOption);
     $direction->setLabel('Sắp xếp')->setValue('desc')->setAttribs(array('onchange' => 'this.form.submit()'));
     //$this->addElement($ma_don_vi);
     $nams = array();
     for ($i = 2005; $i < 2030; $i++) {
         $nams[$i] = $i;
     }
     $nams = array('0' => '------') + $nams;
     $namsOption = array("multiOptions" => $nams);
     $from = new Khcn_Form_Element_Select('from', $namsOption);
     $from->setLabel('Từ ')->setValue(date('Y'))->setAttribs(array('onchange' => 'this.form.submit()'));
     $this->addElement($from);
     $to = new Khcn_Form_Element_Select('to', $namsOption);
     $to->setLabel('Đến ')->setAttribs(array('onchange' => 'this.form.submit()'));
     $this->addElement($to);
     //$this->addElements(array($ma_don_vi,$tinh_trang,$ma_linh_vuc,$order,$direction,$from,$to));
     //$this->addElements(array($ma_don_vi, $cap_quan_ly, $ma_linh_vuc, $tinh_trang, $from, $to));
 }
Exemple #2
0
 public function init()
 {
     $this->setName('f3')->setMethod('get');
     $nams = Default_Model_Constraints::nam();
     $nams = array('' => '== Tất cả ==') + $nams;
     $namOption = array("multiOptions" => $nams);
     $nam = new Zend_Form_Element_Select('nam', $namOption);
     $nam->setLabel('Năm')->setValue(date('Y'))->setDecorators(array('ViewHelper', array(array('data' => 'HtmlTag'), array('tag' => 'td')), array('Label', array('tag' => 'span')), array(array('row' => 'HtmlTag'), array('tag' => 'td', 'class' => 'title'))))->setAttribs(array('id' => 'nam', 'onchange' => 'this.form.submit()'));
     $expiredOption = array('' => '');
     for ($i = 1; $i <= 12; $i++) {
         $expiredOption[$i] = $i;
     }
     $expiredOption = array("multiOptions" => $expiredOption);
     $expired = new Zend_Form_Element_Select('expired', $expiredOption);
     $expired->setLabel('TG Hết hạn (T)')->setDecorators(array('ViewHelper', array(array('data' => 'HtmlTag'), array('tag' => 'td')), array('Label', array('tag' => 'span')), array(array('row' => 'HtmlTag'), array('tag' => 'td', 'class' => 'title'))))->setAttribs(array('id' => 'expired', 'onchange' => 'this.form.submit()'));
     $capQLs = Default_Model_Constraints::detai_capquanly();
     $capQLsOptions = array("multiOptions" => $capQLs);
     $cap_quan_ly = new Zend_Form_Element_Select('cap_quan_ly', $capQLsOptions);
     $cap_quan_ly->setLabel('Cấp QL')->setValue(2)->setDecorators(array('ViewHelper', 'Errors', array(array('data' => 'HtmlTag'), array('tag' => 'td')), array('Label', array('tag' => 'span')), array(array('row' => 'HtmlTag'), array('tag' => 'td', 'class' => 'title'))))->setAttribs(array('id' => 'cap_quan_ly', 'onchange' => 'this.form.submit()'));
     $status = Default_Model_Constraints::detai_tinhtrang();
     $status = array('' => '=== Tất cả ===') + $status;
     $statusOptions = array("multiOptions" => $status);
     $tinh_trang = new Zend_Form_Element_Select('tinh_trang', $statusOptions);
     $tinh_trang->setLabel('Tình trạng')->setDecorators(array('ViewHelper', 'Errors', array(array('data' => 'HtmlTag'), array('tag' => 'td', 'class' => 'status')), array('Label', array('tag' => 'span')), array(array('row' => 'HtmlTag'), array('tag' => 'td', 'class' => 'title'))))->setAttribs(array('id' => 'tinh_trang', 'onchange' => 'this.form.submit()'));
     $linh_vuc = new Default_Model_LinhVuc();
     $lv = $linh_vuc->getDSLV();
     $lv = array('' => '===== Tất cả =====') + $lv;
     $lvOptions = array("multiOptions" => $lv);
     $ma_linh_vuc = new Zend_Form_Element_Select('ma_linh_vuc', $lvOptions);
     $ma_linh_vuc->setLabel('Lĩnh vực')->setDecorators(array('ViewHelper', 'Errors', array(array('data' => 'HtmlTag'), array('tag' => 'td')), array('Label', array('tag' => 'span')), array(array('row' => 'HtmlTag'), array('tag' => 'td'))))->setAttribs(array('id' => 'ma_linh_vuc', 'onchange' => 'this.form.submit()'));
     $llv = Khcn_Api::_()->getDbTable('loai_linh_vuc', 'default')->getMultiOptions();
     $llv = array('' => '===== Tất cả =====') + $llv;
     $llvOptions = array("multiOptions" => $llv);
     $loai_linh_vuc = new Zend_Form_Element_Select('loai_linh_vuc', $llvOptions);
     $loai_linh_vuc->setLabel('Loại đề tài')->setDecorators(array('ViewHelper', 'Errors', array(array('data' => 'HtmlTag'), array('tag' => 'td')), array('Label', array('tag' => 'span')), array(array('row' => 'HtmlTag'), array('tag' => 'td'))))->setAttribs(array('id' => 'loai_linh_vuc', 'onchange' => 'this.form.submit()'));
     $don_vi = new Default_Model_DonVi();
     $dv = $don_vi->getDSDVSGU();
     unset($dv[Default_Model_Constraints::ID_DHSG]);
     $dv = array('' => '============= Tất cả =============') + $dv;
     $dvOptions = array("multiOptions" => $dv);
     $ma_don_vi = new Zend_Form_Element_Select('ma_don_vi', $dvOptions);
     $ma_don_vi->setLabel('Đơn vị')->setSeparator('')->setDecorators(array('ViewHelper', 'Errors', array(array('data' => 'HtmlTag'), array('tag' => 'td', 'colspan' => 3)), array('Label', array('tag' => 'span')), array(array('row' => 'HtmlTag'), array('tag' => 'td'))))->setAttribs(array('id' => 'ma_don_vi', 'onchange' => 'this.form.submit()'));
     $bo_mon_id = new Zend_Form_Element_Select('bo_mon_id');
     $bo_mon_id->setLabel('Bộ môn')->setDecorators(array('ViewHelper', 'Errors', array(array('data' => 'HtmlTag'), array('tag' => 'td')), array('Label', array('tag' => 'span')), array(array('row' => 'HtmlTag'), array('tag' => 'td', 'id' => 'bo_mon_id-wrapper'))))->setAttribs(array('id' => 'bo_mon_id', 'onchange' => 'this.form.submit()'));
     $submit = new Zend_Form_Element_Button('loc', array('type' => 'submit'));
     $submit->setLabel('Lọc')->setDecorators(array('ViewHelper', array(array('data' => 'HtmlTag'), array('tag' => 'span')), array(array('row' => 'HtmlTag'), array('tag' => 'span', 'class' => 'filter_btn_l'))))->setAttribs(array('class' => 'button'));
     $url = new Zend_View_Helper_Url();
     $link = $url->url(array('module' => 'admin', 'controller' => 'de-tai', 'action' => 'index'), null, true);
     $reset = new Zend_Form_Element_Button('reset');
     $reset->setLabel('Làm mới')->setDecorators(array('ViewHelper', array(array('data' => 'HtmlTag'), array('tag' => 'span')), array(array('row' => 'HtmlTag'), array('tag' => 'span', 'class' => 'filter_btn_r'))))->setAttribs(array('class' => 'button', 'id' => 'reset', 'onclick' => 'window.location.href="' . $link . '"'));
     $link = $url->url(array('module' => 'admin', 'controller' => 'hoi-dong', 'action' => 'them-hdd'), null, true);
     $them_hdd = new Zend_Form_Element_Button('them_hdd');
     $them_hdd->setLabel('Thành lập Hội đồng duyệt')->setDecorators(array('ViewHelper', array(array('data' => 'HtmlTag'), array('tag' => 'span')), array(array('row' => 'HtmlTag'), array('tag' => 'span', 'class' => 'filter_btn_r'))))->setAttribs(array('class' => 'button', 'id' => 'them_hdd', 'onclick' => 'window.location.href="' . $link . '"'));
     $this->addElements(array($nam, $ma_linh_vuc, $loai_linh_vuc, $cap_quan_ly, $tinh_trang, $ma_don_vi, $bo_mon_id, $expired, $reset, $them_hdd));
     // Element: order
     $this->addElement('Hidden', 'order', array('order' => 10004));
     // Element: direction
     $this->addElement('Hidden', 'direction', array('order' => 10005));
     $this->addDisplayGroup(array('nam', 'ma_linh_vuc', 'loai_linh_vuc'), 'group2', array('order' => 0, 'decorators' => array('FormElements', array('HtmlTag', array('tag' => 'tr', 'class' => 'group2')))));
     $this->addDisplayGroup(array('tinh_trang', 'cap_quan_ly', 'expired'), 'group3', array('order' => 1, 'decorators' => array('FormElements', array('HtmlTag', array('tag' => 'tr', 'class' => 'group3')))));
     $this->addDisplayGroup(array('ma_don_vi', 'bo_mon_id'), 'group4', array('order' => 2, 'decorators' => array('FormElements', array('HtmlTag', array('tag' => 'tr', 'class' => 'group4')))));
     $this->addDisplayGroup(array('reset', 'them_hdd'), 'group1', array('order' => 3, 'decorators' => array('FormElements', array('HtmlTag', array('tag' => 'td', 'class' => 'group1', 'colspan' => 8)))));
     $this->setDecorators(array('FormElements', array('HtmlTag', array('tag' => 'table', 'class' => 'filter_dt')), 'Form'));
 }
 public function baiGiangAction()
 {
     $params = Default_Model_Functions::filterParams($this->_getAllParams());
     $this->view->form = $form = new Default_Form_SearchDT();
     $form->populate($params);
     if (empty($params['from'])) {
         $params['from'] = date('Y');
     }
     if (empty($params['direction'])) {
         $params['direction'] = 'DESC';
     }
     $params['loai_linh_vuc'] = 'bai-giang';
     $deTais = Khcn_Api::_()->getDbTable('de_tai', 'default')->getDeTais($params);
     //Set the properties for the pagination
     $paginator = Zend_Paginator::factory($deTais);
     $paginator->setItemCountPerPage(20);
     $paginator->setPageRange(10);
     $paginator->setCurrentPageNumber($this->_getParam('page', 1));
     Zend_Paginator::setDefaultScrollingStyle('Sliding');
     Zend_View_Helper_PaginationControl::setDefaultViewPartial('includes/pagination.phtml');
     $paginator->setView($this->view);
     $this->view->paginator = $paginator;
     $this->view->capQLs = $capQLs = Default_Model_Constraints::detai_capquanly();
 }
Exemple #4
0
 public function init()
 {
     $this->setName('f2')->setMethod('post');
     $this->addElement('Hidden', 'search', array('value' => 1));
     $code = new Zend_Form_Element_Hidden('code');
     $code->setValue(0)->setAttrib('id', 'code')->removeDecorator('label');
     $ma = new Zend_Form_Element_Text('ma');
     $ma->setLabel('Mã đề tài (*)')->setDescription('vd : CS2000-01')->addFilter('StripTags')->addFilter('StringTrim')->addFilter('StringToUpper')->addValidator(new Zend_Validate_StringLength(0, 15))->setDecorators(array('ViewHelper', 'Errors', array('Description', array('tag' => 'small', 'style' => 'display : block')), array(array('data' => 'HtmlTag'), array('tag' => 'td', 'style' => 'width: 85%')), array('Label', array('tag' => 'td')), array(array('row' => 'HtmlTag'), array('tag' => 'tr'))))->setAttribs(array('class' => 'text-input', 'id' => 'ma'))->setOrder(0);
     $ten = new Zend_Form_Element_Text('ten');
     $ten->setLabel('Tên đề tài (*)')->setRequired(true)->addFilter('StripTags')->addFilter('StringTrim')->addValidator('NotEmpty')->setDecorators(array('ViewHelper', 'Errors', array(array('data' => 'HtmlTag'), array('tag' => 'td')), array('Label', array('tag' => 'td')), array(array('row' => 'HtmlTag'), array('tag' => 'tr'))))->setAttrib('class', 'text-input large-input')->setOrder(1);
     $namOptions = array("multiOptions" => Default_Model_Constraints::nam());
     $nam = new Zend_Form_Element_Select('nam', $namOptions);
     $nam->setRequired(true)->setLabel('Năm (*)')->setValue(date('Y'))->setDecorators(array('ViewHelper', 'Errors', array(array('data' => 'HtmlTag'), array('tag' => 'td')), array('Label', array('tag' => 'td')), array(array('row' => 'HtmlTag'), array('tag' => 'tr'))))->setAttribs(array('id' => 'nam'))->setOrder(2);
     $don_vi = new Default_Model_DonVi();
     $donVis = $don_vi->getDSDVSGU();
     unset($donVis['1']);
     $dvOptions = array("multiOptions" => $donVis);
     $ma_don_vi = new Zend_Form_Element_Select('ma_don_vi', $dvOptions);
     $ma_don_vi->setRequired(true)->setLabel('Đơn vị (*)')->setDecorators(array('ViewHelper', 'Errors', array(array('data' => 'HtmlTag'), array('tag' => 'td')), array('Label', array('tag' => 'td')), array(array('row' => 'HtmlTag'), array('tag' => 'tr'))))->setAttribs(array('class' => 'text-input', 'id' => 'ma_don_vi'))->setOrder(3);
     $bmOptions = array("multiOptions" => Khcn_Api::_()->getDbTable('bo_mon', 'default')->getBoMonByDonViAssoc(2));
     $bo_mon_id = new Zend_Form_Element_Select('bo_mon_id', $bmOptions);
     $bo_mon_id->setLabel('Bộ môn')->setDecorators(array('ViewHelper', 'Errors', array(array('data' => 'HtmlTag'), array('tag' => 'td')), array('Label', array('tag' => 'td')), array(array('row' => 'HtmlTag'), array('tag' => 'tr', 'id' => 'bo_mon_id-wrapper'))))->setAttribs(array('class' => 'text-input', 'id' => 'bo_mon_id'))->setRegisterInArrayValidator(false)->setOrder(4);
     $giang_vien = new Default_Model_GiangVien();
     $gvOptions = array("multiOptions" => $giang_vien->getDSGVByDV(2));
     $chu_nhiem = new Zend_Form_Element_Select('chu_nhiem', $gvOptions);
     $chu_nhiem->setRequired(true)->setLabel('Chủ nhiệm (*)')->setDecorators(array('ViewHelper', 'Errors', array(array('data' => 'HtmlTag'), array('tag' => 'td')), array('Label', array('tag' => 'td')), array(array('row' => 'HtmlTag'), array('tag' => 'tr'))))->setAttribs(array('class' => 'text-input', 'id' => 'chu_nhiem'))->setRegisterInArrayValidator(false)->setOrder(5);
     $them_tv = new Zend_Form_Element_Button('them_tv');
     $them_tv->setLabel('Thêm thành viên')->setDecorators(array('ViewHelper', array(array('data' => 'HtmlTag'), array('tag' => 'span')), array(array('row' => 'HtmlTag'), array('tag' => 'span'))))->setAttribs(array('class' => 'button'));
     $xoa_tv = new Zend_Form_Element_Button('xoa_tv');
     $xoa_tv->setLabel('Xóa thành viên')->setDecorators(array('ViewHelper', array(array('data' => 'HtmlTag'), array('tag' => 'span')), array(array('row' => 'HtmlTag'), array('tag' => 'span'))))->setAttribs(array('class' => 'button'));
     $linh_vuc = new Default_Model_LinhVuc();
     $lvOptions = array("multiOptions" => $linh_vuc->getDSLV());
     $ma_linh_vuc = new Zend_Form_Element_Select('ma_linh_vuc', $lvOptions);
     $ma_linh_vuc->setRequired(true)->setLabel('Lĩnh vực (*)')->setDecorators(array('ViewHelper', 'Errors', array(array('data' => 'HtmlTag'), array('tag' => 'td')), array('Label', array('tag' => 'td')), array(array('row' => 'HtmlTag'), array('tag' => 'tr'))))->setOrder(90);
     $statusOptions = array("multiOptions" => Default_Model_Constraints::detai_tinhtrang());
     $tinh_trang = new Zend_Form_Element_Select('tinh_trang', $statusOptions);
     $tinh_trang->setRequired(true)->setLabel('Tình trạng (*)')->setValue('0')->setDecorators(array('ViewHelper', 'Errors', array(array('data' => 'HtmlTag'), array('tag' => 'td')), array('Label', array('tag' => 'td')), array(array('row' => 'HtmlTag'), array('tag' => 'tr'))))->setOrder(91);
     $thoi_gian_bat_dau = new Zend_Form_Element_Text('thoi_gian_bat_dau');
     $thoi_gian_bat_dau->setLabel('Ngày bắt đầu (*)')->setDescription('(YYYY-mm-dd)')->setRequired(true)->addFilter('StripTags')->addValidator('NotEmpty')->setDecorators(array('ViewHelper', 'Errors', array('Description', array('tag' => 'span')), array(array('data' => 'HtmlTag'), array('tag' => 'td', 'style' => 'width: 85%')), array('Label', array('tag' => 'td')), array(array('row' => 'HtmlTag'), array('tag' => 'tr'))))->setAttribs(array('class' => 'text-input', 'id' => 'thoi_gian_bat_dau'))->setOrder(92);
     $thoi_gian_hoan_thanh = new Zend_Form_Element_Text('thoi_gian_hoan_thanh');
     $thoi_gian_hoan_thanh->setLabel('Ngày hoàn thành(*)')->setDescription('(YYYY-mm-dd)')->setRequired(true)->addFilter('StripTags')->addValidator('NotEmpty')->setDecorators(array('ViewHelper', 'Errors', array('Description', array('tag' => 'span')), array(array('data' => 'HtmlTag'), array('tag' => 'td')), array('Label', array('tag' => 'td')), array(array('row' => 'HtmlTag'), array('tag' => 'tr'))))->setAttribs(array('class' => 'text-input', 'id' => 'thoi_gian_hoan_thanh'))->setOrder(93);
     $cqlOptions = array("multiOptions" => Default_Model_Constraints::detai_capquanly());
     $cap_quan_ly = new Zend_Form_Element_Select('cap_quan_ly', $cqlOptions);
     $cap_quan_ly->setRequired(true)->setLabel('Cấp quản lý (*)')->setValue('2')->setDecorators(array('ViewHelper', 'Errors', array(array('data' => 'HtmlTag'), array('tag' => 'td')), array('Label', array('tag' => 'td')), array(array('row' => 'HtmlTag'), array('tag' => 'tr'))))->setOrder(94);
     $loai_dt = new Default_Model_LoaiDt();
     $ldtOptions = array("multiOptions" => $loai_dt->getDSLDT());
     $ma_loai = new Zend_Form_Element_Select('ma_loai', $ldtOptions);
     $ma_loai->setLabel('Loại đề tài')->setValue('0')->setDecorators(array('ViewHelper', 'Errors', array(array('data' => 'HtmlTag'), array('tag' => 'td')), array('Label', array('tag' => 'td')), array(array('row' => 'HtmlTag'), array('tag' => 'tr'))))->setOrder(95);
     $stghOptions = array("multiOptions" => Default_Model_Constraints::detai_stgh());
     $so_thang_gia_han = new Zend_Form_Element_Select('so_thang_gia_han', $stghOptions);
     $so_thang_gia_han->setLabel('Số tháng gia hạn')->setValue('0')->setDecorators(array('ViewHelper', 'Errors', array(array('data' => 'HtmlTag'), array('tag' => 'td')), array('Label', array('tag' => 'td')), array(array('row' => 'HtmlTag'), array('tag' => 'tr'))))->setOrder(96);
     $ngay_gia_han = new Zend_Form_Element_Text('ngay_gia_han');
     $ngay_gia_han->setLabel('Ngày gia hạn')->setDescription('(YYYY-mm-dd)')->setDecorators(array('ViewHelper', 'Errors', array('Description', array('tag' => 'span')), array(array('data' => 'HtmlTag'), array('tag' => 'td', 'style' => 'width: 85%')), array('Label', array('tag' => 'td')), array(array('row' => 'HtmlTag'), array('tag' => 'tr'))))->setAttribs(array('class' => 'text-input', 'id' => 'ngay_gia_han'))->setOrder(97);
     $kinh_phi = new Zend_Form_Element_Text('kinh_phi');
     $kinh_phi->setLabel('Kinh phí')->setDescription('(VNĐ)')->addFilter('StringTrim')->setDecorators(array('ViewHelper', array('Description', array('tag' => 'small')), 'Errors', array(array('data' => 'HtmlTag'), array('tag' => 'td')), array('Label', array('tag' => 'td')), array(array('row' => 'HtmlTag'), array('tag' => 'tr'))))->setAttribs(array('class' => 'text-input', 'onkeypress' => 'return inputNumber(event)', 'onkeyup' => 'formatInt(this)'))->setOrder(98);
     $xlOptions = array("multiOptions" => Default_Model_Constraints::detai_xeploai());
     $xep_loai = new Zend_Form_Element_Select('xep_loai', $xlOptions);
     $xep_loai->setLabel('Xếp loại')->setValue('0')->setDecorators(array('ViewHelper', 'Errors', array(array('data' => 'HtmlTag'), array('tag' => 'td')), array('Label', array('tag' => 'td')), array(array('row' => 'HtmlTag'), array('tag' => 'tr'))))->setOrder(99);
     $file_tom_tat = new Zend_Form_Element_File('file_tom_tat');
     $file_tom_tat->setLabel('File Tóm Tắt')->setDescription('(*.doc, *.docx, *.pdf , < 10MB )')->setDestination(BASE_PATH . '/upload/files/de_tai')->addValidator(new Zend_Validate_File_Extension(array('doc,docx,pdf')))->addValidator(new Zend_Validate_File_FilesSize(array('min' => 1, 'max' => 10485760, 'bytestring' => true)))->setDecorators(array('File', 'Errors', array('Description', array('escape' => false, 'tag' => 'div', 'placement' => 'append')), array('HtmlTag', array('tag' => 'td')), array('Label', array('tag' => 'td')), array(array('row' => 'HtmlTag'), array('tag' => 'tr'))))->setOrder(100);
     $ghi_chu = new Zend_Form_Element_Textarea('ghi_chu');
     $ghi_chu->setLabel('Ghi chú')->addFilter('StripTags')->addFilter('StringTrim')->setDecorators(array('ViewHelper', 'Errors', array(array('data' => 'HtmlTag'), array('tag' => 'td')), array('Label', array('tag' => 'td')), array(array('row' => 'HtmlTag'), array('tag' => 'tr'))))->setAttribs(array('id' => 'ghi_chu', 'class' => 'textarea', 'rows' => '4'))->setOrder(101);
     $submitCon = new Zend_Form_Element_Submit('submitCon');
     $submitCon->setDecorators(array('ViewHelper', array(array('data' => 'HtmlTag'), array('tag' => 'span')), array(array('row' => 'HtmlTag'), array('tag' => 'span'))))->setAttribs(array('class' => 'button'));
     $submitExit = new Zend_Form_Element_Submit('submitExit');
     $submitExit->setDecorators(array('ViewHelper', array(array('data' => 'HtmlTag'), array('tag' => 'span')), array(array('row' => 'HtmlTag'), array('tag' => 'span'))))->setAttribs(array('class' => 'button'));
     $url = new Zend_View_Helper_Url();
     $link = $url->url(array('module' => 'admin', 'controller' => 'de-tai', 'action' => 'index'), null, true);
     $cancel = new Zend_Form_Element_Button('cancel');
     $cancel->setDecorators(array('ViewHelper', array(array('data' => 'HtmlTag'), array('tag' => 'span')), array(array('row' => 'HtmlTag'), array('tag' => 'span'))))->setAttribs(array('class' => 'button', 'onclick' => 'window.location.href="' . $link . '"'));
     $this->addElements(array($code, $ma, $ten, $nam, $ma_don_vi, $bo_mon_id, $chu_nhiem, $them_tv, $xoa_tv, $ma_linh_vuc, $tinh_trang, $thoi_gian_bat_dau, $thoi_gian_hoan_thanh, $cap_quan_ly, $ma_loai, $so_thang_gia_han, $ngay_gia_han, $kinh_phi, $xep_loai, $file_tom_tat, $ghi_chu, $submitCon, $submitExit, $cancel));
     $this->addDisplayGroup(array('submitCon', 'submitExit', 'cancel'), 'submit', array('order' => 102, 'decorators' => array('FormElements', array(array('data' => 'HtmlTag'), array('tag' => 'td', 'colspan' => 2)), array(array('row' => 'HtmlTag'), array('tag' => 'td')), array('HtmlTag', array('tag' => 'tr', 'id' => 'btn')))));
     $this->addDisplayGroup(array('them_tv', 'xoa_tv'), 'dang_ky', array('order' => 89, 'decorators' => array('FormElements', array(array('data' => 'HtmlTag'), array('tag' => 'td', 'colspan' => 2)), array(array('row' => 'HtmlTag'), array('tag' => 'td')), array('HtmlTag', array('tag' => 'tr', 'id' => 'btn_dk')))));
     $this->setDecorators(array('FormElements', 'Fieldset', array('HtmlTag', array('tag' => 'table', 'class' => 'de_tai')), 'Form'));
 }
Exemple #5
0
 public function getTenCapQuanLy()
 {
     $capQLs = Default_Model_Constraints::detai_capquanly();
     return $capQLs[$this->cap_quan_ly];
 }