本文整理汇总了PHP中Zend_View_Helper_Url类的典型用法代码示例。如果您正苦于以下问题:PHP Zend_View_Helper_Url类的具体用法?PHP Zend_View_Helper_Url怎么用?PHP Zend_View_Helper_Url使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。
在下文中一共展示了Zend_View_Helper_Url类的20个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的PHP代码示例。
示例1: init
public function init()
{
$this->_adminModel = new Application_Model_Admin();
$this->setMethod('post');
$this->setName('editproduct');
$this->setAction('');
//recupero il prodotto da modificare
//$this->_default = $this->_adminModel->getProdById($this->_id);
//nome del prodotto
$this->addElement('text', 'Nome', array('label' => 'Nome', 'filters' => array('StringTrim'), 'required' => true, 'validators' => array(array('StringLength', true, array(1, 25))), 'decorators' => $this->elementDecorators));
$this->addElement('text', 'DescrizioneBreve', array('label' => 'Descrizione Breve', 'required' => true, 'filters' => array('StringTrim'), 'validators' => array(array('StringLength', true, array(1, 250))), 'decorators' => $this->elementDecorators));
$this->addElement('textarea', 'DescrizioneLunga', array('label' => 'Descrizione Estesa', 'cols' => '60', 'rows' => '10', 'filters' => array('StringTrim'), 'required' => true, 'validators' => array(array('StringLength', true, array(1, 2500))), 'decorators' => $this->elementDecorators));
$this->addElement('multiCheckbox', 'Componenti', array('label' => 'Componenti', 'required' => 'true', 'decorators' => $this->elementDecorators, 'registerInArrayValidator' => false));
$urlHelper = new Zend_View_Helper_Url();
$url = $urlHelper->url(array('controller' => 'admin', 'action' => 'addcomponent'), 'default');
$this->addElement('Note', 'AddComponenti', array('value' => '<a href="' . $url . '">Inserisci un nuovo componente</a>', 'decorators' => $this->elementDecorators));
$this->addElement('multiCheckbox', 'Ntbu', array('label' => 'Note tecniche di buon uso', 'required' => 'true', 'decorators' => $this->elementDecorators, 'registerInArrayValidator' => false));
$urlHelper = new Zend_View_Helper_Url();
$url = $urlHelper->url(array('controller' => 'admin', 'action' => 'addntbu'), 'default');
$this->addElement('Note', 'AddNtbu', array('value' => '<a href="' . $url . '">Inserisci una nuova ntbu</a>', 'decorators' => $this->elementDecorators));
$this->addElement('text', 'Cilindrata', array('label' => 'Cilindrata', 'filters' => array('StringTrim'), 'required' => true, 'validators' => array(array('Int', true), array('Between', true, array(0, 10000))), 'decorators' => $this->elementDecorators));
$this->addElement('text', 'Potenza', array('label' => 'Potenza (kW)', 'filters' => array('StringTrim'), 'required' => true, 'validators' => array(array('Int', true), array('GreaterThan', true, array(0))), 'decorators' => $this->elementDecorators));
$this->addElement('text', 'MassaVuoto', array('label' => 'Massa a vuoto', 'filters' => array('StringTrim'), 'required' => true, 'validators' => array(array('Int', true), array('GreaterThan', true, array(0))), 'decorators' => $this->elementDecorators));
$this->addElement('text', 'VelocitaMax', array('label' => 'Velocità massima', 'filters' => array('StringTrim'), 'required' => true, 'validators' => array(array('Int', true), array('GreaterThan', true, array(0))), 'decorators' => $this->elementDecorators));
$this->addElement('submit', 'add', array('label' => 'Modifica Prodotto', 'decorators' => $this->buttonDecorators));
$this->setDecorators(array('FormElements', array('HtmlTag', array('tag' => 'table')), array('Description', array('placement' => 'prepend', 'class' => 'formerror')), 'Form'));
}
开发者ID:alessandrocaprarelli,项目名称:Grp_55,代码行数:27,代码来源:Edit.php
示例2: init
public function init()
{
$this->setName('f2')->setMethod('post');
$thangOptions = Default_Model_Constraints::lichct_thang();
$thang = new Zend_Form_Element_Select('thang');
$thang->setLabel('Tháng (*)')->setValue(date('m'))->setRequired(true)->addMultiOptions($thangOptions)->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');
$this->addElement($thang);
$tuanOptions = Default_Model_Constraints::lichct_tuan();
$tuan = new Zend_Form_Element_Select('tuan');
$tuan->setLabel('Tuần (*)')->setRequired(true)->addMultiOptions($tuanOptions)->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');
$this->addElement($tuan);
$ngay_bat_dau = new Zend_Form_Element_Text('ngay_bat_dau');
$ngay_bat_dau->setLabel('Ngày bắt đầu (*)')->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' => 'ngay_bat_dau'));
$this->addElement($ngay_bat_dau);
$ngay_ket_thuc = new Zend_Form_Element_Text('ngay_ket_thuc');
$ngay_ket_thuc->setLabel('Ngày kết thúc (*)')->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' => 'ngay_ket_thuc'));
$this->addElement($ngay_ket_thuc);
$ghi_chu = new Zend_Form_Element_Textarea('ghi_chu');
$ghi_chu->setLabel('Ghi chú')->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' => 'text-input textarea', 'rows' => 4));
$this->addElement($ghi_chu);
$submit = new Zend_Form_Element_Submit('submit');
$submit->setLabel('Lưu')->setDecorators(array('ViewHelper', array(array('data' => 'HtmlTag'), array('tag' => 'span')), array(array('row' => 'HtmlTag'), array('tag' => 'span'))))->setAttribs(array('class' => 'button'));
$this->addElement($submit);
$url = new Zend_View_Helper_Url();
$link = $url->url(array('module' => 'admin', 'controller' => 'lich-cong-tac', 'action' => 'index'), null, true);
$cancel = new Zend_Form_Element_Button('cancel');
$cancel->setLabel('Không lưu')->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->addElement($cancel);
$this->addDisplayGroup(array('submit', 'cancel'), 'submitbtn', array('decorators' => array('FormElements', array(array('data' => 'HtmlTag'), array('tag' => 'td', 'colspan' => 2)), array(array('row' => 'HtmlTag'), array('tag' => 'td')))));
$this->setDecorators(array('FormElements', array('HtmlTag', array('tag' => 'table')), 'Form'));
}
开发者ID:nhochong,项目名称:qlkh-sgu,代码行数:31,代码来源:Create.php
示例3: init
public function init()
{
$this->setName('f2')->setMethod('post');
$id = new Zend_Form_Element_Hidden('id');
$id->addFilter('Int');
$ma = new Zend_Form_Element_Text('ma');
$ma->setLabel('Mã')->addFilter('StripTags')->addFilter('StringTrim')->addFilter('StringToUpper')->addValidator(new Zend_Validate_StringLength(0, 10))->setDecorators(array('ViewHelper', 'Errors', 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'));
$ten = new Zend_Form_Element_Text('ten');
$ten->setLabel('Tên (*)')->setRequired(true)->addFilter('StripTags')->addFilter('StringTrim')->addValidator('NotEmpty')->addValidator(new Zend_Validate_StringLength(0, 250))->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 medium-input');
$ofSGUOptions = array("multiOptions" => array('1' => 'Thuộc', '0' => 'Không thuộc'));
$thuoc_sgu = new Zend_Form_Element_Radio('thuoc_sgu', $ofSGUOptions);
$thuoc_sgu->setRequired(true)->setLabel('Thuộc SGU')->setValue('1')->setDecorators(array('ViewHelper', 'Errors', array(array('data' => 'HtmlTag'), array('tag' => 'td')), array('Label', array('tag' => 'td')), array(array('row' => 'HtmlTag'), array('tag' => 'tr', 'class' => 'radio_inline'))))->setAttribs(array('id' => 'thuoc_sgu'));
$deptOptions = array("multiOptions" => array('1' => 'Khoa - Bộ môn TT', '0' => 'Phòng ban - Trung tâm'));
$la_khoa = new Zend_Form_Element_Radio('la_khoa', $deptOptions);
$la_khoa->setRequired(true)->setLabel('Loại đơn vị')->setValue('1')->setDecorators(array('ViewHelper', 'Errors', array(array('data' => 'HtmlTag'), array('tag' => 'td')), array('Label', array('tag' => 'td')), array(array('row' => 'HtmlTag'), array('tag' => 'tr', 'id' => 'la_khoa', 'class' => 'radio_inline'))));
$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' => 'don-vi', '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($id, $ma, $ten, $thuoc_sgu, $la_khoa, $submitCon, $submitExit, $cancel));
$this->addDisplayGroup(array('submitCon', 'submitExit', 'cancel'), 'submit', array('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->setDecorators(array('FormElements', array('HtmlTag', array('tag' => 'table', 'class' => 'don_vi')), 'Form'));
}
开发者ID:nhochong,项目名称:qlkh-sgu,代码行数:27,代码来源:DonVi.php
示例4: init
public function init()
{
$this->setName('f2')->setAttrib('enctype', 'multipart/form-data')->setAttrib('class', 'form_create_tai_lieu');
$this->addElement('Hidden', 'search', array('value' => 1));
$ten = new Zend_Form_Element_Text('ten');
$ten->setLabel('Chuyên đề (*)')->setRequired(true)->addFilter('StripTags')->addFilter('StringTrim')->addValidator('NotEmpty')->setDecorators(array('ViewHelper', 'Errors', array(array('data' => 'HtmlTag'), array('tag' => 'td', 'style' => 'width: 85%')), array('Label', array('tag' => 'td')), array(array('row' => 'HtmlTag'), array('tag' => 'tr'))))->setAttrib('class', 'text-input large-input');
$noi_dung = new Zend_Form_Element_Textarea('noi_dung');
$noi_dung->setLabel('Nội dung (*)')->setRequired(true)->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'))))->setAttribs(array('id' => 'noi_dung', 'class' => 'text-input textarea'));
$thoi_gian = new Zend_Form_Element_Text('thoi_gian');
$thoi_gian->setLabel('Ngày tổ chức')->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'));
$dia_diem = new Zend_Form_Element_Text('dia_diem');
$dia_diem->setLabel('Địa điểm')->setDecorators(array('ViewHelper', 'Errors', array(array('data' => 'HtmlTag'), array('tag' => 'td', 'style' => 'width: 85%')), array('Label', array('tag' => 'td')), array(array('row' => 'HtmlTag'), array('tag' => 'tr'))))->setAttrib('class', 'text-input medium-input');
$file = new Zend_Form_Element_File('file');
$file->setLabel('Upload file')->setDescription('(*.doc, *.docx, *.pdf , < 10MB )')->setDestination(BASE_PATH . '/upload/files/sinh_hoat_chuyen_de')->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'))));
$submitCon = new Zend_Form_Element_Submit('submitCon');
$submitCon->setLabel('Lưu và tiếp tục')->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->setLabel('Lưu và thoát')->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' => 'sinh-hoat-chuyen-de', 'action' => 'index'), null, true);
$cancel = new Zend_Form_Element_Button('cancel');
$cancel->setLabel('Không lưu')->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($ten, $noi_dung, $thoi_gian, $dia_diem, $file, $submitCon, $submitExit, $cancel));
$this->addDisplayGroup(array('submitCon', 'submitExit', 'cancel'), 'submit', array('decorators' => array('FormElements', array(array('data' => 'HtmlTag'), array('tag' => 'td', 'colspan' => 2)), array(array('row' => 'HtmlTag'), array('tag' => 'td')))));
$this->setDecorators(array('FormElements', array('HtmlTag', array('tag' => 'table')), 'Form'));
}
开发者ID:nhochong,项目名称:qlkh-sgu,代码行数:26,代码来源:SHCD.php
示例5: init
public function init()
{
$this->setName('f2')->setAttrib('enctype', 'multipart/form-data')->setAttrib('class', 'form_create_bai_bao');
$this->addElement('Hidden', 'search', array('value' => 1));
$ten = new Zend_Form_Element_Text('ten');
$ten->setLabel('Tên sản phẩm (*)')->setRequired(true)->addFilter('StripTags')->addFilter('StringTrim')->addValidator('NotEmpty')->setDecorators(array('ViewHelper', 'Errors', array(array('data' => 'HtmlTag'), array('tag' => 'td', 'style' => 'width: 85%')), array('Label', array('tag' => 'td')), array(array('row' => 'HtmlTag'), array('tag' => 'tr'))))->setAttrib('class', 'text-input large-input');
$so_luong_thanh_vien = new Zend_Form_Element_Text('so_luong_thanh_vien');
$so_luong_thanh_vien->setRequired(true)->setLabel('Số lượng thành viên')->addValidator(new Zend_Validate_Int())->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' => 'so_luong_thanh_vien'))->setAttrib('class', 'text-input small-input');
$mo_ta = new Zend_Form_Element_Textarea('mo_ta');
$mo_ta->setLabel('Nội dung')->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' => 'mo_ta', 'class' => 'text-input textarea'));
$thong_tin = new Zend_Form_Element_Text('thong_tin');
$thong_tin->setRequired(true)->setLabel('Thông tin')->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' => 'thong_tin'))->setAttrib('class', 'text-input large-input');
$thangOptions = Default_Model_Constraints::lichct_thang();
$thang = new Zend_Form_Element_Select('thang');
$thang->setLabel('Tháng')->addMultiOptions($thangOptions)->setValue(date('m'))->setDecorators(array('ViewHelper', 'Errors', array(array('data' => 'HtmlTag'), array('tag' => 'td', 'style' => 'width: 85%')), array('Label', array('tag' => 'td')), array(array('row' => 'HtmlTag'), array('tag' => 'tr'))));
$namOptions = Default_Model_Constraints::years();
$nam = new Zend_Form_Element_Select('nam');
$nam->setLabel('Năm')->addMultiOptions($namOptions)->setValue(date('Y'))->setDecorators(array('ViewHelper', 'Errors', array(array('data' => 'HtmlTag'), array('tag' => 'td', 'style' => 'width: 85%')), array('Label', array('tag' => 'td')), array(array('row' => 'HtmlTag'), array('tag' => 'tr'))));
$dot = new Zend_Form_Element_Text('dot');
$dot->setRequired(true)->setLabel('Đợt')->addValidator(new Zend_Validate_Int())->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' => 'dot'));
$file = new Zend_Form_Element_File('file');
$file->setLabel('Upload file')->setDescription('(*.doc, *.docx, *.pdf , < 10MB )')->setDestination(BASE_PATH . '/upload/files/bai_bao')->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'))));
$submitCon = new Zend_Form_Element_Submit('submitCon');
$submitCon->setLabel('Lưu và tiếp tục')->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->setLabel('Lưu và thoát')->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' => 'bai-bao', 'action' => 'index'), null, true);
$cancel = new Zend_Form_Element_Button('cancel');
$cancel->setLabel('Không lưu')->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($ten, $thong_tin, $mo_ta, $so_luong_thanh_vien, $thang, $nam, $dot, $file, $submitCon, $submitExit, $cancel));
$this->addDisplayGroup(array('submitCon', 'submitExit', 'cancel'), 'submit', array('decorators' => array('FormElements', array(array('data' => 'HtmlTag'), array('tag' => 'td', 'colspan' => 2)), array(array('row' => 'HtmlTag'), array('tag' => 'td')))));
$this->setDecorators(array('FormElements', array('HtmlTag', array('tag' => 'table')), 'Form'));
}
开发者ID:nhochong,项目名称:qlkh-sgu,代码行数:34,代码来源:Create_BK.php
示例6: init
public function init()
{
//$this->_adminModel = new Application_Model_Admin();
$this->setMethod('post');
$this->setName('addproduct');
$this->setAction('');
//nome del prodotto
$this->addElement('text', 'Nome', array('label' => 'Nome', 'filters' => array('StringTrim'), 'required' => true, 'validators' => array(array('StringLength', true, array(1, 25))), 'decorators' => $this->elementDecorators));
$this->addElement('select', 'idCategoria', array('label' => 'Categoria', 'required' => true, 'decorators' => $this->elementDecorators, 'registerInArrayValidator' => false));
$this->addElement('file', 'Foto', array('label' => 'Immagine', 'destination' => APPLICATION_PATH . '/../public/images/products', 'validators' => array(array('Count', false, 1), array('Size', false, 102400), array('Extension', false, array('jpg', 'gif'))), 'decorators' => $this->fileDecorators));
$this->addElement('text', 'DescrizioneBreve', array('label' => 'Descrizione Breve', 'required' => true, 'filters' => array('StringTrim'), 'validators' => array(array('StringLength', true, array(1, 250))), 'decorators' => $this->elementDecorators));
$this->addElement('textarea', 'DescrizioneLunga', array('label' => 'Descrizione Estesa', 'cols' => '60', 'rows' => '10', 'filters' => array('StringTrim'), 'required' => true, 'validators' => array(array('StringLength', true, array(1, 2500))), 'decorators' => $this->elementDecorators));
$this->addElement('multiCheckbox', 'Componenti', array('label' => 'Componenti', 'required' => 'true', 'decorators' => $this->elementDecorators, 'registerInArrayValidator' => false));
$urlHelper = new Zend_View_Helper_Url();
$url = $urlHelper->url(array('controller' => 'admin', 'action' => 'addcomponent'), 'default');
$this->addElement('Note', 'AddComponenti', array('value' => '<a href="' . $url . '">Inserisci un nuovo componente</a>', 'decorators' => $this->elementDecorators));
$this->addElement('multiCheckbox', 'Ntbu', array('label' => 'Note tecniche di buon uso', 'required' => 'true', 'decorators' => $this->elementDecorators, 'registerInArrayValidator' => false));
$urlHelper = new Zend_View_Helper_Url();
$url = $urlHelper->url(array('controller' => 'admin', 'action' => 'addntbu'), 'default');
$this->addElement('Note', 'AddNtbu', array('value' => '<a href="' . $url . '">Inserisci una nuova ntbu</a>', 'decorators' => $this->elementDecorators));
$this->addElement('text', 'Cilindrata', array('label' => 'Cilindrata', 'filters' => array('StringTrim'), 'required' => true, 'validators' => array(array('Int', true), array('Between', true, array(0, 10000))), 'decorators' => $this->elementDecorators));
$this->addElement('text', 'Potenza', array('label' => 'Potenza (kW)', 'filters' => array('StringTrim'), 'required' => true, 'validators' => array(array('Int', true), array('GreaterThan', true, array(0))), 'decorators' => $this->elementDecorators));
$this->addElement('text', 'MassaVuoto', array('label' => 'Massa a vuoto', 'filters' => array('StringTrim'), 'required' => true, 'validators' => array(array('Int', true), array('GreaterThan', true, array(0))), 'decorators' => $this->elementDecorators));
$this->addElement('text', 'VelocitaMax', array('label' => 'Velocità massima', 'filters' => array('StringTrim'), 'required' => true, 'validators' => array(array('Int', true), array('GreaterThan', true, array(0))), 'decorators' => $this->elementDecorators));
$this->addElement('submit', 'add', array('label' => 'Aggiungi Prodotto', 'decorators' => $this->buttonDecorators));
$this->setDecorators(array('FormElements', array('HtmlTag', array('tag' => 'table')), array('Description', array('placement' => 'prepend', 'class' => 'formerror')), 'Form'));
}
开发者ID:alessandrocaprarelli,项目名称:Grp_55,代码行数:27,代码来源:Add.php
示例7: init
public function init()
{
$this->setName('f2')->setMethod('post');
$id = new Zend_Form_Element_Hidden('id');
$id->addFilter('Int');
$ma = new Zend_Form_Element_Text('ma');
$ma->setLabel('Mã (*)')->setRequired(true)->addFilter('StripTags')->addFilter('StringTrim')->addValidator('NotEmpty')->addValidator(new Zend_Validate_StringLength(0, 10))->setDecorators(array('ViewHelper', 'Errors', array(array('data' => 'HtmlTag'), array('tag' => 'td', 'style' => 'width: 85%')), array('Label', array('tag' => 'td')), array(array('row' => 'HtmlTag'), array('tag' => 'tr'))))->setAttrib('class', 'text-input');
$ten = new Zend_Form_Element_Text('ten');
$ten->setLabel('Tên (*)')->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 medium-input');
$mo_ta = new Zend_Form_Element_Textarea('mo_ta');
$mo_ta->setLabel('Mô tả')->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' => 'mo_ta', 'class' => 'textarea', 'rows' => '4'));
$loai_lv = new Default_Model_LoaiLinhVuc();
$llvOptions = array("multiOptions" => $loai_lv->getMultiOptions());
$ma_loai = new Zend_Form_Element_Select('ma_loai', $llvOptions);
$ma_loai->setLabel('Loại 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'))));
$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' => 'linh-vuc', '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($id, $ma, $ten, $mo_ta, $ma_loai, $submitCon, $submitExit, $cancel));
$this->addDisplayGroup(array('submitCon', 'submitExit', 'cancel'), 'submit', array('decorators' => array('FormElements', array(array('data' => 'HtmlTag'), array('tag' => 'td', 'colspan' => 2)), array(array('row' => 'HtmlTag'), array('tag' => 'td')))));
$this->setDecorators(array('FormElements', array('HtmlTag', array('tag' => 'table', 'class' => 'linh_vuc')), 'Form'));
}
开发者ID:nhochong,项目名称:qlkh-sgu,代码行数:27,代码来源:LinhVuc.php
示例8: init
public function init()
{
$this->setName('f3')->setMethod('get');
$linh_vuc = new Default_Model_LinhVuc();
$lv = $linh_vuc->getDSLV();
$lv = array('0' => '========= Tất cả =========') + $lv;
$lvOptions = array("multiOptions" => $lv);
$ma_linh_vuc = new Zend_Form_Element_Select('ma_linh_vuc', $lvOptions);
$ma_linh_vuc->setRequired(true)->setLabel('Lĩnh vực')->setValue('0')->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'));
$nams = Default_Model_Constraints::nam();
$nams = array('0' => '== Tất cả ==') + $nams;
ksort($nams);
$namOption = array("multiOptions" => $nams);
$nam = new Zend_Form_Element_Select('nam', $namOption);
$nam->setLabel('Năm')->setValue(date('Y'))->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' => 'nam'));
$submit = new Zend_Form_Element_Submit('loc');
$submit->setLabel('Lọc')->setDecorators(array('ViewHelper', array(array('data' => 'HtmlTag'), array('tag' => 'span')), array(array('row' => 'HtmlTag'), array('tag' => 'td', 'class' => 'filter_btn_l'))))->setAttribs(array('class' => 'button'));
$url = new Zend_View_Helper_Url();
$link = $url->url(array('module' => 'admin', 'controller' => 'hoi-dong', 'action' => 'danh-sach-hdd'), 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' => 'td', 'class' => 'filter_btn_r'))))->setAttribs(array('class' => 'button', 'id' => 'reset', 'onclick' => 'window.location.href="' . $link . '"'));
$this->addElements(array($ma_linh_vuc, $nam, $submit, $reset));
// Element: order
$this->addElement('Hidden', 'order', array('order' => 10004));
// Element: direction
$this->addElement('Hidden', 'direction', array('order' => 10005));
$this->addDisplayGroup(array('ma_linh_vuc', 'nam', 'loc', 'reset'), 'group1', array('order' => 1, 'decorators' => array('FormElements', array('HtmlTag', array('tag' => 'tr', 'align' => 'left', 'class' => 'text')))));
$this->setDecorators(array('FormElements', array('HtmlTag', array('tag' => 'table', 'class' => 'filter_hdd', 'style' => 'width : 65%')), 'Form'));
}
开发者ID:nhochong,项目名称:qlkh-sgu,代码行数:29,代码来源:FilterHDD.php
示例9: init
public function init()
{
$this->setName('f3')->setMethod('get');
$ma = new Zend_Form_Element_Text('ma');
$ma->setLabel('Mã')->addFilter('StripTags')->addFilter('StringTrim')->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('class' => 'text-input', 'style' => 'width: 70px'));
$ho = new Zend_Form_Element_Text('ho');
$ho->setLabel('Họ')->addFilter('StripTags')->addFilter('StringTrim')->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('class' => 'text-input', 'style' => 'width: 100px'));
$ten = new Zend_Form_Element_Text('ten');
$ten->setLabel('Tên')->addFilter('StripTags')->addFilter('StringTrim')->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('class' => 'text-input', 'style' => 'width: 50px', 'id' => 'ten'));
$don_vi = new Default_Model_DonVi();
$dv = $don_vi->getDSDV();
$dv = array('0' => '=============== Tất cả ===============') + $dv;
$dvOptions = array("multiOptions" => $dv);
$ma_don_vi = new Zend_Form_Element_Select('ma_don_vi', $dvOptions);
$ma_don_vi->setRequired(true)->setLabel('Đơn vị')->setSeparator('')->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_don_vi'));
$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' => 'td', 'class' => 'filter_btn_l'))))->setAttribs(array('class' => 'button'));
$url = new Zend_View_Helper_Url();
$link = $url->url(array('module' => 'admin', 'controller' => 'giang-vien', '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' => 'td', 'class' => 'filter_btn_r'))))->setAttribs(array('class' => 'button', 'id' => 'reset', 'onclick' => 'window.location.href="' . $link . '"'));
$this->addElements(array($ma, $ho, $ten, $ma_don_vi, $submit, $reset));
// Element: order
$this->addElement('Hidden', 'order', array('order' => 10004));
// Element: direction
$this->addElement('Hidden', 'direction', array('order' => 10005));
$this->addDisplayGroup(array('ma', 'ho', 'ten', 'ma_don_vi', 'loc', 'reset'), 'filter', array('order' => '0', 'decorators' => array('FormElements', array('HtmlTag', array('tag' => 'tr', 'align' => 'left', 'class' => 'text')))));
$this->setDecorators(array('FormElements', array('HtmlTag', array('tag' => 'table', 'class' => 'filter_gv')), 'Form'));
}
开发者ID:nhochong,项目名称:qlkh-sgu,代码行数:29,代码来源:FilterGV.php
示例10: init
public function init()
{
$this->setName('f2')->setMethod('post');
$nams = Default_Model_Constraints::nam();
$namOption = array("multiOptions" => $nams);
$nam = new Zend_Form_Element_Select('nam', $namOption);
$nam->setValue(date('Y'))->setLabel('Năm (*)')->setDecorators(array('ViewHelper', 'Errors', array(array('data' => 'HtmlTag'), array('tag' => 'td', 'style' => 'width: 90%')), array('Label', array('tag' => 'td')), array(array('row' => 'HtmlTag'), array('tag' => 'tr'))))->setAttribs(array('id' => 'nam'));
$bizHDD = new Default_Model_Hdd();
$hdds = $bizHDD->getDSHDByNam(date('Y'));
if ($hdds == null) {
$hdsOptions = array("multiOptions" => array('-1' => '== Chưa thành lập =='));
} else {
$hdds = array('0' => '== Tất cả ==') + $hdds;
$hddsOptions = array("multiOptions" => $hdds);
}
$noi_nhan = new Zend_Form_Element_Select('noi_nhan', $hddsOptions);
$noi_nhan->setRequired(true)->setLabel('Hội đồ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'))))->setAttribs(array('id' => 'noi_nhan'))->setRegisterInArrayValidator(false);
$tieu_de = new Zend_Form_Element_Text('tieu_de');
$tieu_de->setLabel('Tiêu đề (*)')->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');
$noi_dung = new Zend_Form_Element_Textarea('noi_dung');
$noi_dung->setLabel('Nội dung (*)')->setRequired(true)->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'))))->setAttribs(array('id' => 'noi_dung', 'class' => 'text-input textarea'));
$submit = new Zend_Form_Element_Submit('submit');
$submit->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' => 'hoi-dong', 'action' => 'ds-mail-tb'), 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($nam, $noi_nhan, $tieu_de, $noi_dung, $submit, $cancel));
$this->addDisplayGroup(array('submit', 'cancel'), 'btn_submit', array('decorators' => array('FormElements', array(array('data' => 'HtmlTag'), array('tag' => 'td', 'colspan' => 2)), array(array('row' => 'HtmlTag'), array('tag' => 'td')))));
$this->setDecorators(array('FormElements', array('HtmlTag', array('tag' => 'table')), 'Form'));
}
开发者ID:nhochong,项目名称:qlkh-sgu,代码行数:31,代码来源:TBDuyet.php
示例11: init
public function init()
{
$this->setName('form_giang_vien_create')->setMethod('post')->setAttrib('class', 'global_form form_giang_vien_create');
$this->addElement('Heading', 'account', array('value' => 'Thông tin giảng viên'));
$this->account->removeDecorator('Label')->removeDecorator('HtmlTag')->getDecorator('HtmlTag2')->setOption('class', 'form-wrapper-heading');
$this->addElement('Text', 'ma', array('label' => 'Mã giảng viên (*)', 'allowEmpty' => false, 'required' => true, 'filters' => array('StripTags'), 'validators' => array(array('StringLength', false, array(5, 10)), 'Alnum')));
$this->addElement('Heading', 'ma_giang_vien', array('label' => 'Mã giảng viên'));
$ho = new Khcn_Form_Element_Text('ho');
$ho->setLabel('Họ (*)')->setOptions(array('size' => '36'))->setRequired(true)->addFilter('StripTags')->addFilter('StringTrim')->addValidator('NotEmpty')->addValidator(new Zend_Validate_StringLength(0, 128))->setAttribs(array('id' => 'ho'));
$this->addElement($ho);
$ten = new Khcn_Form_Element_Text('ten');
$ten->setLabel('Tên (*)')->setOptions(array('size' => '36'))->setRequired(true)->addFilter('StripTags')->addFilter('StringTrim')->addValidator('NotEmpty')->addValidator(new Zend_Validate_StringLength(0, 32))->setAttribs(array('id' => 'ten'));
$this->addElement($ten);
$email = new Khcn_Form_Element_Text('email');
$email->setLabel('Email (*)')->setRequired(true)->setOptions(array('size' => '36'))->addFilter('StripTags')->addFilter('StringTrim')->addValidator('NotEmpty')->addValidator(new Zend_Validate_EmailAddress())->setAttribs(array('id' => 'email'));
$this->addElement($email);
$don_vi = new Default_Model_DonVi();
$this->addElement('Select', 'ma_don_vi', array('label' => 'Đơn vị (*)', 'multiOptions' => $don_vi->getDSDVSGU(), 'value' => 1));
$hoc_vi = new Default_Model_HocVi();
$this->addElement('Select', 'ma_hoc_vi', array('label' => 'Học vị (*)', 'multiOptions' => $hoc_vi->getDSHV()));
$this->addElement('Text', 'chuc_vu', array('label' => 'Chức vụ', 'filters' => array('StripTags')));
$this->addElement('Text', 'so_dien_thoai', array('label' => 'Số điện thoại', 'filters' => array('StripTags')));
$this->addElement('Button', 'submit', array('label' => 'Lưu', 'type' => 'submit', 'ignore' => true, 'decorators' => array('ViewHelper'), 'attribs' => array('class' => 'art-button')));
$url = new Zend_View_Helper_Url();
$link = $url->url(array('module' => 'default', 'controller' => 'index', 'action' => 'index'));
$this->addElement('Cancel', 'cancel', array('label' => 'Không lưu', 'onclick' => 'window.location.href="' . $link . '"', 'decorators' => array('ViewHelper'), 'attribs' => array('class' => 'art-button')));
$this->addDisplayGroup(array('submit', 'cancel'), 'submitbtn');
}
开发者ID:nhochong,项目名称:qlkh-sgu,代码行数:28,代码来源:Create.php
示例12: themAction
public function themAction()
{
// TODO Auto-generated {0}::indexAction() default action
$form = new Admin_Form_DanhSachLop();
$url = new Zend_View_Helper_Url();
$link = $url->url(array('module' => 'admin', 'controller' => 'danh-sach-lop', 'action' => 'index'), null, true);
$form->submitCon->setLabel('Lưu và tiếp tục');
$form->submitExit->setLabel('Lưu và thoát');
$form->cancel->setLabel('Không lưu')->setAttribs(array('onclick' => 'window.location.href="' . $link . '"'));
$this->view->form = $form;
if (!$this->getRequest()->isPost()) {
return;
}
if (!$form->isValid($this->getRequest()->getPost())) {
return;
}
$values = $form->getValues();
$table = Khcn_Api::_()->getDbTable('danh_sach_lop', 'default');
$danh_sach_lop = $table->createRow();
$danh_sach_lop->setFromArray($values);
$danh_sach_lop->save();
$_SESSION['msg'] = 'Thành công !. Dữ liệu đã được lưu trữ .';
$_SESSION['type_msg'] = 'success';
if ($form->submitCon->isChecked()) {
$this->_redirect('/admin/danh-sach-lop/them');
} else {
$this->_redirect('/admin/danh-sach-lop/index');
}
}
开发者ID:nhochong,项目名称:qlkh-sgu,代码行数:29,代码来源:DanhSachLopController.php
示例13: init
public function init()
{
$this->setName('f2')->setAttrib('enctype', 'multipart/form-data')->setMethod('post');
$this->addElement('Hidden', 'search', array('value' => 1));
$tieu_de = new Zend_Form_Element_Text('tieu_de');
$tieu_de->setLabel('Tiêu đề (*)')->setRequired(true)->addFilter('StripTags')->addFilter('StringTrim')->addValidator('NotEmpty')->setDecorators(array('ViewHelper', 'Errors', array(array('data' => 'HtmlTag'), array('tag' => 'td', 'style' => 'width: 85%')), array('Label', array('tag' => 'td')), array(array('row' => 'HtmlTag'), array('tag' => 'tr'))))->setAttrib('class', 'text-input large-input');
$quan_trong = new Zend_Form_Element_Select('quan_trong');
$quan_trong->setLabel('Quan Trọng')->setRequired(true)->setValue(0)->addMultiOptions(array(0 => 'Không', 1 => 'Có'))->setDecorators(array('ViewHelper', 'Errors', array(array('data' => 'HtmlTag'), array('tag' => 'td')), array('Label', array('tag' => 'td')), array(array('row' => 'HtmlTag'), array('tag' => 'tr'))));
$noi_bat = new Zend_Form_Element_Select('noi_bat');
$noi_bat->setLabel('Nổi Bật')->setRequired(true)->setValue(0)->addMultiOptions(array(0 => 'Không', 1 => 'Có'))->setDecorators(array('ViewHelper', 'Errors', array(array('data' => 'HtmlTag'), array('tag' => 'td')), array('Label', array('tag' => 'td')), array(array('row' => 'HtmlTag'), array('tag' => 'tr'))));
$photo = new Zend_Form_Element_File('photo');
$photo->setLabel('U
|
请发表评论