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


PHP Zend_Form_Element_Submit::setValue方法代码示例

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


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

示例1: init

 public function init()
 {
     $this->setName('client');
     $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'))));
     $fiscal_name = new Zend_Form_Element_Text('fiscal_name');
     $fiscal_name->setLabel('Fiscal name')->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'))));
     $company_types_id = new Zend_Form_Element_Select('company_types_id');
     $company_types_id->setLabel('Type')->setRequired(true)->addValidator('NotEmpty', true)->setmultiOptions($this->_selectOptionsCompanyTypes())->setAttrib('maxlength', 200)->setAttrib('size', 1)->setAttrib("class", "toolboxdrop")->setDecorators(array(array('ViewScript', array('viewScript' => 'forms/_element_select.phtml'))));
     $email = new Zend_Form_Element_Text('email');
     $email->setLabel('Email')->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'))));
     $telephone = new Zend_Form_Element_Text('telephone');
     $telephone->setLabel('Telephone')->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'))));
     $fax = new Zend_Form_Element_Text('fax');
     $fax->setLabel('fax')->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'))));
     $direction = new Zend_Form_Element_Text('direction');
     $direction->setLabel('Direction')->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'))));
     $city = new Zend_Form_Element_Text('city');
     $city->setLabel('City')->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'))));
     $country = new Zend_Form_Element_Text('country');
     $country->setLabel('Country')->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'))));
     $postal_code = new Zend_Form_Element_Text('postal_code');
     $postal_code->setLabel('Postal code')->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')->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, $fiscal_name, $company_types_id, $email, $telephone, $fax, $direction, $city, $country, $postal_code, $observation, $submit));
 }
开发者ID:roigrande,项目名称:globalpms,代码行数:32,代码来源:Client.php

示例2: init

 public function init()
 {
     $form = array();
     $this->setName('changeusername');
     $auth = Zend_Auth::getInstance()->getIdentity();
     // For Admin
     if ($auth->role == 'admin') {
         $account_identifier = new Zend_Form_Element_Text('account_identifier');
         $account_identifier->setLabel('Organisation User Identifier')->setRequired()->addValidator('Db_NoRecordExists', false, array('table' => 'account', 'field' => 'username'))->addErrorMessage('This Organisation User Identifier is already used.')->setDescription("Your organisation user identifier will be used as a prefix for all the \n                              AidStream users in your organisation. We recommend that you use a short \n                              abbreviation that uniquely identifies your organisation. If your organisation \n                              is 'Acme Bellus Foundation', your organisation user identifier should be \n                              'abf', depending upon it's availability.")->setAttrib('class', 'form-text');
         $user_name = new Zend_Form_Element_Text('user_name');
         $user_name->setLabel('New Username')->setRequired()->setAttrib('class', 'form-text')->setAttrib('readonly', true)->setDescription("This will be your new username with Organisation User \n                              Identifier as a prefix. You will not be able to change '_admin' part of the \n                              username.");
         $submit = new Zend_Form_Element_Submit('Submit');
         $submit->setValue('change')->setAttrib('class', 'form-submit')->setAttrib('id', 'change-username');
     }
     // For Groupadmin
     if ($auth->role == 'groupadmin') {
         $group_identifier = new Zend_Form_Element_Text('group_identifier');
         $group_identifier->setLabel('Group Identifier')->setRequired()->addValidator('Db_NoRecordExists', false, array('table' => 'user_group', 'field' => 'username'))->addErrorMessage('This group identifier is already used')->setDescription("Your group identifier will be used as a prefix for your username. \n                    We recommend that you use a short abbreviation that uniquely identifies your organisation \n                    group. If your group identifier is 'abc' the username will be 'abc_group'.")->setAttrib('class', 'form-text');
         $user_name = new Zend_Form_Element_Text('user_name');
         $user_name->setLabel('New Username')->setRequired()->setAttrib('class', 'form-text')->setValue('_group')->setAttrib('readonly', true);
         $submit = new Zend_Form_Element_Submit('Submit');
         $submit->setValue('change')->setAttrib('class', 'form-submit')->setAttrib('id', 'change-group-username');
     }
     $this->addElements(array($user_name, $account_identifier, $group_identifier));
     $this->addDisplayGroup(array('account_identifier', 'group_identifier', 'user_name'), 'field1', array('legend' => 'Change Username'));
     $this->addElement($submit);
     $this->setMethod('post');
     $displayGroup = $this->getDisplayGroup('field1');
     $displayGroup->addDecorators(array(array(array('wrapperAll' => 'HtmlTag'), array('tag' => 'div', 'class' => 'default-activity-list'))));
     foreach ($this->getElements() as $element) {
         $element->addDecorators(array(array(array('wrapperAll' => 'HtmlTag'), array('tag' => 'div', 'class' => 'form-item'))));
     }
 }
开发者ID:relyd,项目名称:aidstream,代码行数:33,代码来源:Changeusername.php

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

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

 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

示例6: edit

 public function edit($account_id = '')
 {
     $form = array();
     $model = new Model_Wep();
     $language = $model->getCodeArray('Language', null, '1');
     $currency = $model->getCodeArray('Currency', null, '1');
     $form['xml_lang'] = new Zend_Form_Element_Select('xml_lang');
     $form['xml_lang']->setLabel('Language')->setAttrib('class', 'form-select')->addMultiOption('', 'Select anyone')->setRequired();
     foreach ($language as $key => $eachLanguage) {
         $form['xml_lang']->addMultiOption($key, $eachLanguage);
     }
     $form['default_currency'] = new Zend_Form_Element_Select('default_currency');
     $form['default_currency']->setAttrib('class', 'form-select')->setLabel('Default Currency')->setRequired()->addMultiOption('', 'Select anyone');
     foreach ($currency as $key => $eachCurrency) {
         $form['default_currency']->addMultiOption($key, $eachCurrency);
     }
     $form['hierarchy'] = new Zend_Form_Element_Text('hierarchy');
     $form['hierarchy']->setAttrib('class', 'form-text')->setLabel('Hierarchy');
     //This code is used to append a <div> with help class for all form elements, used for displaying help
     foreach ($form as $item_name => $element) {
         $form[$item_name]->setDecorators(array('ViewHelper', 'Errors', 'Label', array('HtmlTag', array('tag' => '<div>', 'placement' => 'PREPEND', 'class' => 'help activity-' . $item_name)), array(array('wrapperAll' => 'HtmlTag'), array('tag' => 'div', 'class' => 'clearfix form-item'))));
     }
     $this->addElements($form);
     $this->addDisplayGroup(array('xml_lang', 'default_currency', 'hierarchy'), 'field1', array('legend' => 'Activity'));
     $group = $this->getDisplayGroup('field1');
     $group->addDecorators(array(array(array('wrapperAll' => 'HtmlTag'), array('tag' => 'div', 'class' => 'default-activity-list'))));
     $save = new Zend_Form_Element_Submit('save');
     $save->setValue('Save')->setAttrib('class', 'form-submit');
     $this->addElement($save);
     $this->setMethod('post');
     $this->setAttrib('id', 'activity-edit-form');
 }
开发者ID:relyd,项目名称:aidstream,代码行数:32,代码来源:EditIatiActivity.php

示例7: edit

 public function edit($defaults = '', $account_id = '')
 {
     $form = array();
     $model = new Model_Wep();
     // Reporting organisation form
     $repOrg = new Form_Wep_ReportingOrganisation();
     $repOrg->load($defaults);
     $repOrg->removeDecorator('form');
     $this->addSubForm($repOrg, 'reporting_organisation');
     // Registry Info and Publishing Type form
     $registryInfoForm = new Form_General_RegistryInfo();
     $registryInfoForm->removeDecorator("form");
     $this->addSubForm($registryInfoForm, 'registry_info');
     // Default Field Values form
     $defValues = new Form_Wep_DefaultFieldValues();
     $defValues->load($defaults);
     $defValues->removeDecorator('form');
     $this->addSubForm($defValues, 'default_field_values');
     //Default Field Groups form
     $disGroup = new Form_Wep_DefaultFieldGroups();
     $disGroup->load($defaults);
     $disGroup->removeDecorator('form');
     $this->addSubForm($disGroup, 'default_field_groups');
     $signup = new Zend_Form_Element_Submit('Save');
     $signup->setValue('save')->setAttrib('class', 'form-submit');
     $this->addElement($signup);
     $this->setMethod('post');
 }
开发者ID:relyd,项目名称:aidstream,代码行数:28,代码来源:EditDefaults.php

示例8: init

 public function init()
 {
     //        $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('Supplier')->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'))));
     //
     //        $productionssupplier_types_id = new Zend_Form_Element_Multiselect('$productionssupplier_types_id');
     //        $productionssupplier_types_id->setLabel('productionssupplier 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('ADD')->setAttrib('id', 'submitbutton')->setDecorators(array(array('ViewScript', array('viewScript' => 'forms/_element_submit.phtml'))))->setAttrib('class', 'btn')->removeDecorator('label');
     $this->addElements(array($suppliers_id, $submit));
 }
开发者ID:roigrande,项目名称:globalpms,代码行数:32,代码来源:Productionssupplier.php

示例9: init

 function init()
 {
     // Set the method for the display form to POST
     $this->setMethod('post');
     $this->addAttribs(array('id' => 'addGroup', 'class' => ''));
     $this->setEnctype(Zend_Form::ENCTYPE_MULTIPART);
     $control = new Zend_Form_Element_Hidden('control');
     $control->setValue('addGroup');
     $this->addElement($control);
     // begin inputs
     $name = new Zend_Form_Element_Text('name');
     $name->setAttribs(array('class' => 'text validate[required] rightAdd', 'placeholder' => Zend_Registry::get('translate')->_('admin_category_name')));
     $name->setRequired(true);
     $this->addElement($name);
     // begin inputs
     $color = new Zend_Form_Element_Text('color');
     $color->setAttribs(array('class' => 'text validate[required] rightAdd', 'placeholder' => Zend_Registry::get('translate')->_('admin_color_for_charts')));
     $color->setRequired(true);
     $this->addElement($color);
     // begin inputs
     $type = new Zend_Form_Element_Select('type');
     $options = array('' => Zend_Registry::get('translate')->_('admin_category_select_type'), '0' => Zend_Registry::get('translate')->_('admin_expenses'), '1' => Zend_Registry::get('translate')->_('admin_income'));
     $type->setMultiOptions($options);
     $type->addValidator(new Zend_Validate_InArray(array_keys($options)));
     $type->setAttribs(array('class' => 'select', 'id' => 'type'));
     $type->setRequired(true);
     $this->addElement($type);
     $submit = new Zend_Form_Element_Submit('submit');
     $submit->setValue(Zend_Registry::get('translate')->_('admin_add'));
     $submit->setAttribs(array('class' => 'submit'));
     $submit->setIgnore(true);
     $this->addElement($submit);
 }
开发者ID:valizr,项目名称:MMA,代码行数:33,代码来源:Groups.php

示例10: init

 public function init()
 {
     $this->setName('transfer_target');
     $this->setAttrib('class', 'form-inline');
     $id = new Zend_Form_Element_Hidden('id');
     $id->addFilter('Int');
     $host2 = new Zend_Form_Element_Text('host2');
     $host2->setAttrib('class', 'form-control')->setLabel('host2');
     $host2->setDecorators(array('ViewHelper', 'Label', array(array('row' => 'HtmlTag'), array('tag' => 'div', 'class' => 'form-group col-md-3'))));
     $user2 = new Zend_Form_Element_Text('user2');
     $user2->setLabel('user2');
     $user2->setAttrib('class', 'form-control');
     $user2->setDecorators(array('ViewHelper', 'Description', 'Errors', 'Label', array(array('row' => 'HtmlTag'), array('tag' => 'div', 'class' => 'form-group col-md-3'))));
     $password2 = new Zend_Form_Element_Text('password2');
     $password2->setLabel('pass2');
     $password2->setAttrib('class', 'form-control');
     $password2->setDecorators(array('ViewHelper', 'Description', 'Errors', 'Label', array(array('row' => 'HtmlTag'), array('tag' => 'div', 'class' => 'form-group col-md-3'))));
     $submit = new Zend_Form_Element_Submit('submit');
     $submit->setLabel('Submit');
     $submit->setAttrib('class', 'btn btn-default');
     $submit->setValue('transfer_target');
     $submit->setDecorators(array('ViewHelper', 'Description', 'Errors', array(array('data' => 'HtmlTag'), array('tag' => 'div', 'colspan' => 2, 'align' => 'center')), array(array('row' => 'HtmlTag'), array('tag' => 'div', 'class' => 'form-group'))));
     $this->addElements(array($host2, $user2, $password2, $submit));
     $this->setDecorators(array('FormElements', 'Form'));
 }
开发者ID:graniasty,项目名称:imap_zend,代码行数:25,代码来源:SecondForm.php

示例11: editUserPassword

 function editUserPassword()
 {
     $this->setMethod('post');
     $this->addAttribs(array('id' => 'formAccountEditPassword', 'class' => ''));
     $filters = array(new Zend_Filter_StringTrim(), new Zend_Filter_StripTags());
     $control = new Zend_Form_Element_Hidden('control');
     $control->setValue('editPassword');
     $this->addElement($control);
     $oldPassword = new Zend_Form_Element_Password('oldPassword');
     $oldPassword->setLabel('Old password');
     $oldPassword->addValidator(new Zend_Validate_StringLength(6, 32));
     $oldPassword->setAttribs(array('class' => 'text validate[required,minSize[6],maxSize[32]] rightAdd', 'minlenght' => '6', 'maxlenght' => '32', 'autocomplete' => 'off', 'oncontextmenu' => 'return false', 'data-prompt-position' => 'topLeft:0'));
     $oldPassword->setRequired(true);
     $this->addElement($oldPassword);
     $password = new Zend_Form_Element_Password('password');
     $password->setLabel(Zend_Registry::get('translate')->_('admin_administrators_new_password'));
     $password->addValidator(new Zend_Validate_StringLength(6, 32));
     $password->setAttribs(array('class' => 'text validate[required] rightAdd', 'maxlenght' => '32', 'autocomplete' => 'off', 'oncontextmenu' => 'return false', 'ondrop' => 'return false', 'onpaste' => 'return false'));
     $password->setRequired(true);
     $this->addElement($password);
     $retypePassword = new Zend_Form_Element_Password('retypePassword');
     $retypePassword->setLabel(Zend_Registry::get('translate')->_('admin_administrators_retype_new_password'));
     $retypePassword->addValidator(new Zend_Validate_Identical('password'));
     $retypePassword->addValidator(new Zend_Validate_StringLength(6, 32));
     $retypePassword->setAttribs(array('class' => 'text validate[required] rightAdd', 'maxlenght' => '32', 'autocomplete' => 'off', 'oncontextmenu' => 'return false', 'ondrop' => 'return false', 'onpaste' => 'return false'));
     $retypePassword->setRequired(true);
     $retypePassword->setIgnore(true);
     $this->addElement($retypePassword);
     $submit = new Zend_Form_Element_Submit('savePassword');
     $submit->setValue(Zend_Registry::get('translate')->_('apply_password'));
     $submit->setAttribs(array('class' => 'submit tsSubmitLogin fL'));
     $submit->setIgnore(true);
     $this->addElement($submit);
     $this->setElementFilters($filters);
 }
开发者ID:valizr,项目名称:MMA,代码行数:35,代码来源:EditPassword.php

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

示例13: init

 public function init()
 {
     $this->setMethod('POST');
     $this->setName('guestForm');
     $element = new Zend_Form_Element_Text('name');
     $element->setLabel('怎么称呼您');
     $element->setDescription('必填,中英文都可,2到30个字');
     $element->setRequired(true);
     $this->addElement($element);
     $element = new Zend_Form_Element_Text('email');
     $element->setLabel('您的Email');
     $element->setRequired(true);
     $element->addValidator(new Zend_Validate_EmailAddress());
     $element->addValidator('NotEmpty');
     $element->setDescription('必填');
     $this->addElement($element);
     $element = new Zend_Form_Element_Textarea('body');
     $element->setLabel('您的留言');
     $element->setAttrib('rows', 4);
     $element->addValidator('NotEmpty');
     $this->addElement($element);
     $element = new Elements();
     $element->addReCaptcha($this);
     $element = new Zend_Form_Element_Submit('post');
     $element->setValue('提交')->removeDecorator('Label');
     $this->addElement($element);
 }
开发者ID:BGCX262,项目名称:zufangzi-svn-to-git,代码行数:27,代码来源:GuestBook.php

示例14: init

 public function init()
 {
     $this->setName('contact');
     $id = new Zend_Form_Element_Hidden('id');
     $id->addFilter('Int');
     $id->removeDecorator('label');
     //
     //        $company_id = new Zend_Form_Element_Hidden('company_id');
     //        $company_id->addFilter('Int');
     //        $company_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'))));
     $email = new Zend_Form_Element_Text('email');
     $email->setLabel('Email')->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'))));
     $telephone = new Zend_Form_Element_Text('telephone');
     $telephone->setLabel('Telephone')->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'))));
     $status = new Zend_Form_Element_Text('status');
     $status->setLabel('Status')->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'))));
     $direction = new Zend_Form_Element_Text('direction');
     $direction->setLabel('Direction')->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, $email, $telephone, $direction, $status, $submit));
 }
开发者ID:roigrande,项目名称:globalpms,代码行数:25,代码来源:Contact.php

示例15: init

 public function init()
 {
     $this->setAction('/api');
     $file = new Zend_Form_Element_File('uploadFile');
     $submit = new Zend_Form_Element_Submit('submit');
     $submit->setValue('Upload');
     $this->addElements(array($file, $submit));
 }
开发者ID:justinwoods,项目名称:Doxabox-Monitor-Web,代码行数:8,代码来源:Upload.php


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