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


PHP Zend_Form_Element_Hidden::removeDecorator方法代码示例

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


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

示例1: init

 public function init()
 {
     $this->setMethod('post');
     $this->setAttrib('class', 'col-md-9');
     $decoratorField = new My_Decorator_Field();
     $elements = array();
     //render our form elements and the "form" tag
     $this->setDecorators(array('FormElements', 'Form'));
     $this->setElementDecorators(array('ViewHelper', 'Label'));
     // Add Quantity field
     $input = new Zend_Form_Element_Text('quantity', array('required' => true, 'class' => '"col-md-6"', 'min' => self::MIN, 'max' => self::MAX, 'step' => '1', 'type' => 'number'));
     $min = new Zend_Validate_LessThan(self::MAX + 1);
     $max = new Zend_Validate_GreaterThan(self::MIN);
     $input->addValidators(array(new Zend_Validate_Float(), $min, $max, new Zend_Validate_NotEmpty()));
     $input->addDecorator($decoratorField);
     $elements[] = $input;
     //Add id hidden field
     $input = new Zend_Form_Element_Hidden('product_id');
     $min = new Zend_Validate_GreaterThan(self::MIN);
     $input->addValidators(array(new Zend_Validate_Digits(), $min, new Zend_Validate_NotEmpty()));
     $input->removeDecorator('HtmlTag');
     $input->removeDecorator('Label');
     $elements[] = $input;
     $this->addElements($elements);
 }
开发者ID:cioionut,项目名称:products-webEcommerce,代码行数:25,代码来源:UpdateCart.php

示例2: __construct

 public function __construct($options = null)
 {
     // variable
     parent::__construct($options);
     $baseDir = $options['baseDir'];
     // name
     $name = new Zend_Form_Element_Text('EGI_Name');
     $name->setLabel($this->getView()->getCibleText('form_label_name'))->setRequired(true)->addFilter('StripTags')->addFilter('StringTrim')->addValidator('NotEmpty', true, array('messages' => array('isEmpty' => $this->getView()->getCibleText('validation_message_empty_field'))))->setAttrib('class', 'stdTextInput');
     $this->addElement($name);
     // description
     $description = new Zend_Form_Element_Textarea('EGI_Description');
     $description->setLabel($this->getView()->getCibleText('form_label_description'))->setRequired(true)->addFilter('StripTags')->addFilter('StringTrim')->addValidator('NotEmpty', true, array('messages' => array('isEmpty' => $this->getView()->getCibleText('validation_message_empty_field'))))->setAttrib('class', 'stdTextareaEdit');
     $this->addElement($description);
     //status
     $status = new Zend_Form_Element_Select('EG_Status');
     $status->setLabel($this->getView()->getCibleText('form_label_status'))->setAttrib('class', 'stdSelect');
     $status = Cible_FunctionsGeneral::fillStatusSelectBox($status, 'Extranet_Groups', 'EG_Status');
     $this->addElement($status);
     // Hidden GroupID
     $groupID = new Zend_Form_Element_Hidden('groupID');
     $groupID->removeDecorator('label');
     $groupID->removeDecorator('DtDdWrapper');
     if (isset($options['groupID'])) {
         $groupID->setValue($options['groupID']);
     }
     $this->addElement($groupID);
 }
开发者ID:anunay,项目名称:stentors,代码行数:27,代码来源:FormExtranetGroup.php

示例3: init

    public function init()
    {
        $this->setMethod('post');
        $this->setAttrib('enctype', 'multipart/form-data');

        $photo = new Zend_Form_Element_File('photo');
        $photo->setLabel('photo.upload');
        $photo->setDestination($this->getAttrib('tmp'));

        $photo->addValidator('Count', false, 1);
        $photo->addValidator('Size', false, $this->getAttrib('filesize'));
        $photo->addValidator(
            'Extension', false, $this->getAttrib('extensions')
        );

        $photo->setRequired(true);
        $photo->removeDecorator('Errors');

        $this->addElement($photo, 'photo');

        $fbId = new Zend_Form_Element_Hidden('fbid');
        $fbId->addValidator(
            'Db_NoRecordExists', false,
            array(
                'table' => 'zdjecia',
                'field' => 'fbuserid'
            )
        );
        $fbId->setLabel('fbid');

        $fbId->setRequired(true);
        $fbId->removeDecorator('Errors');
        $fbId->removeDecorator('Label');

        $this->addElement($fbId);

        $save = new Zend_Form_Element_Submit('Save');
        $save->setLabel('Zgłoś Zdjęcie');
        $save->setAttrib('class', 'ui-button ui-widget ui-state-default ui-corner-all ui-button-text-only');

        $this->addElement($save);

        $this->addDecorator(
                new Zend_Form_Decorator_FormErrors(
                    array(
                        'ignoreSubForms'=>true,
                        'markupListStart' => '<ul class="ui-state-error ui-corner-all">',
                    )
                )
            )
            ->addDecorator('FormElements')
            ->addDecorator('HtmlTag')
            ->addDecorator('Form');
    }
开发者ID:robsohn,项目名称:portret-jesienny,代码行数:54,代码来源:Zdjecie.php

示例4: init

 public function init()
 {
     $this->setName('user');
     $id = new Zend_Form_Element_Hidden('id');
     $id->addFilter('Int');
     $id->removeDecorator('label');
     $name = new Zend_Form_Element_Text('name');
     $name->setLabel('name')->setRequired(true)->addFilter('StripTags')->addFilter('StringTrim')->addValidator('NotEmpty')->setAttrib('size', 30)->setAttrib('maxlength', 80)->setAttrib("class", "inputbox")->setDecorators(array(array('ViewScript', array('viewScript' => 'forms/_element_text.phtml'))));
     $password = new Zend_Form_Element_Password('password');
     $password->setLabel('Password')->addValidator('NotEmpty', true)->addFilter('StripTags')->addFilter('StringTrim')->addValidator('StringLength', false, array(3, 20))->setAttrib('size', 30)->setAttrib('maxlength', 80)->setAttrib("class", "inputbox")->setDecorators(array(array('ViewScript', array('viewScript' => 'forms/_element_text.phtml'))));
     $date = new Zend_Form_Element_Text('date');
     $date->setLabel('Date')->setRequired(true)->addFilter('StripTags')->addFilter('StringTrim')->addValidator('NotEmpty')->setAttrib('size', 30)->setAttrib('maxlength', 80)->setAttrib("class", "inputbox")->setDecorators(array(array('ViewScript', array('viewScript' => 'forms/_element_text.phtml'))));
     $email = new Zend_Form_Element_Text('email');
     $email->setLabel('Email')->setRequired(true)->addFilter('StripTags')->addFilter('StringTrim')->addValidator('emailAddress', TRUE)->setAttrib('size', 30)->setAttrib('maxlength', 80)->setAttrib("class", "inputbox")->setDecorators(array(array('ViewScript', array('viewScript' => 'forms/_element_text.phtml'))));
     $status = new Zend_Form_Element_Text('status');
     $status->setLabel('status')->setRequired(true)->addFilter('StripTags')->addFilter('StringTrim')->addValidator('NotEmpty')->setAttrib('size', 30)->setAttrib('maxlength', 80)->setAttrib("class", "inputbox")->setDecorators(array(array('ViewScript', array('viewScript' => 'forms/_element_text.phtml'))));
     $person_id = new Zend_Form_Element_Text('person_id');
     $person_id->setLabel('person_id')->setRequired(true)->addFilter('StripTags')->addFilter('StringTrim')->addValidator('NotEmpty')->setAttrib('size', 30)->setAttrib('maxlength', 80)->setAttrib("class", "inputbox")->setDecorators(array(array('ViewScript', array('viewScript' => 'forms/_element_text.phtml'))));
     $validation_code = new Zend_Form_Element_Text('validation_code');
     $validation_code->setLabel('validation')->setRequired(true)->addFilter('StripTags')->addFilter('StringTrim')->addValidator('NotEmpty')->setAttrib('size', 30)->setAttrib('maxlength', 80)->setAttrib("class", "inputbox")->setDecorators(array(array('ViewScript', array('viewScript' => 'forms/_element_text.phtml'))));
     $phone = new Zend_Form_Element_Text('phone');
     $phone->setLabel('Phone')->setRequired(true)->addFilter('StripTags')->addFilter('StringTrim')->addValidator('NotEmpty')->setAttrib('size', 30)->setAttrib('maxlength', 80)->setAttrib("class", "inputbox")->setDecorators(array(array('ViewScript', array('viewScript' => 'forms/_element_text.phtml'))));
     $role_id = new Zend_Form_Element_Select('role_id');
     $role_id->setLabel('Role')->setRequired(true)->addValidator('NotEmpty', true)->setmultiOptions($this->_selectOptionsRole())->setAttrib('maxlength', 200)->setAttrib('size', 1)->setAttrib("class", "toolboxdrop")->setDecorators(array(array('ViewScript', array('viewScript' => 'forms/_element_select.phtml'))));
     $company_id = new Zend_Form_Element_Select('company_id');
     $company_id->setLabel('company')->setRequired(true)->addValidator('NotEmpty', true)->setmultiOptions($this->_selectOptionsCompany())->setAttrib('maxlength', 200)->setAttrib('size', 1)->setAttrib("class", "toolboxdrop")->setDecorators(array(array('ViewScript', array('viewScript' => 'forms/_element_select.phtml'))));
     $submit = new Zend_Form_Element_Submit('submit');
     $submit->setValue('Guardar')->setAttrib('id', 'submitbutton')->setDecorators(array(array('ViewScript', array('viewScript' => 'forms/_element_submit.phtml'))))->setAttrib('class', 'btn')->removeDecorator('label');
     $add_contact = new Zend_Form_Element_Checkbox('add_contact');
     $add_contact->setLabel('add contact')->setRequired(true);
     $this->addElements(array($id, $name, $password, $date, $email, $status, $validation_code, $person_id, $phone, $role_id, $company_id, $add_contact, $submit));
 }
开发者ID:roigrande,项目名称:globalpms,代码行数:32,代码来源:User.php

示例5: 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

示例6: __construct

 public function __construct($options = null)
 {
     $periods = new Periods();
     $periodword_options = $periods->getPeriodFromWords();
     $activities = new PrimaryActivities();
     $activities_options = $activities->getTerms();
     $counties = new Counties();
     $county_options = $counties->getCountyName2();
     parent::__construct($options);
     $this->setName('filterpeople');
     $decorator = array('TableDecInput');
     $name = new Zend_Form_Element_Text('organisation');
     $name->setLabel('Filter by name')->setRequired(false)->addFilters(array('StripTags', 'StringTrim'))->addErrorMessage('Come on it\'s not that hard, enter a title!')->setAttrib('size', 40)->addDecorator(array('ListWrapper' => 'HtmlTag'), array('tag' => 'td'))->removeDecorator('HtmlTag')->removeDecorator('DtDdWrapper')->addValidator('Alnum', false, array('allowWhiteSpace' => true));
     $contact = new Zend_Form_Element_Text('contact');
     $contact->setLabel('Filter by contact person: ')->setRequired(false)->addFilters(array('StripTags', 'StringTrim'))->addErrorMessage('Enter a valid organisation')->setAttrib('size', 20)->addDecorator(array('ListWrapper' => 'HtmlTag'), array('tag' => 'td'))->removeDecorator('HtmlTag')->removeDecorator('DtDdWrapper');
     $contactpersonID = new Zend_Form_Element_Hidden('contactpersonID');
     $contactpersonID->removeDecorator('Label')->removeDecorator('DtDdWrapper')->addFilters(array('StripTags', 'StringTrim'))->removeDecorator('HtmlTag')->addValidator('Alnum');
     $county = new Zend_Form_Element_Select('county');
     $county->setLabel('Filter by county')->setRequired(false)->addFilters(array('StripTags', 'StringTrim'))->addValidator('StringLength', false, array(1, 200))->addDecorator(array('ListWrapper' => 'HtmlTag'), array('tag' => 'td'))->removeDecorator('HtmlTag')->removeDecorator('DtDdWrapper')->addMultiOptions(array(NULL => NULL, 'Choose county' => $county_options))->addValidator('InArray', false, array(array_keys($county_options)));
     //Submit button
     $submit = new Zend_Form_Element_Submit('submit');
     $submit->setAttrib('id', 'submitbutton')->setLabel('Filter')->addDecorator(array('ListWrapper' => 'HtmlTag'), array('tag' => 'td'))->removeDecorator('HtmlTag')->removeDecorator('DtDdWrapper');
     $hash = new Zend_Form_Element_Hash('csrf');
     $hash->setValue($this->_config->form->salt)->removeDecorator('DtDdWrapper')->removeDecorator('HtmlTag')->removeDecorator('label')->setTimeout(4800);
     $this->addElement($hash);
     $this->addElements(array($name, $county, $contact, $contactpersonID, $submit));
 }
开发者ID:rwebley,项目名称:Beowulf---PAS,代码行数:27,代码来源:OrganisationFilterForm.php

示例7: init

 public function init()
 {
     // Задаём имя форме
     $this->setName('warehouse');
     // Создаём переменную, которая будет хранить сообщение валидации
     $isEmptyMessage = 'Значение является обязательным и не может быть пустым';
     // Создаём элемент формы – text c именем = number
     $image = new Zend_Form_Element_File('image');
     $image->setLabel('Загрузить фотографию')->setDestination(DATA_PATH . '/public/img/')->addValidator('Size', false, '204800000')->addValidator('Extension', true, 'png,jpg,gif')->addValidator('ImageSize', false, array('minwidth' => 50, 'minheight' => 50, 'maxwidth' => 5000, 'maxheight' => 5000));
     $serial = new Zend_Form_Element_Text('serial', array('class' => 'form-control'));
     $serial->setLabel('Серийный номер')->setAttrib('placeholder', 'S\\N:')->setRequired(true)->addFilter('StripTags')->addFilter('StringTrim')->addValidator('NotEmpty', true, array('messages' => array('isEmpty' => $isEmptyMessage)))->addValidator('regex', true, array("/^[а-яА-Яa-zA-Z0-9 \\. \\-]{3,200}\$/i", 'messages' => 'Не верный формат ввода'))->setDecorators(array('ViewHelper', 'Errors', array(array('data' => 'HtmlTag'), array('class' => 'test')), array('Label', array('tag' => 'div', 'class' => 'form-control-static')), array('Errors', array('tag' => 'div', 'class' => 'form-control-static')), array(array('row' => 'HtmlTag'), array('tag' => 'div', 'class' => 'form-group'))));
     $name = new Zend_Form_Element_Text('name', array('class' => 'form-control'));
     $name->setLabel('Название')->setRequired(true)->addFilter('StripTags')->addValidator('NotEmpty', true, array('messages' => 'Йо на, не может быть пустым'))->addValidator('regex', true, array("/^[а-яА-Яa-zA-Z0-9 \\. \\- \\s ]{3,50}\$/i", 'messages' => 'Не верный формат ввода'))->setDecorators(array('ViewHelper', 'Errors', array(array('data' => 'HtmlTag'), array('class' => 'test')), array('Label', array('tag' => 'div', 'class' => 'form-control-static')), array('Errors', array('tag' => 'div', 'class' => 'form-control-static')), array(array('row' => 'HtmlTag'), array('tag' => 'div', 'class' => 'form-group'))));
     $type = new Zend_Form_Element_Text('type', array('class' => 'form-control'));
     $type->setLabel('Тип')->setAttrib('placeholder', 'Viena,Royal,All')->setRequired(true)->addFilter('StripTags')->addValidator('NotEmpty', true, array('messages' => 'Йо на, не может быть пустым'))->addValidator('regex', true, array("/^[a-zA-Z0-9 \\- \\s]{3,20}\$/i", 'messages' => 'Не верный формат ввода'))->setDecorators(array('ViewHelper', 'Errors', array(array('data' => 'HtmlTag'), array('class' => 'test')), array('Label', array('tag' => 'div', 'class' => 'form-control-static')), array('Errors', array('tag' => 'div', 'class' => 'form-control-static')), array(array('row' => 'HtmlTag'), array('tag' => 'div', 'class' => 'form-group'))));
     $remain = new Zend_Form_Element_Text('remain', array('class' => 'form-control'));
     $remain->setLabel('Остаток')->setAttrib('placeholder', 'кол-во')->setRequired(true)->addFilter('StripTags')->addValidator('NotEmpty', true, array('messages' => 'Йо на, не может быть пустым'))->addValidator('regex', true, array("/^[0-9 \\-]{1,20}\$/i", 'messages' => 'Не верный формат ввода'))->setDecorators(array('ViewHelper', 'Errors', array(array('data' => 'HtmlTag'), array('class' => 'test')), array('Label', array('tag' => 'div', 'class' => 'form-control-static')), array('Errors', array('tag' => 'div', 'class' => 'form-control-static')), array(array('row' => 'HtmlTag'), array('tag' => 'div', 'class' => 'form-group'))));
     $price = new Zend_Form_Element_Text('price', array('class' => 'form-control'));
     $price->setLabel('Цена')->setAttrib('placeholder', 'введите цену в грн')->setRequired(true)->addFilter('StripTags')->addValidator('NotEmpty', true, array('messages' => 'Йо на, не может быть пустым'))->addValidator('regex', true, array("/^[0-9]{0,20}\$/i", 'messages' => 'Не верный формат ввода, для ввода доступны только цифры'))->setDecorators(array('ViewHelper', 'Errors', array(array('data' => 'HtmlTag'), array('class' => 'test')), array('Label', array('tag' => 'div', 'class' => 'form-control-static')), array('Errors', array('tag' => 'div', 'class' => 'form-control-static')), array(array('row' => 'HtmlTag'), array('tag' => 'div', 'class' => 'form-group'))));
     // Создаём элемент hidden c именем = id
     $id = new Zend_Form_Element_Hidden('id');
     // Указываем, что данные в этом элементе фильтруются как число int
     $id->addFilter('Int')->removeDecorator('label')->removeDecorator('element');
     // Создаём элемент hidden c именем = id
     $path = new Zend_Form_Element_Hidden('path');
     // Указываем, что данные в этом элементе фильтруются как число int
     $path->removeDecorator('label')->removeDecorator('element');
     // Создаём элемент формы Submit c именем = submit
     $submit = new Zend_Form_Element_Submit('submit', array('class' => 'btn btn-default'));
     // Добавляем все созданные элементы к форме.
     $this->addElements(array($id, $serial, $name, $type, $remain, $price, $image, $submit, $path));
 }
开发者ID:vitaliy5118,项目名称:ss1,代码行数:32,代码来源:Warehouse.php

示例8: 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

示例9: __construct

 public function __construct($options = null)
 {
     parent::__construct($options);
     $this->setName('relatedfindform');
     $decorators = array(array('ViewHelper'), array('Description', array('placement' => 'append', 'class' => 'info')), array('Errors', array('placement' => 'append', 'class' => 'error', 'tag' => 'li')), array('Label'), array('HtmlTag', array('tag' => 'li')));
     $old_findID = new Zend_Form_Element_Text('old_findID');
     $old_findID->setLabel('Find number: ')->setDecorators($decorators)->setAttrib('size', 25);
     $find1ID = new Zend_Form_Element_Hidden('find1ID');
     $find1ID->removeDecorator('HtmlTag')->removeDecorator('DtDdWrapper')->removeDecorator('Label');
     $clause = 'AND find1ID = ' . $find1ID->getValue;
     $find2ID = new Zend_Form_Element_Hidden('find2ID');
     $find2ID->removeDecorator('HtmlTag')->removeDecorator('DtDdWrapper')->removeDecorator('Label');
     //Submit button
     $submit = new Zend_Form_Element_Submit('submit');
     $submit->setAttrib('id', 'submitbutton')->removeDecorator('HtmlTag')->removeDecorator('DtDdWrapper')->setAttrib('class', 'large');
     $hash = new Zend_Form_Element_Hash('csrf');
     $hash->setValue($this->_config->form->salt)->removeDecorator('DtDdWrapper')->removeDecorator('HtmlTag')->removeDecorator('label')->setTimeout(4800);
     $this->addElement($hash);
     $this->addElements(array($old_findID, $find2ID, $find1ID, $submit));
     $this->addDisplayGroup(array('old_findID', 'find1ID', 'find2ID'), 'details')->removeDecorator('HtmlTag');
     $this->details->addDecorators(array('FormElements', array('HtmlTag', array('tag' => 'ul'))));
     $this->details->removeDecorator('DtDdWrapper');
     $this->details->removeDecorator('HtmlTag');
     $this->details->setLegend('Add a new reference');
     $this->addDisplayGroup(array('submit'), 'submit');
 }
开发者ID:rwebley,项目名称:Beowulf---PAS,代码行数:26,代码来源:RelatedFindForm.php

示例10: __construct

 public function __construct($options = null)
 {
     parent::__construct($options);
     $decorators = array(array('ViewHelper'), array('Description', array('tag' => '', 'placement' => 'append')), array('Errors', array('placement' => 'append', 'tag' => 'li')), array('Label', array('separator' => ' ', 'requiredSuffix' => ' *')), array('HtmlTag', array('tag' => 'li')));
     $this->setName('comments');
     $comment_author_IP = new Zend_Form_Element_Hidden('comment_author_IP');
     $comment_author_IP->removeDecorator('HtmlTag')->addFilters(array('StripTags', 'StringTrim'))->removeDecorator('DtDdWrapper')->removeDecorator('Label')->setValue($_SERVER['REMOTE_ADDR'])->addValue('Ip');
     $comment_agent = new Zend_Form_Element_Hidden('comment_agent');
     $comment_agent->removeDecorator('HtmlTag')->removeDecorator('DtDdWrapper')->removeDecorator('Label')->setValue($_SERVER['HTTP_USER_AGENT'])->setRequired(false)->addFilters(array('StripTags', 'StringTrim'));
     $comment_findID = new Zend_Form_Element_Hidden('comment_findID');
     $comment_findID->addFilters(array('StripTags', 'StringTrim'))->setDecorators(array(array('ViewHelper'), array('Description', array('tag' => '')), array('Errors'), array('HtmlTag', array('tag' => 'p')), array('Label', array('tag' => ''))));
     $comment_author = new Zend_Form_Element_Text('comment_author');
     $comment_author->setLabel('Enter your name: ')->setRequired(true)->addFilters(array('StripTags', 'StringTrim'))->addValidator('Alnum', false, array('allowWhiteSpace' => true))->addErrorMessage('Please enter a valid name!')->setDecorators($decorators);
     $comment_author_email = new Zend_Form_Element_Text('comment_author_email');
     $comment_author_email->setLabel('Enter your email address: ')->setDecorators($decorators)->setRequired(true)->addFilters(array('StripTags', 'StringTrim', 'StringToLower'))->addValidator('EmailAddress', false, array('mx' => true))->addErrorMessage('Please enter a valid email address!')->setDescription('* This will not be displayed to the public.');
     $comment_author_url = new Zend_Form_Element_Text('comment_author_url');
     $comment_author_url->setLabel('Enter your web address: ')->setDecorators($decorators)->setRequired(false)->addFilters(array('StripTags', 'StringTrim', 'StringToLower'))->addErrorMessage('Please enter a valid address!')->addValidator('Url')->setDescription('* Not compulsory');
     $comment_content = new Pas_Form_Element_RTE('comment_content');
     $comment_content->setLabel('Enter your comment: ')->setRequired(true)->setAttrib('rows', 10)->setAttrib('cols', 40)->setAttrib('Height', 400)->setAttrib('ToolbarSet', 'Finds')->addFilters(array('StringTrim', 'BasicHtml', 'EmptyParagraph', 'WordChars'));
     $submit = new Zend_Form_Element_Submit('submit');
     $submit->setAttrib('id', 'submitbutton')->removeDecorator('label')->removeDecorator('HtmlTag')->removeDecorator('DtDdWrapper')->setAttrib('class', 'large');
     $approval = new Zend_Form_Element_Radio('comment_approval');
     $approval->setLabel('What would you like to do? ')->addMultiOptions(array('spam' => 'Set as spam', 'ham' => 'Submit ham?', 'approved' => 'Publish it?', 'delete' => 'Delete it?'))->setValue('approved')->addFilters(array('StripTags', 'StringTrim', 'StringToLower'))->setOptions(array('separator' => ''))->setDecorators($decorators);
     $this->addElements(array($comment_author_IP, $comment_agent, $comment_author, $comment_author_email, $comment_content, $comment_author_url, $comment_findID, $approval, $submit));
     $this->addDisplayGroup(array('comment_author', 'comment_author_email', 'comment_author_url', 'comment_content', 'comment_approval', 'comment_findID'), 'details');
     $this->details->addDecorators(array('FormElements', array('HtmlTag', array('tag' => 'ul'))));
     $this->details->removeDecorator('HtmlTag');
     $this->details->removeDecorator('DtDdWrapper');
     $this->details->setLegend('Enter your comments: ');
     $this->addDisplayGroup(array('submit'), 'submit');
 }
开发者ID:rwebley,项目名称:Beowulf---PAS,代码行数:31,代码来源:PublishCommentFindForm.php

示例11: 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

示例12: __construct

 public function __construct($options = null)
 {
     parent::__construct($options);
     $mints = new Mints();
     $mints_options = $mints->getRomanMints();
     $this->setDecorators(array('FormElements', 'Fieldset', 'Form'));
     $this->setName('romanmints');
     $id = new Zend_Form_Element_Hidden('ID');
     $id->removeDecorator('label')->removeDecorator('HtmlTag');
     $name = new Zend_Form_Element_Text('name');
     $name->setLabel('Issuing mint known as: ')->setRequired(true)->addFilters(array('StripTags', 'StringTrim'))->addValidator('Alnum', false, array('allowWhiteSpace' => true));
     $description = new Zend_Form_Element_TextArea('description');
     $description->setLabel('Description of mint: ')->addFilters(array('BasicHtml', 'StringTrim', 'EmptyParagraph'))->setAttribs(array('cols' => 50, 'rows' => 10))->setAttrib('class', 'expanding');
     $abbrev = new Zend_Form_Element_Text('abbrev');
     $abbrev->setLabel('Abbreviation appearing on coins: ')->setRequired(true)->addFilters(array('StripTags', 'StringTrim'))->addValidator('NotEmpty')->addValidator('Alnum', false, array('allowWhiteSpace' => true));
     $latitude = new Zend_Form_Element_Text('latitude');
     $latitude->setLabel('Latitude: ')->setRequired(true)->addFilters(array('StripTags', 'StringTrim'))->addValidator('Float');
     $longitude = new Zend_Form_Element_Text('longitude');
     $longitude->setLabel('Longitude: ')->setRequired(true)->addFilters(array('StripTags', 'StringTrim'))->addValidator('Float');
     $pasID = new Zend_Form_Element_Select('pasID');
     $pasID->setLabel('Corresponding database entry: ')->addFilters(array('StripTags', 'StringTrim'))->addValidator('InArray', false, array(array_keys($mints_options)))->addMultiOptions($mints_options);
     $hash = new Zend_Form_Element_Hash('csrf');
     $hash->setValue($this->_config->form->salt)->removeDecorator('DtDdWrapper')->removeDecorator('HtmlTag')->removeDecorator('label')->setTimeout(4800);
     //Submit button
     $submit = new Zend_Form_Element_Submit('submit');
     $submit->setAttrib('id', 'submitbutton');
     $this->addElements(array($id, $name, $description, $latitude, $longitude, $pasID, $abbrev, $submit, $hash));
     $this->addDisplayGroup(array('name', 'description', 'abbrev', 'pasID', 'latitude', 'longitude'), 'details');
     $this->setLegend('Active Roman Mints');
     $this->addDisplayGroup(array('submit'), 'submit');
 }
开发者ID:rwebley,项目名称:Beowulf---PAS,代码行数:31,代码来源:RomanMintForm.php

示例13: init

 public function init()
 {
     $this->setName('resource');
     $id = new Zend_Form_Element_Hidden('id');
     $id->addFilter('Int');
     $id->removeDecorator('label');
     $name = new Zend_Form_Element_Text('name');
     $name->setLabel('name')->setRequired(true)->addFilter('StripTags')->addFilter('StringTrim')->addValidator('NotEmpty')->setAttrib('size', 30)->setAttrib('maxlength', 80)->setAttrib("class", "inputbox")->setDecorators(array(array('ViewScript', array('viewScript' => 'forms/_element_text.phtml'))));
     $suppliers_id = new Zend_Form_Element_Select('suppliers_id');
     $suppliers_id->setLabel('suppliers')->addValidator('NotEmpty', true)->setmultiOptions($this->_selectOptionsSuppliers())->setOptions(array('onChange' => 'javascript:getAjaxResponse("http://globalpms.es/production/resource/getdataresource/id/"+this.value,"resource_id");javascript:getAjaxResponse("http://globalpms.es/production/resource/getdata/id/"+this.value,"contacts_id");'))->setAttrib('size', 1)->setAttrib("class", "toolboxdrop")->setDecorators(array(array('ViewScript', array('viewScript' => 'forms/_element_select.phtml'))));
     $contacts_id = new Zend_Form_Element_Select('contacts_id');
     $contacts_id->setLabel('supplier contact ')->setmultiOptions($this->_selectOptionsContactSuppliers())->setAttrib('maxlength', 200)->setAttrib('size', 1)->setAttrib("class", "toolboxdrop")->setDecorators(array(array('ViewScript', array('viewScript' => 'forms/_element_select.phtml'))));
     $resource_id = new Zend_Form_Element_Select('resource_id');
     $resource_id->setLabel('resource')->setmultiOptions($this->_selectOptionsResources())->setAttrib('maxlength', 200)->setAttrib('size', 1)->setAttrib("class", "toolboxdrop")->setDecorators(array(array('ViewScript', array('viewScript' => 'forms/_element_select.phtml'))));
     $unbilled_hours = new Zend_Form_Element_Text('unbilled_hours');
     $unbilled_hours->setLabel('Unbilled hours')->setRequired(true)->addFilter('StripTags')->addFilter('StringTrim')->addValidator('NotEmpty')->setAttrib('size', 30)->setAttrib('maxlength', 80)->setAttrib("class", "inputbox")->setDecorators(array(array('ViewScript', array('viewScript' => 'forms/_element_text.phtml'))));
     $facturation_types_id = new Zend_Form_Element_Select('facturation_types_id');
     $facturation_types_id->setLabel('Facturation type')->addValidator('NotEmpty', true)->setmultiOptions($this->_selectOptionsFacturation_types())->setAttrib('maxlength', 200)->setAttrib('size', 1)->setAttrib("class", "toolboxdrop")->setDecorators(array(array('ViewScript', array('viewScript' => 'forms/_element_select.phtml'))));
     $price = new Zend_Form_Element_Text('price');
     $price->setLabel('Price')->setRequired(true)->addFilter('StripTags')->addFilter('StringTrim')->addValidator('NotEmpty')->setAttrib('size', 30)->setAttrib('maxlength', 80)->setAttrib("class", "inputbox")->setDecorators(array(array('ViewScript', array('viewScript' => 'forms/_element_text.phtml'))));
     $observation = new Zend_Form_Element_Text('observation');
     $observation->setLabel('observation')->setRequired(true)->addFilter('StripTags')->addFilter('StringTrim')->addValidator('NotEmpty')->setAttrib('size', 30)->setAttrib('maxlength', 80)->setAttrib("class", "inputbox")->setDecorators(array(array('ViewScript', array('viewScript' => 'forms/_element_text.phtml'))));
     $submit = new Zend_Form_Element_Submit('submit');
     $submit->setValue('Guardar')->setAttrib('id', 'submitbutton')->setDecorators(array(array('ViewScript', array('viewScript' => 'forms/_element_submit.phtml'))))->setAttrib('class', 'btn')->removeDecorator('label');
     $this->addElements(array($id, $name, $suppliers_id, $resource_id, $contacts_id, $unbilled_hours, $facturation_types_id, $price, $observation, $submit));
 }
开发者ID:roigrande,项目名称:globalpms,代码行数:26,代码来源:Resource.php

示例14: init

 public function init()
 {
     $this->setName('resource_activity_has_receipt');
     $id = new Zend_Form_Element_Hidden('id');
     $id->addFilter('Int');
     $id->removeDecorator('label');
     $name = new Zend_Form_Element_Text('name');
     $name->setLabel('name')->setRequired(true)->addFilter('StripTags')->addFilter('StringTrim')->addValidator('NotEmpty')->setAttrib('size', 30)->setAttrib('maxlength', 80)->setAttrib("class", "inputbox")->setDecorators(array(array('ViewScript', array('viewScript' => 'forms/_element_text.phtml'))));
     //
     //        $resource_activity_has_receipt_types_id = new Zend_Form_Element_Select('resource_activity_has_receipt_types_id');
     //        $resource_activity_has_receipt_types_id->setLabel('resource_activity_has_receipt types')
     //                ->addValidator('NotEmpty', true)
     //                ->setmultiOptions($this->_selectOptions_types())
     //                ->setAttrib('maxlength', 200)
     //                ->setAttrib('size', 1)
     //                ->setAttrib("class", "toolboxdrop")
     //                ->setDecorators(array(array('ViewScript', array(
     //                            'viewScript' => 'forms/_element_select.phtml'))))
     //        ;
     //
     //        $resource_activity_has_receipt_types_id = new Zend_Form_Element_Multiselect('$resource_activity_has_receipt_types_id');
     //        $resource_activity_has_receipt_types_id->setLabel('resource_activity_has_receipt types')
     //                ->setmultiOptions($this->_selectOptions_types())
     //                ->setAttrib('maxlength', 200)
     //                ->setAttrib('size', 5)
     //                ->setDecorators(array(array('ViewScript', array(
     //                            'viewScript' => 'forms/_element_select.phtml'))))
     //                ->setAttrib("class","toolboxdrop")
     //        ;
     //
     $submit = new Zend_Form_Element_Submit('submit');
     $submit->setValue('Guardar')->setAttrib('id', 'submitbutton')->setDecorators(array(array('ViewScript', array('viewScript' => 'forms/_element_submit.phtml'))))->setAttrib('class', 'btn')->removeDecorator('label');
     $this->addElements(array($id, $name, $submit));
 }
开发者ID:roigrande,项目名称:globalpms,代码行数:34,代码来源:Resource_activity_has_receipt.php

示例15: init

 public function init()
 {
     $this->setName('activity');
     $id = new Zend_Form_Element_Hidden('id');
     $id->addFilter('Int');
     $id->removeDecorator('label');
     $name = new Zend_Form_Element_Text('name');
     $name->setLabel('Name')->setRequired(true)->addFilter('StripTags')->addfilter('StringTrim')->addValidator('NotEmpty')->setAttrib('size', 30)->setAttrib('maxlength', 80)->setAttrib("class", "inputbox")->setDecorators(array(array('ViewScript', array('viewScript' => 'forms/_element_text.phtml'))));
     $activity_types_id = new Zend_Form_Element_Select('activity_types_id');
     $activity_types_id->setLabel('activity type')->addValidator('NotEmpty', true)->setmultiOptions($this->_selectOptionsActivity_types())->setAttrib('maxlength', 200)->setAttrib('size', 1)->setAttrib("class", "toolboxdrop")->setDecorators(array(array('ViewScript', array('viewScript' => 'forms/_element_select.phtml'))));
     $contact_own_company_id = new Zend_Form_Element_Select('contact_own_company_id');
     $contact_own_company_id->setLabel('contact own company')->addValidator('NotEmpty', true)->setmultiOptions($this->_selectOptionsContactOwnCompanies())->setAttrib('maxlength', 200)->setAttrib('size', 1)->setDecorators(array(array('ViewScript', array('viewScript' => 'forms/_element_select.phtml'))));
     //
     $contact_client_company_id = new Zend_Form_Element_Select('contact_client_company_id');
     $contact_client_company_id->setLabel('contact client company')->addValidator('NotEmpty', true)->setmultiOptions($this->_selectOptionsContactClientCompanies())->setAttrib('maxlength', 200)->setAttrib('size', 1)->setAttrib("class", "toolboxdrop")->setDecorators(array(array('ViewScript', array('viewScript' => 'forms/_element_select.phtml'))));
     $status_id = new Zend_Form_Element_Select('status_id');
     $status_id->setLabel('Status')->addValidator('NotEmpty', true)->setmultiOptions($this->_selectOptionsStatus())->setAttrib('maxlength', 300)->setAttrib('size', 1)->setAttrib("class", "toolboxdrop")->setDecorators(array(array('ViewScript', array('viewScript' => 'forms/_element_select.phtml'))));
     $date_start = new Zend_Form_Element_Text('date_start');
     $date_start->setLabel('date start')->setRequired(true)->addFilter('StripTags')->addfilter('StringTrim')->addValidator('NotEmpty')->setAttrib('size', 30)->setAttrib('maxlength', 80)->setAttrib("class", "inputbox")->setDecorators(array(array('ViewScript', array('viewScript' => 'forms/_element_text.phtml'))))->setAttrib('id', 'f_date_start');
     $date_end = new Zend_Form_Element_Text('date_end');
     $date_end->setLabel('date end')->setRequired(true)->addFilter('StripTags')->addfilter('StringTrim')->addValidator('NotEmpty')->setAttrib('size', 30)->setAttrib('maxlength', 80)->setAttrib("class", "inputbox")->setDecorators(array(array('ViewScript', array('viewScript' => 'forms/_element_text.phtml'))))->setAttrib('id', 'f_date_end');
     $observation = new Zend_Form_Element_Text('observation');
     $observation->setLabel('Observation')->setRequired(true)->addfilter('StripTags')->addfilter('StringTrim')->addValidator('NotEmpty')->setAttrib('size', 30)->setAttrib('maxlength', 80)->setAttrib("class", "inputbox")->setDecorators(array(array('ViewScript', array('viewScript' => 'forms/_element_text.phtml'))));
     $submit = new Zend_Form_Element_Submit('submit');
     $submit->setValue('Guardar')->setAttrib('id', 'submitbutton')->setDecorators(array(array('ViewScript', array('viewScript' => 'forms/_element_submit.phtml'))))->setAttrib('class', 'btn')->removeDecorator('label');
     $this->addElements(array($id, $name, $activity_types_id, $contact_own_company_id, $contact_client_company_id, $status_id, $date_start, $date_end, $observation, $submit));
 }
开发者ID:roigrande,项目名称:globalpms,代码行数:27,代码来源:Activity.php


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