当前位置: 首页>>代码示例>>PHP>>正文


PHP Zend_Form_Element_Checkbox::removeDecorator方法代码示例

本文整理汇总了PHP中Zend_Form_Element_Checkbox::removeDecorator方法的典型用法代码示例。如果您正苦于以下问题:PHP Zend_Form_Element_Checkbox::removeDecorator方法的具体用法?PHP Zend_Form_Element_Checkbox::removeDecorator怎么用?PHP Zend_Form_Element_Checkbox::removeDecorator使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在Zend_Form_Element_Checkbox的用法示例。


在下文中一共展示了Zend_Form_Element_Checkbox::removeDecorator方法的4个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。

示例1: _buildElements

 private function _buildElements()
 {
     $date = new Zend_Form_Element_Text($this->_name . "_Date");
     $date->setLabel("Date de publication");
     $date->addValidator(new Zend_Validate_Date(array("format" => "dd/MM/yyyy hh:mm")), true);
     $date->setDescription("JJ/MM/AAAA hh:mm");
     $date->setAttrib("size", 16);
     $date->addDecorators(array("br" => new Zend_Form_Decorator_HtmlTag(array("tag" => "br", "noAttribs" => true)), "hr" => new Zend_Form_Decorator_HtmlTag(array("tag" => "hr", "noAttribs" => true))));
     $active = new Zend_Form_Element_Checkbox($this->_name . "_Active");
     $active->setLabel("Est Actif");
     $active->removeDecorator("dtDdWrapper");
     $submit = new Zend_Form_Element_Submit($this->_name . "_Submit");
     $submit->setLabel("Creer");
     return array($date, $active, $submit);
 }
开发者ID:esandre,项目名称:CoeurDeTruffes,代码行数:15,代码来源:Add.php

示例2: init

 public function init()
 {
     $this->decoradores = array('ViewHelper', array('Errors', array('tag' => 'div', 'style' => 'color:red;')), 'HtmlTag', 'Label');
     $this->validatorLenghtCP = new Zend_Validate_StringLength(5, 5);
     $this->validatorLenghtCP->setMessages(array(Zend_Validate_StringLength::TOO_SHORT => 'El CP es de %min% digitos.', Zend_Validate_StringLength::TOO_LONG => 'El CP es de %max% digitos.'));
     // Operacion OLD
     /*
     $this->addElement(
                             'select', 
                             'operacion', 
                             array(
                                     'label' => ' ', 
                                     'required' => false, 
                                     'filters' => array('stringTrim')
                                  )
                       );
     
     $operacion = array('0' => 'Alquiler', '1' => 'Venta');
     
     $this->operacion->addMultiOptions($operacion);  
     //$this->municipio->removeDecorator('Errors');
     $this->operacion->setAttrib('class','form_select_medium');
     $this->operacion->removeDecorator('HtmlTag');
     $this->operacion->removeDecorator('Label');
     */
     $this->addElement('select', 'operacion', array('label' => ' ', 'required' => false, 'filters' => array('stringTrim')));
     $operacion = array('0' => 'Apartamentos en alquiler', '1' => 'Habitación individual en alquiler', '2' => 'Habitación doble en alquiler');
     $this->operacion->addMultiOptions($operacion);
     //$this->municipio->removeDecorator('Errors');
     $this->operacion->setAttrib('class', 'form_select_medium');
     $this->operacion->removeDecorator('HtmlTag');
     $this->operacion->removeDecorator('Label');
     // Tipo vivienda
     /*
     $this->addElement(  'radio', 
                         'tipoVivienda', 
                         array(  'label' => 'Tipo de vivienda (*)',
                                 'multiOptions' => array(
                                                             
                                                             0 => 'Piso',
                                                             1 => 'Dúplex',
                                                             2 => 'Estudio',
                                                             3 => 'Ático',
                                                             4 => 'Loft',
                                                             5 => 'Casa/Chalet'
                                                        )
                                             ));        
     
     $this->tipoVivienda->setValue('Piso');
     $this->tipoVivienda->setAttrib('class','form_input_contact');
     $this->tipoVivienda->removeDecorator('Errors');
     $this->tipoVivienda->removeDecorator('HtmlTag');
     $this->tipoVivienda->removeDecorator('Label');
     */
     //Precio / Mes
     $this->addElement('text', 'precio', array('label' => 'Precio / Mes (*)', 'required' => true, 'filters' => array('stringTrim')));
     $this->precio->addValidator('NotEmpty', true, array('messages' => array(Zend_Validate_NotEmpty::IS_EMPTY => 'Ingresar el precio.')));
     $this->precio->addValidator('digits', true, array('messages' => array(Zend_Validate_Digits::NOT_DIGITS => 'Ingresar cantidad entera')));
     $this->precio->setDecorators($this->decoradores);
     $this->precio->setAttrib('class', 'form_input_contact_small');
     //$this->precio->removeDecorator('Errors');
     $this->precio->removeDecorator('HtmlTag');
     $this->precio->removeDecorator('Label');
     // Deposito
     $this->addElement('text', 'deposito', array('label' => 'Deposito', 'required' => false, 'filters' => array('stringTrim')));
     $this->deposito->setAttrib('class', 'form_input_contact_small');
     $this->deposito->removeDecorator('Errors');
     $this->deposito->removeDecorator('HtmlTag');
     $this->deposito->removeDecorator('Label');
     // Superficie
     /*
     $this->addElement(
                         'text', 
                         'superficie', 
                         array(
                                 'label' => 'Superficie (m2) (*)', 
                                 'required' => true, 
                                 'filters' => array('stringTrim')
                           )
                  );
     
     $this->superficie->addValidator('NotEmpty',
                      true,
                      array('messages' => array(
                                                 Zend_Validate_NotEmpty::IS_EMPTY => 'Ingresar la superficie m2.'
                                               )
                           ));
     
     $this->superficie->addValidator('digits', true, array('messages' => array(Zend_Validate_Digits::NOT_DIGITS => 'Ingresar cantidad entera')));
     $this->superficie->setDecorators($this->decoradores);
     $this->superficie->setAttrib('class','form_input_contact_small');
     //$this->superficie->removeDecorator('Errors');
     $this->superficie->removeDecorator('HtmlTag');
     $this->superficie->removeDecorator('Label');
     */
     // Número de dormitorios
     $dbDormitorio = new Application_Model_DbTable_TipoDormitorio();
     $dormitorios = $dbDormitorio->getDormitoriosList();
     $this->addElement('select', 'numeroDormitorios', array('label' => ' ', 'required' => false, 'filters' => array('stringTrim')));
     /*   foreach($dormitorios as $key => $value){
//.........这里部分代码省略.........
开发者ID:eulernunez,项目名称:RentAFlat-Zend-1,代码行数:101,代码来源:Anuncio__.php

示例3: __construct

 public function __construct($options = null)
 {
     $this->_addSubmitSaveClose = true;
     parent::__construct($options);
     $this->setName('page');
     $imageSrc = $options['imageSrc'];
     $isNewImage = $options['isNewImage'];
     $menuId = $options['menuId'];
     if ($menuId == '') {
         $pathTmp = "../../../../../data/images/menu/tmp";
     } else {
         $pathTmp = "../../../../../data/images/menu/{$menuId}/tmp";
     }
     // input text for the title of the page
     $title = new Zend_Form_Element_Text('MenuTitle');
     $title->setLabel(Cible_Translation::getCibleText('form_label_menu_title'))->setRequired(true)->addValidator('NotEmpty', true, array('messages' => Cible_Translation::getCibleText('error_field_required')))->setAttrib('class', 'stdTextInput');
     $this->addElement($title);
     $menuItemType = new Zend_Form_Element_Radio('menuItemType');
     $menuItemType->setLabel(Cible_Translation::getCibleText('form_label_menu_type'))->addMultiOption('page', Cible_Translation::getCibleText('form_label_menu_type_page'))->addMultiOption('placeholder', Cible_Translation::getCibleText('form_label_menu_type_placeholder'))->addMultiOption('external', Cible_Translation::getCibleText('form_label_menu_type_external'))->setValue('page')->setAttrib('onclick', 'javascript:openTypePanel(this.value)')->setSeparator('');
     $this->addElement($menuItemType);
     $menuItemSecured = new Zend_Form_Element_Radio('menuItemSecured');
     $menuItemSecured->setLabel(Cible_Translation::getCibleText('manage_block_secured_menu_status'))->addMultiOption('0', Cible_Translation::getCibleText('button_no'))->addMultiOption('1', Cible_Translation::getCibleText('button_yes'))->setValue('0')->setSeparator('');
     $this->addElement($menuItemSecured);
     $controllerName = new Zend_Form_Element_Text('ControllerName');
     $controllerName->setLabel(Cible_Translation::getCibleText('form_label_menu_destination_page'))->setAttrib('onfocus', "openPagePicker('page-picker-pagePicker');")->setRequired(true)->addValidator('NotEmpty', true, array('messages' => Cible_Translation::getCibleText('error_field_required')))->setAttrib('class', 'stdTextInput');
     $this->addElement($controllerName);
     $pagePicker = new Cible_Form_Element_PagePicker('pagePicker', array('menu' => 'Principal', 'associatedElement' => 'ControllerName', 'onclick' => "javascript:closePagePicker(\"page-picker-pagePicker\")"));
     $pagePicker->setLabel(Cible_Translation::getCibleText('form_label_page_picker'))->setRequired(true)->addValidator('NotEmpty', true, array('messages' => Cible_Translation::getCibleText('error_page_selection_required')));
     $pagePicker->setDecorators(array('ViewHelper', array(array('row' => 'HtmlTag'), array('tag' => 'dd', 'class' => "page-picker", 'id' => "page-picker-pagePicker"))));
     $this->addElement($pagePicker);
     $this->addDisplayGroup(array('ControllerName', 'pagePicker'), 'pageSelectionGroup');
     $this->getDisplayGroup('pageSelectionGroup')->setAttrib('class', 'pageSelectionGroup')->removeDecorator('DtDdWrapper');
     $link = new Zend_Form_Element_Text('MenuLink');
     $link->setLabel(Cible_Translation::getCibleText('form_label_menu_destination_link'))->setRequired(true)->addValidator('NotEmpty', true, array('messages' => Cible_Translation::getCibleText('error_field_required')))->addPrefixPath('Cible', 'Cible')->setAttrib('class', 'stdTextInput');
     $this->addElement($link);
     // input text for the css li
     $style = new Zend_Form_Element_Text('MenuTitleStyle');
     $style->setLabel(Cible_Translation::getCibleText('form_label_menu_title_style'))->setAttrib('class', 'stdTextInput');
     $this->addElement($style);
     $this->addDisplayGroup(array('MenuLink'), 'externalLinkSelectionGroup');
     $this->getDisplayGroup('externalLinkSelectionGroup')->setAttrib('class', 'externalLinkSelectionGroup')->setAttrib('style', 'display: none')->removeDecorator('DtDdWrapper');
     // Uses image
     $loadImage = new Zend_Form_Element_Checkbox('loadImage');
     $loadImage->setLabel($this->getView()->getCibleText('form_label_menu_load_image'));
     $loadImage->removeDecorator('DtDdWrapper');
     $loadImage->setDecorators(array('ViewHelper', array('label', array('placement' => 'append')), array(array('row' => 'HtmlTag'), array('tag' => 'dd', 'class' => 'label_after_checkbox'))));
     // Show this menu item
     $MID_Show = new Zend_Form_Element_Checkbox('MID_Show');
     $MID_Show->setValue(1);
     $MID_Show->setLabel($this->getView()->getCibleText('form_label_menu_show_item'));
     $MID_Show->removeDecorator('DtDdWrapper');
     $MID_Show->setDecorators(array('ViewHelper', array('label', array('placement' => 'append')), array(array('row' => 'HtmlTag'), array('tag' => 'dd', 'class' => 'label_after_checkbox'))));
     $this->addElement($MID_Show);
     $this->addElement($loadImage);
     // hidden specify if new image for the news
     $newImage = new Zend_Form_Element_Hidden('isNewImage', array('value' => $isNewImage));
     $newImage->removeDecorator('Label');
     $this->addElement($newImage);
     // To allow to display title and image
     $imgTitle = new Zend_Form_Element_Checkbox('menuImgAndTitle');
     $imgTitle->setLabel($this->getView()->getCibleText('form_label_menu_display_image_and_title'));
     $imgTitle->removeDecorator('DtDdWrapper');
     $imgTitle->setDecorators(array('ViewHelper', array('label', array('placement' => 'append')), array(array('row' => 'HtmlTag'), array('tag' => 'dd', 'class' => 'label_after_checkbox'))));
     $this->addElement($imgTitle);
     // IMAGE
     $imageTmp = new Zend_Form_Element_Hidden('menuImage_tmp');
     $imageTmp->removeDecorator('Label');
     $this->addElement($imageTmp);
     $imageOrg = new Zend_Form_Element_Hidden('menuImage_original');
     $imageOrg->removeDecorator('Label');
     $this->addElement($imageOrg);
     $imageView = new Zend_Form_Element_Image('menuImage_preview', array('onclick' => 'return false;'));
     $imageView->setImage($imageSrc)->removeDecorator('DtDdWrapper');
     $this->addElement($imageView);
     $imagePicker = new Cible_Form_Element_ImagePicker('menuImage', array('onchange' => "document.getElementById('imageView').src = document.getElementById('menuImage').value", 'associatedElement' => 'menuImage_preview', 'pathTmp' => $pathTmp, 'contentID' => $menuId));
     $imagePicker->removeDecorator('Label');
     $this->addElement($imagePicker);
     $this->addDisplayGroup(array('menuImgAndTitle', 'isNewImage', 'menuImage_tmp', 'menuImage_original', 'menuImage_preview', 'menuImage'), 'imageGroup');
     $this->getDisplayGroup('imageGroup')->setAttrib('class', 'imageGroup')->setAttrib('style', 'display: none')->removeDecorator('DtDdWrapper');
 }
开发者ID:anunay,项目名称:stentors,代码行数:80,代码来源:FormMenu.php

示例4: getCheckBox

 public function getCheckBox($id, $value = "", $elementequired = false)
 {
     $element = new Zend_Form_Element_Checkbox($id);
     $element->removeDecorator('HtmlTag');
     $element->removeDecorator('DtDdWrapper');
     $element->removeDecorator('Label');
     $element->setValue($value);
     if ($elementequired) {
         $element->setAttribs(array('class' => 'validate[required]'));
     }
     return $element;
 }
开发者ID:pingitgroup,项目名称:stockpingitgroup,代码行数:12,代码来源:FrmElementGlobal.php


注:本文中的Zend_Form_Element_Checkbox::removeDecorator方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。