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


PHP Zend_Form_Element_Submit::removeDecorator方法代码示例

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


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

示例1: __construct

 public function __construct($options = null)
 {
     parent::__construct($options);
     $this->setAttrib('accept-charset', 'UTF-8');
     $decorators = array(array('ViewHelper'), array('Description', array('placement' => 'append', 'class' => 'info')), array('Errors', array('placement' => 'apppend', 'class' => 'error', 'tag' => 'li')), array('Label'), array('HtmlTag', array('tag' => 'li')));
     $this->setName('dieaxis');
     $die_axis_name = new Zend_Form_Element_Text('die_axis_name');
     $die_axis_name->setLabel('Die axis term: ')->setRequired(true)->setAttrib('size', 70)->addErrorMessage('Please enter a term.')->addFilters(array('StripTags', 'StringTrim'))->setDecorators($decorators);
     $valid = new Zend_Form_Element_Checkbox('valid');
     $valid->setLabel('Die axis term is in use: ')->setRequired(true)->addValidator('Int')->addFilters(array('StripTags', 'StringTrim'))->setDecorators($decorators);
     //Submit button
     $submit = new Zend_Form_Element_Submit('submit');
     $submit->setAttrib('id', 'submitbutton');
     $submit->removeDecorator('DtDdWrapper');
     $submit->removeDecorator('HtmlTag');
     $hash = new Zend_Form_Element_Hash('csrf');
     $hash->setValue($this->_config->form->salt)->removeDecorator('DtDdWrapper')->removeDecorator('HtmlTag')->removeDecorator('label')->setTimeout(60);
     $this->addElement($hash);
     $this->addElements(array($die_axis_name, $valid, $submit));
     $this->addDisplayGroup(array('die_axis_name', 'valid'), 'details');
     $this->details->setLegend('Die axis details: ');
     $this->details->removeDecorator('HtmlTag');
     $this->details->removeDecorator('DtDdWrapper');
     $this->addDisplayGroup(array('submit'), 'submit');
 }
开发者ID:rwebley,项目名称:Beowulf---PAS,代码行数:25,代码来源:DieAxisForm.php

示例2: __construct

 public function __construct($options = null)
 {
     parent::__construct($options);
     $decorators = array(array('ViewHelper'), array('Description', array('placement' => 'append', 'class' => 'info')), array('Errors', array('placement' => 'apppend', 'class' => 'error', 'tag' => 'li')), array('Label'), array('HtmlTag', array('tag' => 'li')));
     $this->setName('quotes');
     $quote = new Pas_Form_Element_RTE('quote');
     $quote->setLabel('Quote or announcement: ')->setRequired(true)->setAttrib('rows', 10)->setAttrib('cols', 40)->setAttrib('Height', 400)->setAttrib('ToolbarSet', 'Basic')->addFilters(array('StringTrim', 'BasicHtml', 'EmptyParagraph', 'WordChars'));
     $quotedBy = new Zend_Form_Element_Text('quotedBy');
     $quotedBy->setLabel('Origin of quote/announcement: ')->setRequired(true)->setAttrib('size', 60)->addFilters(array('StripTags', 'StringTrim'))->addErrorMessage('Please state where this comes from.');
     $expire = new Zend_Form_Element_Text('expire');
     $expire->setLabel('Expires from use: ')->setRequired(true)->setAttrib('size', 10)->addFilters(array('StripTags', 'StringTrim'))->addErrorMessage('Please provide expiry date.')->setDecorators($decorators);
     $valid = new Zend_Form_Element_Checkbox('status');
     $valid->setLabel('Quote/Announcement is in use: ')->setRequired(true)->addValidator('Int')->addFilters(array('StripTags', 'StringTrim'))->setDecorators($decorators);
     $type = new Zend_Form_Element_Select('type');
     $type->setLabel('Type: ')->setRequired(true)->addFilters(array('StripTags', 'StringTrim'))->setValue('quote')->addMultiOptions(array(NULL => 'Choose type', 'quote' => 'Quote', 'announcement' => 'Announcement'))->setDecorators($decorators);
     $hash = new Zend_Form_Element_Hash('csrf');
     $hash->setValue($this->_config->form->salt)->removeDecorator('DtDdWrapper')->removeDecorator('HtmlTag')->removeDecorator('label')->setTimeout(4800);
     $this->addElement($hash);
     //Submit button
     $submit = new Zend_Form_Element_Submit('submit');
     $submit->setAttrib('id', 'submitbutton');
     $submit->removeDecorator('DtDdWrapper');
     $submit->removeDecorator('HtmlTag');
     $this->addElements(array($quote, $quotedBy, $valid, $expire, $type, $submit));
     $this->addDisplayGroup(array('quote', 'quotedBy', 'status', 'expire', 'type', 'submit'), 'details');
     $this->details->removeDecorator('HtmlTag');
     $this->details->removeDecorator('DtDdWrapper');
 }
开发者ID:rwebley,项目名称:Beowulf---PAS,代码行数:28,代码来源:QuoteForm.php

示例3: __construct

 public function __construct($options = null)
 {
     $authors = new Users();
     $authorOptions = $authors->getAuthors();
     parent::__construct($options);
     $decorators = array(array('ViewHelper'), array('Description', array('placement' => 'append', 'class' => 'info')), array('Errors', array('placement' => 'apppend', 'class' => 'error', 'tag' => 'li')), array('Label'), array('HtmlTag', array('tag' => 'li')));
     $this->setAttrib('enctype', 'multipart/form-data');
     $this->setDecorators(array('FormElements', 'Form'));
     $this->setName('addcontent');
     $title = new Zend_Form_Element_Text('title');
     $title->setLabel('Content Title: ')->setRequired(true)->addFilters(array('StripTags', 'StringTrim'))->setAttrib('size', 60)->addValidator('NotEmpty')->addErrorMessage('You must enter a title')->setDecorators($decorators);
     $menuTitle = new Zend_Form_Element_Text('menuTitle');
     $menuTitle->setLabel('Menu Title: ')->setRequired(true)->addFilters(array('StripTags', 'StringTrim'))->setAttrib('size', 60)->addValidator('NotEmpty')->addErrorMessage('You must enter a title')->setDecorators($decorators);
     $author = new Zend_Form_Element_Select('author');
     $author->setLabel('Set the author of the article: ')->addMultiOptions(array('Choose an author' => $authorOptions))->setRequired(true)->addFilters(array('StripTags', 'StringTrim'))->addValidator('NotEmpty')->addErrorMessage('You must choose an author')->setDecorators($decorators);
     $excerpt = new Zend_Form_Element_Textarea('excerpt');
     $excerpt->setLabel('Optional excerpt: ')->setRequired(false)->setAttrib('rows', 5)->setAttrib('cols', 60)->addFilters(array('StripTags', 'StringTrim'));
     $body = new Pas_Form_Element_RTE('body');
     $body->setLabel('Main body of text: ')->setRequired(true)->setAttrib('rows', 30)->setAttrib('cols', 60)->addErrorMessage('You must enter a main body of text')->addFilter('HtmlBody')->setAttrib('Height', 400)->addFilter('EmptyParagraph')->addFilter('StringTrim')->addFilter('WordChars');
     $section = new Zend_Form_Element_Select('section');
     $section->setLabel('Set site section to appear under: ')->addMultiOptions(array('index' => 'Home page', 'info' => 'Site information', 'staffs' => 'Staffordshire Hoard Symposium', 'getinvolved' => 'Get involved', 'frg' => 'Voluntary recording guide', 'byzantinecoins' => 'Byzantine coin guide', 'greekromancoins' => 'Greek and Roman coin guide', 'conservation' => 'Conservation pages', 'news' => 'News', 'reviews' => 'Scheme reviews', 'reports' => 'Annual reports', 'treports' => 'Treasure annual reports', 'romancoins' => 'Roman coin guide', 'ironagecoins' => 'Iron Age coin guide', 'earlymedievalcoins' => 'Early Medieval coin guide', 'medievalcoins' => 'Medieval coin guide', 'postmedievalcoins' => 'Post Medieval coin guide', 'research' => 'Research', 'api' => 'Applications Programming Interface', 'databasehelp' => 'Database help', 'events' => 'Events', 'treasure' => 'Treasure', 'help' => 'Help section', 'publications' => 'Publications', 'database' => 'Database front page', 'oai' => 'OAI instructions', 'bronzeage' => 'Bronze Age guide'))->setDecorators($decorators)->setRequired(true)->addErrorMessage('You must choose a section for this to be filed under');
     $parentcontent = new Zend_Form_Element_Select('parent');
     $parentcontent->setLabel('Does this have a parent?: ')->setDecorators($decorators)->setRequired(false);
     $metaKeywords = new Zend_Form_Element_Textarea('metaKeywords');
     $metaKeywords->setLabel('Meta keywords: ')->setAttrib('rows', 5)->setAttrib('cols', 60)->addFilters(array('StripTags', 'StringTrim'))->setRequired(true);
     $metaDescription = new Zend_Form_Element_Textarea('metaDescription');
     $metaDescription->setLabel('Meta description: ')->setAttrib('rows', 5)->setAttrib('cols', 60)->addFilters(array('StripTags', 'StringTrim'))->setRequired(true);
     $publishState = new Zend_Form_Element_Select('publishState');
     $publishState->setLabel('Publishing status: ')->addMultiOptions(array('Please choose publish state' => array('1' => 'Draft', '2' => 'Admin to review', '3' => 'Published')))->setValue(1)->setDecorators($decorators)->setRequired(true);
     $slug = new Zend_Form_Element_Text('slug');
     $slug->setLabel('Page slug: ')->setAttrib('size', 50)->setDecorators($decorators)->addFilter('UrlSlug')->addFilters(array('StripTags', 'StringTrim'))->setRequired(true);
     $frontPage = new Zend_Form_Element_Checkbox('frontPage');
     $frontPage->setLabel('Appear on section\'s front page?: ')->setDecorators($decorators)->addValidator('NotEmpty', 'Integer')->setRequired(true);
     $submit = new Zend_Form_Element_Submit('submit');
     $submit->setAttrib('id', 'submitbutton')->setAttrib('class', 'large');
     $submit->removeDecorator('DtDdWrapper');
     $submit->removeDecorator('HtmlTag');
     $hash = new Zend_Form_Element_Hash('csrf');
     $hash->setValue($this->_config->form->salt)->removeDecorator('DtDdWrapper')->removeDecorator('HtmlTag')->removeDecorator('label')->setTimeout(60);
     $this->addElement($hash);
     $this->addElements(array($title, $author, $body, $section, $publishState, $excerpt, $metaKeywords, $metaDescription, $slug, $frontPage, $submit, $menuTitle));
     $this->addDisplayGroup(array('title', 'menuTitle', 'author', 'body', 'section', 'publishState', 'excerpt', 'metaKeywords', 'metaDescription', 'slug', 'frontPage'), 'details')->removeDecorator('HtmlTag');
     $this->details->addDecorators(array('FormElements', array('HtmlTag', array('tag' => 'ul'))));
     $this->details->removeDecorator('DtDdWrapper');
     $this->addDisplayGroup(array('submit'), 'submit')->removeDecorator('HtmlTag');
     $this->submit->removeDecorator('DtDdWrapper');
     $this->submit->removeDecorator('HtmlTag');
     $this->details->setLegend('Add new site content');
 }
开发者ID:rwebley,项目名称:Beowulf---PAS,代码行数:49,代码来源:ContentForm.php

示例4: init

 public function init()
 {
     $this->setName('Form User Edit');
     $this->setAttrib('class', 'Form_Edit');
     $this->setMethod('post')->setAction('/user/save');
     $id = new Zend_Form_Element_Hidden('id');
     $name = new Zend_Form_Element_Text('name');
     $name->setLabel('Name:')->setRequired(true)->addValidator('alnum')->addValidator('regex', false, array('/^[a-z]+/'))->addValidator('stringLength', false, array(4, 12))->addFilter('StringToLower');
     $pwd = new Zend_Form_Element_Password('pwd');
     $pwd->setLabel('Password:')->setRequired(true);
     $re_pwd = new Zend_Form_Element_Password('re_pwd');
     $re_pwd->setLabel('Re-password:')->setRequired(true);
     $role = new Zend_Form_Element_Select('role');
     $role->setLabel('Role:')->addMultiOptions(array(array('key' => 'guest', 'value' => 'Guest'), array('key' => 'memeber', 'value' => 'Member'), array('key' => 'admin', 'value' => 'Admin')))->setDescription('Choose one role');
     $truename = new Zend_Form_Element_Text('true_name');
     $truename->setLabel('Real Name:');
     $phone = new Zend_Form_Element_Text('cellphone');
     $phone->setLabel('Cell Phone:')->addValidator(new SP_Validate_CellPhone());
     $btnSubmit = new Zend_Form_Element_Submit('submit');
     $btnSubmit->setLabel('Submit');
     $this->addElements(array($id, $name, $pwd, $re_pwd, $role, $truename, $phone, $btnSubmit));
     parent::init();
     $this->addDecorator('OuterBox', array('attrs' => array('class' => 'form user_edit_form'), 'title' => 'Edit/Create User', 'placement' => 'PREPEND'));
     $id->removeDecorator('Label');
     $btnSubmit->removeDecorator('Label');
 }
开发者ID:victorli,项目名称:ShrimpProject,代码行数:26,代码来源:Edit.php

示例5: init

 /**
  * Creates the form to log in.
  * @see Zend_Form::init()
  */
 public function init()
 {
     $this->setMethod('post');
     $this->setAction("/auth/login/");
     $usernameElement = new Zend_Form_Element_Text('username');
     $usernameElement->setLabel("Benutzername");
     $usernameElement->addValidator('regex', false, array('/^[a-z0-9]/i'));
     $usernameElement->addValidator('stringLength', false, array(2, 64));
     $usernameElement->setAttrib('maxLength', 64);
     $usernameElement->setRequired(true);
     $passwordElement = new Zend_Form_Element_Password('password');
     $passwordElement->setLabel("Passwort");
     $passwordElement->addValidator('regex', false, array('/^[a-z0-9]/i'));
     $passwordElement->addValidator('stringLength', false, array(8, 32));
     $passwordElement->setAttrib('maxLength', 32);
     $passwordElement->setRequired(true);
     $submitElement = new Zend_Form_Element_Submit('submit');
     $submitElement->setLabel('Anmelden');
     $submitElement->setIgnore(true);
     $submitElement->setAttrib('class', 'submit');
     $submitElement->removeDecorator('DtDdWrapper');
     $this->addElements(array($usernameElement, $passwordElement));
     $this->addDisplayGroup(array('username', 'password'), 'credentialGroup', array('legend' => 'Zugangsdaten'));
     $this->addElements(array($submitElement));
 }
开发者ID:rusli-nasir,项目名称:iHealth,代码行数:29,代码来源:Login.php

示例6: init

 public function init()
 {
     $bookingid = new Zend_Form_Element_Hidden("booking_id");
     $priceModel = new Admin_Model_Price();
     $fromOption = $priceModel->getAllLocation();
     $toOption = $priceModel->getAllLocation(true);
     $numberOption = array();
     for ($i = 1; $i <= 20; $i++) {
         $numberOption[$i] = $i;
     }
     $timeOption = array();
     for ($j = 0; $j <= 23; $j++) {
         $timeOption[$j] = strlen($j) == 1 ? "0" . $j . ":00" : $j . ":00";
     }
     $pickupLocation = new Zend_Form_Element_Select("pickup_location");
     $pickupLocation->setLabel("Pickup Location")->setAttribs(array('class' => 'form-select', 'id' => 'pickup-location'))->addmultiOptions($fromOption)->setRequired(true);
     $returnLocation = new Zend_Form_Element_Select('return_location');
     $returnLocation->setLabel('Return Location')->setAttribs(array('class' => 'form-select', 'id' => 'return-location'))->addmultiOptions($toOption)->setRequired(true);
     $number = new Zend_Form_Element_Select("number");
     $number->setLabel("Number Of Vehicals")->setAttribs(array('class' => 'form-select'))->addmultiOptions($numberOption)->setRequired(true);
     $pickupDate = new Zend_Form_Element_Text("pickup_date");
     $pickupDate->setLabel("Pickup Date")->setAttribs(array('class' => 'form-text'))->setRequired(true);
     $returnDate = new Zend_Form_Element_Text("return_date");
     $returnDate->setLabel("Return Date")->setAttribs(array('class' => 'form-text'))->setRequired(true);
     $pickuptime = new Zend_Form_Element_Select("pickup_time");
     $pickuptime->setLabel("Pickup Time")->setAttribs(array('class' => 'form-number-select'))->addmultiOptions($timeOption)->setRequired(true);
     $returnTime = new Zend_Form_Element_Select("return_time");
     $returnTime->setLabel("Return Time")->setAttribs(array('class' => 'form-number-select'))->addmultiOptions($timeOption)->setRequired(true);
     $submit = new Zend_Form_Element_Submit("submit");
     $submit->setLabel("Book Now");
     $this->addElements(array($bookingid, $pickupLocation, $returnLocation, $number, $pickupDate, $pickuptime, $returnDate, $returnTime, $submit));
     $this->setElementDecorators(array('viewHelper', 'Errors'));
     $submit->setDecorators(array('viewHelper', 'Errors', array(array('data' => 'HtmlTag'), array('tag' => 'div', 'class' => 'submit-wrapper')), array('Label', array('tag' => 'div'))));
     $submit->removeDecorator("label");
 }
开发者ID:ocpyosep78,项目名称:Booking,代码行数:35,代码来源:BookingForm.php

示例7: __construct

 public function __construct($options = null)
 {
     parent::__construct($options);
     $id = new Zend_Form_Element_Hidden('id');
     $hierarchyLevel = new Zend_Form_Element_Hidden('hierarchyLevel');
     $officeType = new Zend_Form_Element_Text('officeType');
     $officeType->setRequired(true)->addValidators(array(array('NotEmpty'), array('stringLength', false, array(4, 50))));
     // $officeType->addValidator($db_lookup_validator);
     $officeType->setAttrib('class', 'txt_put');
     $officeType->setAttrib('id', 'officeType');
     $officeCode = new Zend_Form_Element_Text('officeCode');
     //add validation
     $officeCode->setRequired(true)->addValidators(array(array('NotEmpty'), array('stringLength', false, array(2, 2))));
     $officeCode->setAttrib('class', 'txt_put');
     $officeCode->setAttrib('id', 'officeCode')->setAttrib('size', '2');
     $this->addElements(array($id, $officeType, $officeCode, $hierarchyLevel));
     $submit = new Zend_Form_Element_Submit('Edit');
     $submit->setAttrib('class', 'officebutton');
     $submit->setLabel('edit');
     $submit->removeDecorator('DtDdWrapper');
     $next = new Zend_Form_Element_Submit('Next');
     $next->setAttrib('class', 'officesubmit');
     $next->setLabel('Next');
     //add form element to form
     $this->addElements(array($submit, $next));
 }
开发者ID:maniargaurav,项目名称:OurBank,代码行数:26,代码来源:EditHierarchy.php

示例8: _setupElements

 private function _setupElements()
 {
     $translate = Zend_Registry::get('Zend_Translate');
     $this->setAttrib('id', 'signupForm');
     $this->setTranslator($translate);
     $email = new Zend_Form_Element_Text('email');
     $email->setRequired(true)->addFilter('StringTrim')->addFilter('StripTags')->addValidator('NotEmpty')->removeDecorator('HtmlTag')->removeDecorator('DtDWrapper')->removeDecorator('label')->setAttrib('id', 'email')->addValidator('EmailAddress');
     $email->addValidator(new Ziown_Form_Validate_EmailAddress(), false);
     $email->getValidator('NotEmpty')->setMessage('Email Address is Required', 'isEmpty');
     $username = new Zend_Form_Element_Text('username');
     $username->setRequired(true)->addFilter('StringTrim')->addFilter('StripTags')->addValidator('NotEmpty')->removeDecorator('HtmlTag')->removeDecorator('DtDWrapper')->removeDecorator('label')->setAttrib('id', 'username');
     $username->addValidator(new Ziown_Form_Validate_UserName());
     $username->getValidator('NotEmpty')->setMessage('User name is Required', 'isEmpty');
     $password = new Zend_Form_Element_Password('password');
     $password->setRequired(true)->removeDecorator('HtmlTag')->removeDecorator('DtDWrapper')->removeDecorator('label')->setAttrib('id', 'txt-password')->setErrorMessages(array('Password is required'));
     $identValidator = new Zend_Validate_Identical($_POST['password']);
     $identValidator->setMessages(array('notSame' => 'Password doesn\'t match!', 'missingToken' => 'Password doesn\'t match!'));
     $confirm_password = new Zend_Form_Element_Password('confirm_password');
     $confirm_password->setRequired(true)->removeDecorator('HtmlTag')->removeDecorator('DtDWrapper')->removeDecorator('label')->setAttrib('id', 'txt-confirm-password')->addValidator($identValidator);
     $signup = new Zend_Form_Element_Submit('signup');
     $signup->setLabel('Sign Up');
     $signup->removeDecorator('DtDdWrapper')->removeDecorator('HtmlTag')->setAttrib('class', 'u-login');
     $this->setDecorators(array(array('ViewScript', array('script' => 'signup.phtml'))));
     $this->addElements(array($username, $password, $confirm_password, $signup, $email));
 }
开发者ID:himel31,项目名称:doctrine2yml-zfmodules,代码行数:25,代码来源:Signup.php

示例9: __construct

 public function __construct($options = null)
 {
     parent::__construct();
     $this->setName('layout_form');
     $this->addElementPrefixPath('Oibs_Decorators', 'Oibs/Decorators/', 'decorator');
     $this->removeDecorator('Errors');
     $this->removeDecorator('HtmlTag');
     $this->removeDecorator('Label');
     //$this->setAction($this->_generateActionUrl());
     $layout_select = new Zend_Form_Element_Select('layout_select');
     $layout_select->setAttrib('onchange', '$("#submitLayoutSelection").click();');
     $layout_select->removeDecorator('Errors');
     $layout_select->removeDecorator('Label');
     $layout_select->removeDecorator('HtmlTag');
     /*foreach($options as $language)
     			$translation_select->addMultiOption($language['iso6391_lng'], $language['name_lng']);
     		*/
     $layout_select->addMultiOption('default', 'Default');
     $layout_select->addMultiOption('custom', 'Custom');
     //$layout_select->setValue($this->_getCurrentLayoutSelect());
     $layout_select->setValue('default');
     $submit = new Zend_Form_Element_Submit('submitLayoutSelection');
     $submit->removeDecorator('DtDdWrapper');
     $submit->setAttrib('style', 'display: none;');
     $this->addElements(array($layout_select, $submit));
 }
开发者ID:jannev,项目名称:site,代码行数:26,代码来源:AccountCustomLayoutForm.php

示例10: init

 public function init()
 {
     /* Form Elements & Other Definitions Here ... */
     $this->setName('FormularioNoticia');
     $ID_NOTICIA = new Zend_Form_Element_Hidden('ID_NOTICIA');
     $ID_NOTICIA->addFilter('Int');
     $ID_NOTICIA->removeDecorator('Label');
     $FK_ARQUIVO = new Zend_Form_Element_Hidden('FK_ARQUIVO');
     $FK_ARQUIVO->addFilter('Int');
     $FK_ARQUIVO->removeDecorator('Label');
     $DS_TITULO = new Zend_Form_Element_Text('DS_TITULO');
     $DS_TITULO->setLabel('TÍTULO')->setRequired(true)->addFilter('StripTags')->addFilter('StringTrim')->addValidator('NotEmpty')->removeDecorator('DtDdWrapper')->removeDecorator('HtmlTag')->removeDecorator('Label')->setAttrib('class', 'form-control')->setAttrib('placeholder', "Enter t�tulo");
     $TX_NOTICIA = new Zend_Form_Element_Textarea('TX_NOTICIA');
     $TX_NOTICIA->setLabel('TEXTO')->setRequired(true)->removeDecorator('DtDdWrapper')->removeDecorator('HtmlTag')->removeDecorator('Label')->setAttrib('class', 'form-control')->setAttrib('rows', '20');
     $DS_RESUMO = new Zend_Form_Element_Textarea('DS_RESUMO');
     $DS_RESUMO->setLabel('RESUMO')->setRequired(true)->removeDecorator('DtDdWrapper')->removeDecorator('HtmlTag')->removeDecorator('Label')->setAttrib('class', 'form-control')->setAttrib('rows', '5');
     $DT_NOTICIA = new Zend_Form_Element_Hidden('DT_NOTICIA');
     $DT_NOTICIA->removeDecorator('Label');
     $tiposNoticia = array("1" => "NOTICIAS", "2" => "NOVIDADES", "3" => "RECADOS");
     $FK_TIPO_NOTICIA = new Zend_Form_Element_Select('FK_TIPO_NOTICIA');
     $FK_TIPO_NOTICIA->setLabel('TIPO NOTÍCIA')->setRequired(true)->addMultiOptions($tiposNoticia)->addFilter('StripTags')->addFilter('StringTrim')->addValidator('NotEmpty')->removeDecorator('DtDdWrapper')->removeDecorator('HtmlTag')->removeDecorator('Label')->setAttrib('class', 'form-control select2')->setAttrib('placeholder', "Enter tipo not�cia");
     $FK_OPERADOR = new Zend_Form_Element_Hidden('FK_OPERADOR');
     $FK_OPERADOR->addFilter('Int');
     $FK_OPERADOR->removeDecorator('Label');
     $submit = new Zend_Form_Element_Submit('submit');
     $submit->setLabel("Adiconar");
     $submit->setAttrib('id', 'submitbutton');
     $submit->removeDecorator('DtDdWrapper')->setAttrib('class', 'btn btn-primary button')->removeDecorator('HtmlTag')->removeDecorator('Label');
     $this->addElements(array($ID_NOTICIA, $DS_TITULO, $TX_NOTICIA, $FK_ARQUIVO, $DS_RESUMO, $DT_NOTICIA, $FK_TIPO_NOTICIA, $FK_OPERADOR, $submit));
     $this->setDecorators(array(array('ViewScript', array('viewScript' => '/forms/formularioNoticia.phtml'))));
 }
开发者ID:andrelsguerra,项目名称:pequiambiental,代码行数:31,代码来源:Noticia.php

示例11: init

 public function init()
 {
     $holidayname = new Zend_Form_Element_Text('holidayname');
     $holidayname->addValidator(new Zend_Validate_Db_NoRecordExists('ourbank_holidayupdates', 'holidayname'));
     $holidayname->setAttrib('class', 'txt_put');
     $holidayname->setRequired(true)->addValidators(array(array('NotEmpty')));
     $office_id = new Zend_Form_Element_Select('office_id');
     $office_id->addMultiOption('', 'Select...');
     $office_id->addMultiOption('All', 'All');
     $office_id->setAttrib('class', 'txt_put');
     $office_id->setRequired(true)->addValidators(array(array('NotEmpty')));
     $holidayupdate_id = new Zend_Form_Element_Hidden('holidayupdate_id');
     $holidayfrom = new ZendX_JQuery_Form_Element_DatePicker('holidayfrom');
     $holidayfrom->setAttrib('class', 'txt_put');
     $holidayfrom->setJQueryParam('dateFormat', 'yy-mm-dd');
     $holidayfrom->setRequired(true)->addValidator(new Zend_Validate_Date('YYYY-MM-DD'), true, array('messages' => array(Zend_Validate_Date::FALSEFORMAT => 'Enter the valid date')));
     $holidayupto = new ZendX_JQuery_Form_Element_DatePicker('holidayupto');
     $holidayupto->setAttrib('class', 'txt_put');
     $holidayupto->setJQueryParam('dateFormat', 'yy-mm-dd');
     $holidayupto->setRequired(true)->addValidator(new Zend_Validate_Date('YYYY-MM-DD'), true, array('messages' => array(Zend_Validate_Date::FALSEFORMAT => 'Enter the valid date')));
     $repayment_date = new ZendX_JQuery_Form_Element_DatePicker('repayment_date');
     $repayment_date->setAttrib('class', 'txt_put');
     $repayment_date->setJQueryParam('dateFormat', 'yy-mm-dd');
     $repayment_date->setRequired(true)->addValidators(array(array('NotEmpty')));
     array('messages' => array(Zend_Validate_Date::FALSEFORMAT => 'Enter the valid date'));
     $submit = new Zend_Form_Element_Submit('Submit');
     $submit->removeDecorator('DtDdWrapper');
     $this->addElements(array($holidayname, $office_id, $holidayfrom, $holidayupto, $repayment_date, $holidayupdate_id, $submit));
 }
开发者ID:maniargaurav,项目名称:OurBank,代码行数:29,代码来源:Holiday.php

示例12: init

 /**
  * Creates the form to edit a user profile.
  * @see Zend_Form::init()
  */
 public function init()
 {
     $em = Zend_Registry::getInstance()->entitymanager;
     $defaultNamespace = new Zend_Session_Namespace('Default');
     $this->setMethod('post');
     $usernameElement = new Zend_Form_Element_Text('username');
     $usernameElement->setLabel("Benutzername");
     $usernameElement->addValidator(new Unplagged_Validate_NoRecordExists('Application_Model_Personnel', 'username'));
     $usernameElement->setIgnore(true);
     $emailElement = new Zend_Form_Element_Text('email');
     $emailElement->setLabel("E-Mail");
     $emailElement->addValidator(new Unplagged_Validate_NoRecordExists('Application_Model_Personnel', 'email'));
     $emailElement->setIgnore(true);
     $firstnameElement = new Zend_Form_Element_Text('firstname');
     $firstnameElement->setLabel("Vorname");
     $firstnameElement->addValidator('stringLength', false, array(2, 64));
     $firstnameElement->setAttrib('maxLength', 64);
     $firstnameElement->setRequired(true);
     $lastnameElement = new Zend_Form_Element_Text('lastname');
     $lastnameElement->setLabel("Nachname");
     $lastnameElement->addValidator('stringLength', false, array(2, 64));
     $lastnameElement->setAttrib('maxLength', 64);
     $lastnameElement->setRequired(true);
     $submitElement = new Zend_Form_Element_Submit('submit');
     $submitElement->setLabel('Speichern');
     $submitElement->setIgnore(true);
     $submitElement->setAttrib('class', 'submit');
     $submitElement->removeDecorator('DtDdWrapper');
     $this->addElements(array($emailElement, $usernameElement, $firstnameElement, $lastnameElement));
     $this->addDisplayGroup(array('email', 'username', 'firstname', 'lastname'), 'personalGoup', array('legend' => 'Persönliche Informationen'));
     $this->addElements(array($submitElement));
 }
开发者ID:rusli-nasir,项目名称:iHealth,代码行数:36,代码来源:Profile.php

示例13: init

 public function init()
 {
     $languageFile = Zend_Registry::get('languageFile');
     $translate = new Zend_Translate('array', $languageFile, 'zh_CN');
     $this->setTranslator($translate);
     $this->setMethod('POST');
     $this->setName('contactForm');
     $element = new Zend_Form_Element_Text('name');
     $element->setLabel('怎么称呼您');
     $this->addElement($element);
     $element = new Zend_Form_Element_Text('email');
     $element->setLabel('您的Email');
     //$element->setRequired(true);
     $this->addElement($element);
     $element = new Elements();
     $element->addReCaptcha($this);
     $this->addDisplayGroup(array('name', 'email', 'captcha'), 'leftSection');
     $this->getDisplayGroup('leftSection')->removeDecorator('DtDdWrapper');
     $element = new Zend_Form_Element_Textarea('body');
     $element->setLabel('想要开通城市地区和找房贴士,关于您的简单介绍');
     $element->addPrefixPath('My_Validator', 'My/Validator/', 'validate');
     $element->addValidator('FormValueNotNull', true);
     //$element->setRequired(true);
     $element->setAttrib('rows', 13);
     $this->addElement($element);
     $this->addDisplayGroup(array('body'), 'rightSection');
     $this->getDisplayGroup('rightSection')->removeDecorator('DtDdWrapper');
     $element = new Zend_Form_Element_Submit('post');
     $element->removeDecorator('Label');
     $this->addElement($element);
 }
开发者ID:BGCX262,项目名称:zufangzi-svn-to-git,代码行数:31,代码来源:AddNewCity.php

示例14: init

 /**
  * (non-PHPdoc)
  * @see Zend_Form#init()
  */
 public function init()
 {
     $table = new Tri_Db_Table('activity_text');
     $validators = $table->getValidators();
     $filters = $table->getFilters();
     $translate = Zend_Registry::get('Zend_Translate');
     $this->setAction('activity/text/save')->setMethod('post');
     $activityId = new Zend_Form_Element_Hidden('activity_id');
     $activityId->addValidators($validators['activity_id'])->addFilters($filters['activity_id'])->removeDecorator('Label')->removeDecorator('HtmlTag');
     $userId = new Zend_Form_Element_Hidden('user_id');
     $userId->addValidators($validators['user_id'])->addFilters($filters['user_id'])->removeDecorator('Label')->removeDecorator('HtmlTag');
     $description = new Zend_Form_Element_Textarea('description');
     $description->setLabel('Description')->addValidators($validators['description'])->addFilters($filters['description'])->setAttrib('rows', 20)->setAttrib('cols', '70%')->setAttrib('id', 'text-description-text')->setAllowEmpty(false);
     $status = new Zend_Form_Element_Hidden('status');
     $status->removeDecorator('Label')->removeDecorator('HtmlTag');
     $this->addElement($userId)->addElement($activityId)->addElement($status)->addElement($description);
     if (Zend_Auth::getInstance()->getIdentity()->role == 'student') {
         $saveDraft = new Zend_Form_Element_Submit('saveDraft');
         $sendCorrection = new Zend_Form_Element_Submit('sendCorrection');
         $saveDraft->removeDecorator('Label')->removeDecorator('DtDdWrapper');
         $sendCorrection->removeDecorator('Label')->removeDecorator('DtDdWrapper');
         $this->addElement($saveDraft)->addElement($sendCorrection);
     } else {
         $openButton = new Zend_Form_Element_Submit('openButton');
         $finalize = new Zend_Form_Element_Submit('finalize');
         $openButton->removeDecorator('Label')->removeDecorator('DtDdWrapper');
         $finalize->removeDecorator('Label')->removeDecorator('DtDdWrapper');
         $note = new Zend_Form_Element_Text('note');
         $note->setLabel('Note')->addValidator('Int')->addFilter('Digits');
         $this->addElement($note)->addElement($openButton)->addElement($finalize);
     }
 }
开发者ID:ramonornela,项目名称:trilhas,代码行数:36,代码来源:Text.php

示例15: __construct

 public function __construct($options = null)
 {
     $authors = new Users();
     $authorOptions = $authors->getAuthors();
     parent::__construct($options);
     $decorators = array(array('ViewHelper'), array('Description', array('placement' => 'append', 'class' => 'info')), array('Errors', array('placement' => 'apppend', 'class' => 'error', 'tag' => 'li')), array('Label'), array('HtmlTag', array('tag' => 'li')));
     $this->setAttrib('enctype', 'multipart/form-data');
     $this->setDecorators(array('FormElements', 'Form'));
     $this->setName('help');
     $title = new Zend_Form_Element_Text('title');
     $title->setLabel('Content Title: ')->setRequired(true)->addFilters(array('StringTrim', 'StripTags'))->setAttrib('size', 60)->addErrorMessage('You must enter a title')->setDecorators($decorators);
     $menuTitle = new Zend_Form_Element_Text('menuTitle');
     $menuTitle->setLabel('Menu Title: ')->setRequired(true)->addFilters(array('StringTrim', 'StripTags'))->setAttrib('size', 60)->addErrorMessage('You must enter a title')->setDecorators($decorators);
     $author = new Zend_Form_Element_Select('author');
     $author->setLabel('Set the author of the article: ')->addMultiOptions(array('Choose an author' => $authorOptions))->setRequired(true)->addFilters(array('StringTrim', 'StripTags'))->addErrorMessage('You must choose an author')->setDecorators($decorators);
     $excerpt = new Zend_Form_Element_Textarea('excerpt');
     $excerpt->setLabel('Optional excerpt: ')->setRequired(false)->setAttrib('rows', 5)->setAttrib('cols', 60)->addFilters(array('StringTrim', 'StripTags'));
     $body = new Pas_Form_Element_RTE('body');
     $body->setLabel('Main body of text: ')->setRequired(true)->setAttrib('rows', 10)->setAttrib('cols', 40)->setAttrib('Height', 400)->setAttrib('ToolbarSet', 'Finds')->addFilters(array('StringTrim', 'BasicHtml', 'EmptyParagraph', 'WordChars'));
     $section = new Zend_Form_Element_Select('section');
     $section->setLabel('Set site section to appear under: ')->addMultiOptions(array('databasehelp' => 'Database help', 'help' => 'Site help'))->setDecorators($decorators)->setRequired(true)->addErrorMessage('You must choose a section for this to be filed under');
     $parentcontent = new Zend_Form_Element_Select('parent');
     $parentcontent->setLabel('Does this have a parent?: ')->setDecorators($decorators)->setRequired(false)->addFilters(array('StringTrim', 'StripTags'));
     $metaKeywords = new Zend_Form_Element_Textarea('metaKeywords');
     $metaKeywords->setLabel('Meta keywords: ')->setAttrib('rows', 5)->setAttrib('cols', 60)->addFilters(array('StringTrim', 'StripTags'))->setRequired(true);
     $metaDescription = new Zend_Form_Element_Textarea('metaDescription');
     $metaDescription->setLabel('Meta description: ')->setAttrib('rows', 5)->setAttrib('cols', 60)->addFilters(array('StringTrim', 'StripTags'))->setRequired(true);
     $publishState = new Zend_Form_Element_Select('publishState');
     $publishState->setLabel('Publishing status: ')->addMultiOptions(array('Please choose publish state' => array('1' => 'Draft', '2' => 'Admin to review', '3' => 'Published')))->setValue(1)->setDecorators($decorators)->setRequired(true)->addFilters(array('StringTrim', 'StripTags'));
     $slug = new Zend_Form_Element_Text('slug');
     $slug->setLabel('Page slug: ')->setAttrib('size', 50)->setDecorators($decorators)->addFilters(array('StringTrim', 'StripTags', 'UlSlug'))->setRequired(true);
     $frontPage = new Zend_Form_Element_Checkbox('frontPage');
     $frontPage->setLabel('Appear on section\'s front page?: ')->setDecorators($decorators)->setRequired(true)->addFilters(array('StringTrim', 'StripTags'));
     $submit = new Zend_Form_Element_Submit('submit');
     $submit->setAttrib('id', 'submitbutton')->setAttrib('class', 'large');
     $submit->removeDecorator('DtDdWrapper');
     $submit->removeDecorator('HtmlTag');
     $this->addElements(array($title, $author, $body, $section, $publishState, $excerpt, $metaKeywords, $metaDescription, $slug, $frontPage, $submit, $menuTitle));
     $this->addDisplayGroup(array('title', 'menuTitle', 'author', 'body', 'section', 'publishState', 'excerpt', 'metaKeywords', 'metaDescription', 'slug', 'frontPage'), 'details')->removeDecorator('HtmlTag');
     $this->details->addDecorators(array('FormElements', array('HtmlTag', array('tag' => 'ul'))));
     $this->details->removeDecorator('DtDdWrapper');
     $this->addDisplayGroup(array('submit'), 'submit')->removeDecorator('HtmlTag');
     $this->submit->removeDecorator('DtDdWrapper');
     $this->submit->removeDecorator('HtmlTag');
     $this->details->setLegend('Add new site content');
 }
开发者ID:rwebley,项目名称:Beowulf---PAS,代码行数:46,代码来源:HelpForm.php


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