• 设为首页
  • 点击收藏
  • 手机版
    手机扫一扫访问
    迪恩网络手机版
  • 关注官方公众号
    微信扫一扫关注
    迪恩网络公众号

PHP Zend_Form_Element_Textarea类代码示例

原作者: [db:作者] 来自: [db:来源] 收藏 邀请

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



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

示例1: init

 public function init()
 {
     global $mySession;
     $db = new Db();
     $ConfigData = $db->runQuery("select * from " . ADMINISTRATOR . " where admin_id='1'");
     $SiteTitle = $ConfigData[0]['site_title'];
     $MetaDescription = $ConfigData[0]['site_description'];
     $MetaKeyword = $ConfigData[0]['site_keyword'];
     $AdminEmail = $ConfigData[0]['admin_email'];
     $PaypalEmail = $ConfigData[0]['paypal_email'];
     $welcomemessageC = $ConfigData[0]['welcomemessage'];
     $admin_name_value = $ConfigData[0]['admin_fullname'];
     $site_title = new Zend_Form_Element_Text('site_title');
     $site_title->setRequired(true)->addValidator('NotEmpty', true, array('messages' => 'Site title is required.'))->addDecorator('Errors', array('class' => 'error'))->setAttrib("class", "mws-textinput required")->setValue($SiteTitle);
     $admin_name = new Zend_Form_Element_Text('admin_name');
     $admin_name->setRequired(true)->addValidator('NotEmpty', true, array('messages' => 'Admin name is required.'))->addDecorator('Errors', array('class' => 'error'))->setAttrib("class", "mws-textinput required")->setValue($admin_name_value);
     $site_description = new Zend_Form_Element_Text('site_description');
     $site_description->setRequired(true)->addValidator('NotEmpty', true, array('messages' => 'Site description is required.'))->addDecorator('Errors', array('class' => 'error'))->setAttrib("class", "mws-textinput required")->setValue($MetaDescription);
     $site_keyword = new Zend_Form_Element_Text('site_keyword');
     $site_keyword->setRequired(true)->addValidator('NotEmpty', true, array('messages' => 'Site keyword is required.'))->addDecorator('Errors', array('class' => 'error'))->setAttrib("class", "mws-textinput required")->setValue($MetaKeyword);
     $admin_email = new Zend_Form_Element_Text('admin_email');
     $admin_email->setRequired(true)->addValidator('NotEmpty', true, array('messages' => 'Administrator email is required.'))->addDecorator('Errors', array('class' => 'error'))->setAttrib("class", "mws-textinput required email")->setValue($AdminEmail);
     $paypal_email = new Zend_Form_Element_Text('paypal_email');
     $paypal_email->setRequired(true)->addValidator('NotEmpty', true, array('messages' => 'Paypal email address is required.'))->addDecorator('Errors', array('class' => 'error'))->setAttrib("class", "mws-textinput required email")->setValue($PaypalEmail);
     /*$currency_symbol= new Zend_Form_Element_Text('currency_symbol');
     		$currency_symbol->setRequired(true)
     		->addValidator('NotEmpty',true,array('messages' =>'Currency symbol is required.'))
     		->addDecorator('Errors', array('class'=>'error'))
     		->setAttrib("class","required")
     		->setValue($CurrencySymbol);*/
     $welcomemessage = new Zend_Form_Element_Textarea('welcomemessage');
     $welcomemessage->setAttrib("id", "elrte")->setAttrib("cols", "auto")->setAttrib("rows", "auto")->setValue($welcomemessageC);
     $this->addElements(array($site_title, $admin_name, $site_description, $site_keyword, $admin_email, $paypal_email, $welcomemessage));
 }
开发者ID:ankuradhey,项目名称:dealtrip,代码行数:34,代码来源:Configuration.php


示例2: init

 public function init()
 {
     $this->setMethod('post');
     $this->setAttrib('id', 'formid');
     $this->setAttrib('name', 'holidaygroups');
     $id = new Zend_Form_Element_Hidden('id');
     $holidayname = new Zend_Form_Element_Text('holidayname');
     $holidayname->setAttrib('maxLength', 20);
     $holidayname->addFilter(new Zend_Filter_StringTrim());
     $holidayname->setRequired(true);
     $holidayname->addValidator('NotEmpty', false, array('messages' => 'Please enter holiday.'));
     $holidayname->addValidator("regex", true, array('pattern' => '/^[a-zA-Z0-9.\\- ?]+$/', 'messages' => array('regexNotMatch' => 'Please enter valid holiday.')));
     $groupid = new Zend_Form_Element_Multiselect('groupid');
     $groupid->setAttrib('class', 'selectoption');
     $groupid->setRegisterInArrayValidator(false);
     $groupid->setRequired(true);
     $groupid->addValidator('NotEmpty', false, array('messages' => 'Please select holiday group.'));
     $holiday_date = new ZendX_JQuery_Form_Element_DatePicker('holidaydate');
     $holiday_date->setAttrib('readonly', 'true');
     $holiday_date->setAttrib('onfocus', 'this.blur()');
     $holiday_date->setOptions(array('class' => 'brdr_none'));
     $holiday_date->setRequired(true);
     $holiday_date->addValidator('NotEmpty', false, array('messages' => 'Please select date.'));
     $description = new Zend_Form_Element_Textarea('description');
     $description->setAttrib('rows', 10);
     $description->setAttrib('cols', 50);
     $description->setAttrib('maxlength', '200');
     $submit = new Zend_Form_Element_Submit('submit');
     $submit->setAttrib('id', 'submitbutton');
     $submit->setLabel('Save');
     $this->addElements(array($id, $holidayname, $groupid, $holiday_date, $description, $submit));
     $this->setElementDecorators(array('ViewHelper'));
     $this->setElementDecorators(array('UiWidgetElement'), array('holidaydate'));
 }
开发者ID:uskumar33,项目名称:DeltaONE,代码行数:34,代码来源:holidaydates.php


示例3: init

 public function init()
 {
     $this->setMethod('post');
     $this->setAttrib('action', BASE_URL . 'payfrequency/edit');
     $this->setAttrib('id', 'formid');
     $this->setAttrib('name', 'payfrequency');
     $id = new Zend_Form_Element_Hidden('id');
     $freqtype = new Zend_Form_Element_Text('freqtype');
     $freqtype->setAttrib('maxLength', 20);
     $freqtype->setLabel("Pay Frequency");
     $freqtype->setRequired(true);
     $freqtype->addValidator('NotEmpty', false, array('messages' => 'Please enter pay frequency type.'));
     $freqtype->addValidator("regex", true, array('pattern' => '/^(?=.*[a-zA-Z])([^ ][a-zA-Z0-9 ]*)$/', 'messages' => array('regexNotMatch' => 'Please enter valid pay frequency type.')));
     $freqtype->addValidator(new Zend_Validate_Db_NoRecordExists(array('table' => 'main_payfrequency', 'field' => 'freqtype', 'exclude' => 'id!="' . Zend_Controller_Front::getInstance()->getRequest()->getParam('id') . '" and isactive=1')));
     $freqtype->getValidator('Db_NoRecordExists')->setMessage('Pay frequency type already exists.');
     $freqshortcode = new Zend_Form_Element_Text('freqcode');
     $freqshortcode->setLabel("Short Code");
     $freqshortcode->setAttrib('maxLength', 20);
     $freqshortcode->addValidator("regex", true, array('pattern' => '/^[a-zA-Z][a-zA-Z0-9]*$/', 'messages' => array('regexNotMatch' => 'Please enter valid pay frequency short code.')));
     $freqshortcode->addValidator(new Zend_Validate_Db_NoRecordExists(array('table' => 'main_payfrequency', 'field' => 'freqcode', 'exclude' => 'id!="' . Zend_Controller_Front::getInstance()->getRequest()->getParam('id') . '" and isactive=1')));
     $freqshortcode->getValidator('Db_NoRecordExists')->setMessage('Pay frequency short code already exists.');
     $description = new Zend_Form_Element_Textarea('freqdescription');
     $description->setAttrib('rows', 10);
     $description->setAttrib('cols', 50);
     $description->setAttrib('maxlength', '200');
     $submit = new Zend_Form_Element_Submit('submit');
     $submit->setAttrib('id', 'submitbutton');
     $submit->setLabel('Save');
     $this->addElements(array($id, $freqtype, $freqshortcode, $description, $submit));
     $this->setElementDecorators(array('ViewHelper'));
 }
开发者ID:rajbrt,项目名称:sentrifugo,代码行数:31,代码来源:payfrequency.php


示例4: setForm

		function setForm()
		{
			$form = new Zend_Form;
			$form->setMethod('post')->setAction('');
			//$this->setAttrib('enctype','multipart/form-data');
			
			$file = new Zend_Form_Element_File('video_file');
			//$file->setAttrib('class','file');
			$file->setLabel('video_file');
           	$file->setRequired(true);
           	
			$video_title = new Zend_Form_Element_Text('video_title');
			$video_title ->setRequired(true)->addValidator('NotEmpty',true,array('messages'=>'Tiêu đề không được để trống'));
			
			$video_thumbnail=new Zend_Form_Element_Textarea('video_thumbnail');
			$video_thumbnail->removeDecorator('HtmlTag')->removeDecorator('Label');
			
			$video_description = new Zend_Form_Element_Textarea('video_description');
			$video_description->setAttrib('rows','7');
			$video_description ->setRequired(true)->addValidator('NotEmpty',true,array('messages'=>'Mô tả không được để trống'));
			
			$is_active = new Zend_Form_Element_Radio('is_active');
			$is_active->setRequired(true)
					->setLabel('is_active')
					->setMultiOptions(array("1" => "Có","0" => "Không"));
			
			$file->removeDecorator('HtmlTag')->removeDecorator('Label');	
			$video_title->removeDecorator('HtmlTag')->removeDecorator('Label');	
			$video_description->removeDecorator('HtmlTag')->removeDecorator('Label');
			$is_active->removeDecorator('HtmlTag')->removeDecorator('Label');		
			
			$form->addElements(array($file,$video_title,$video_description,$is_active,$video_thumbnail));
			return $form;
		}
开发者ID:hungnv0789,项目名称:vhtm,代码行数:34,代码来源:VideoController.php


示例5: init

 public function init()
 {
     //        if (!$this->hasTranslator()) {
     //            $this->setTranslator(Zend_Registry::get('Zend_Translate'));
     //        }
     $userid = new Zend_Form_Element_Hidden('UserID');
     $userid->setDecorators(array(array('ViewHelper', array('helper' => 'formHidden'))));
     $username = new Zend_Form_Element_Text('Username');
     $username->setOptions(array('label' => 'Username', 'required' => TRUE))->setDecorators(array(array('ViewHelper', array('helper' => 'formText')), array('Label', array('class' => 'label'))));
     $birthday = new Zend_Form_Element_Text('Birthday');
     $birthday->setOptions(array('label' => 'Birthday', 'required' => TRUE))->setDecorators(array(array('ViewHelper', array('helper' => 'formText')), array('Label', array('class' => 'label'))));
     $role = new Zend_Form_Element_Select('Role');
     $role->setOptions(array('label' => 'User Type', 'MultiOptions' => array(3 => 'User', 2 => 'IT', 1 => 'Admin', 0 => 'SuperAdmin')))->setDecorators(array(array('ViewHelper', array('helper' => 'formSelect')), array('Label', array('class' => 'label'))));
     $fullname = new Zend_Form_Element_Text('FullName');
     $fullname->setOptions(array('label' => 'FullName'))->setDecorators(array(array('ViewHelper', array('helper' => 'formText')), array('Label', array('class' => 'label'))));
     $email = new Zend_Form_Element_Text('Email');
     $email->setOptions(array('label' => 'Email', 'required' => TRUE))->setDecorators(array(array('ViewHelper', array('helper' => 'formText')), array('Label', array('class' => 'label'))));
     $group = new Zend_Form_Element_Text('Group');
     $group->setOptions(array('label' => 'Group'))->setDecorators(array(array('ViewHelper', array('helper' => 'formText')), array('Label', array('class' => 'label'))));
     $phone = new Zend_Form_Element_Text('Phone');
     $phone->setOptions(array('label' => 'Phone'))->setDecorators(array(array('ViewHelper', array('helper' => 'formText')), array('Label', array('class' => 'label'))));
     $address = new Zend_Form_Element_Textarea('Address');
     $address->setOptions(array('label' => 'Address', 'style' => "width: 200px; height: 150px"))->setDecorators(array(array('ViewHelper', array('helper' => 'formTextarea')), array('Label', array('class' => 'label'))));
     $this->setName('user-form')->setMethod(Zend_Form::METHOD_POST)->setEnctype(Zend_Form::ENCTYPE_URLENCODED)->addElements(array($userid, $username, $role, $fullname, $email, $birthday, $group, $phone, $address))->setDecorators(array('FormElements', array('HtmlTag', array('tag' => 'fieldset', 'style' => "padding: 0; border: 0; margin-top: 25px;")), 'Form'));
 }
开发者ID:laiello,项目名称:mock-project,代码行数:25,代码来源:User.php


示例6: init

 public function init()
 {
     $this->setName(strtolower(get_class()));
     $this->setMethod("post");
     $oFormName = new Zend_Form_Element_Hidden("form_name");
     $oFormName->setValue(get_class());
     $oFormName->setIgnore(FALSE)->removeDecorator("Label");
     $this->addElement($oFormName);
     $oMessage = new Zend_Form_Element_Textarea("message");
     $oMessage->setFilters($this->_aFilters);
     $oMessage->setRequired(FALSE);
     $oMessage->removeDecorator("label");
     $this->addElement($oMessage);
     $oIsDing = new Zend_Form_Element_Checkbox("is_ding");
     $oIsDing->setLabel("Włącz dźwięk");
     $oIsDing->setValue(1);
     $this->addElement($oIsDing);
     $oSubmit = new Zend_Form_Element_Submit("send_message");
     $oSubmit->setLabel("Wyślij wiadomość");
     $this->addElement($oSubmit);
     $oViewScript = new Zend_Form_Decorator_ViewScript();
     $oViewScript->setViewModule("admin");
     $oViewScript->setViewScript("_forms/chat.phtml");
     $this->clearDecorators();
     $this->setDecorators(array(array($oViewScript)));
     $oElements = $this->getElements();
     foreach ($oElements as $oElement) {
         $oElement->setFilters($this->_aFilters);
         $oElement->removeDecorator("Errors");
     }
 }
开发者ID:lstaszak,项目名称:zf_zk_aleph,代码行数:31,代码来源:Chat.php


示例7: __construct

 public function __construct($options = null)
 {
     parent::__construct($options);
     $this->setAttrib('accept-charset', 'UTF-8');
     $this->setName('safcontrollers');
     $id = new Zend_Form_Element_Hidden('id');
     $hash = new Zend_Form_Element_Hash('no_csrf_foo', array('salt' => '4s564evzaSD64sf'));
     $submit = new Zend_Form_Element_Submit('submit');
     $submit->setAttrib('id', 'submitbutton');
     $label = new Zend_Form_Element_Text('label');
     $label->setLabel('label');
     $name = new Zend_Form_Element_Text('name');
     $name->setLabel('name');
     $image = new Zend_Form_Element_Textarea('image');
     $image->setLabel('image');
     $description = new Zend_Form_Element_Textarea('description');
     $description->setLabel('description');
     $safmodulesId = new Zend_Form_Element_Select('safmodules_id');
     $options = new Safmodules();
     $safmodulesId->addMultiOption('', '----------');
     foreach ($options->fetchAlltoFlatArray() as $k => $v) {
         $safmodulesId->addMultiOption($k, $v['mlabel']);
     }
     $safmodulesId->setLabel('safmodules_id');
     $this->addElements(array($id, $hash, $label, $name, $image, $description, $safmodulesId));
     $this->addElements(array($submit));
 }
开发者ID:Cryde,项目名称:sydney-core,代码行数:27,代码来源:SafcontrollersForm.php


示例8: init

 public function init()
 {
     $this->setMethod('post');
     $this->setAttrib('action', DOMAIN . 'employmentstatus/edit');
     $this->setAttrib('id', 'formid');
     $this->setAttrib('name', 'employmentstatus');
     $id = new Zend_Form_Element_Hidden('id');
     $workcode = new Zend_Form_Element_Text('workcode');
     $workcode->setAttrib('maxLength', 20);
     $workcode->setRequired(true);
     $workcode->addValidator('NotEmpty', false, array('messages' => 'Please enter work short code.'));
     $workcode->addValidator("regex", true, array('pattern' => '/^(?=.*[a-zA-Z])([^ ][a-zA-Z0-9 ]*)$/', 'messages' => array('regexNotMatch' => 'Please enter valid work short code.')));
     $workcodename = new Zend_Form_Element_Select('workcodename');
     $workcodename->setAttrib('class', 'selectoption');
     $workcodename->setRegisterInArrayValidator(false);
     $workcodename->setRequired(true);
     $workcodename->addValidator('NotEmpty', false, array('messages' => 'Please select work code.'));
     $description = new Zend_Form_Element_Textarea('description');
     $description->setAttrib('rows', 10);
     $description->setAttrib('cols', 50);
     $description->setAttrib('maxlength', '200');
     $submit = new Zend_Form_Element_Submit('submit');
     $submit->setAttrib('id', 'submitbutton');
     $submit->setLabel('Save');
     $this->addElements(array($id, $workcode, $workcodename, $description, $submit));
     $this->setElementDecorators(array('ViewHelper'));
 }
开发者ID:uskumar33,项目名称:DeltaONE,代码行数:27,代码来源:employmentstatus.php


示例9: init

 public function init()
 {
     $this->setMethod('post');
     $this->setAttrib('action', BASE_URL . 'veteranstatus/edit');
     $this->setAttrib('id', 'formid');
     $this->setAttrib('name', 'veteranstatus');
     $id = new Zend_Form_Element_Hidden('id');
     $veteranstatus = new Zend_Form_Element_Text('veteranstatus');
     $veteranstatus->setAttrib('maxLength', 20);
     $veteranstatus->setRequired(true);
     $veteranstatus->addValidator('NotEmpty', false, array('messages' => 'Please enter veteran status.'));
     $veteranstatus->addValidators(array(array('validator' => 'Regex', 'breakChainOnFailure' => true, 'options' => array('pattern' => '/^(?=.*[a-zA-Z])([^ ][a-zA-Z\\s]*)$/', 'messages' => array('regexNotMatch' => 'Please enter valid veteran status.')))));
     $veteranstatus->addValidator(new Zend_Validate_Db_NoRecordExists(array('table' => 'main_veteranstatus', 'field' => 'veteranstatus', 'exclude' => 'id!="' . Zend_Controller_Front::getInstance()->getRequest()->getParam('id') . '" and isactive=1')));
     $veteranstatus->getValidator('Db_NoRecordExists')->setMessage('Veteran status already exists.');
     $description = new Zend_Form_Element_Textarea('description');
     $description->setAttrib('rows', 10);
     $description->setAttrib('cols', 50);
     $description->setAttrib('maxlength', '200');
     $submit = new Zend_Form_Element_Submit('submit');
     $submit->setAttrib('id', 'submitbutton');
     $submit->setLabel('Save');
     $url = "'gender/saveupdate/format/json'";
     $dialogMsg = "''";
     $toggleDivId = "''";
     $jsFunction = "'redirecttocontroller(\\'gender\\');'";
     $this->addElements(array($id, $veteranstatus, $description, $submit));
     $this->setElementDecorators(array('ViewHelper'));
 }
开发者ID:rajbrt,项目名称:sentrifugo,代码行数:28,代码来源:veteranstatus.php


示例10: __construct

 public function __construct($options = null)
 {
     parent::__construct($options);
     $this->setName('WhatIDoForm');
     // image, uploader
     $image = new Zend_Form_Element_File('Image');
     $image->setLabel('Image:')->setDestination('img/profile')->addValidator('Count', false, 1)->addValidator('Size', false, 10000000)->addValidator('Extension', false, 'jpg,png,gif')->addFilter('Rename', 'WhatIDo.jpg');
     // PictureCaption, string
     $pictureCaption = new Zend_Form_Element_Textarea('PictureCaption');
     $pictureCaption->setLabel('Picture caption:')->setRequired();
     // MainText, string
     $mainText = new Zend_Form_Element_Textarea('MainText');
     $mainText->setLabel('Main text:')->setRequired();
     // FooterText, string
     $footerText = new Zend_Form_Element_Textarea('FooterText');
     $footerText->setLabel('Footer text:')->setRequired();
     // LinkText, string
     $linkText = new Zend_Form_Element_Text('LinkText');
     $linkText->setLabel('Link text:')->setRequired();
     // LinkUrl, string
     $linkUrl = new Zend_Form_Element_Text('LinkUrl');
     $linkUrl->setLabel('Link Url:')->setRequired();
     // Submit button
     $submit = new Zend_Form_Element_Submit('Submit');
     $submit->setLabel('Submit');
     $this->addElements(array($image, $pictureCaption, $mainText, $footerText, $linkText, $linkUrl, $submit));
 }
开发者ID:Ewaldaz,项目名称:Be-your-light,代码行数:27,代码来源:WhatIDoForm.php


示例11: init

 public function init()
 {
     $this->setMethod('post');
     $this->setAttrib('action', DOMAIN . 'workeligibilitydoctypes/edit');
     $this->setAttrib('id', 'formid');
     $this->setAttrib('name', 'workeligibilitydoctypes');
     $id = new Zend_Form_Element_Hidden('id');
     $documenttype = new Zend_Form_Element_Text('documenttype');
     $documenttype->setAttrib('maxLength', 50);
     $documenttype->setRequired(true);
     $documenttype->addValidator('NotEmpty', false, array('messages' => 'Please enter document type.'));
     $documenttype->addValidator("regex", true, array('pattern' => '/^(?=.*[a-zA-Z])([^ ][a-zA-Z0-9\\-\\s]*)$/', 'messages' => array('regexNotMatch' => 'Please enter valid document type.')));
     $documenttype->addValidator(new Zend_Validate_Db_NoRecordExists(array('table' => 'main_workeligibilitydoctypes', 'field' => 'documenttype', 'exclude' => 'id!="' . Zend_Controller_Front::getInstance()->getRequest()->getParam('id') . '" and isactive=1')));
     $documenttype->getValidator('Db_NoRecordExists')->setMessage('Document type already exists.');
     $issuingauthority = new Zend_Form_Element_Select('issuingauthority');
     $issuingauthority->setRegisterInArrayValidator(false);
     $issuingauthority->setMultiOptions(array('' => 'Select issuing authority', '1' => 'Country', '2' => 'State', '3' => 'City'));
     $issuingauthority->setRequired(true);
     $issuingauthority->addValidator('NotEmpty', false, array('messages' => 'Please select issuing authority.'));
     $description = new Zend_Form_Element_Textarea('description');
     $description->setAttrib('rows', 10);
     $description->setAttrib('cols', 50);
     $description->setAttrib('maxlength', '200');
     $submit = new Zend_Form_Element_Submit('submit');
     $submit->setAttrib('id', 'submitbutton');
     $submit->setLabel('Save');
     $this->addElements(array($id, $documenttype, $issuingauthority, $description, $submit));
     $this->setElementDecorators(array('ViewHelper'));
 }
开发者ID:uskumar33,项目名称:DeltaONE,代码行数:29,代码来源:workeligibilitydoctypes.php


示例12: __construct

 public function __construct($options = null)
 {
     parent::__construct($options);
     parent::__construct();
     $account_id = new Zend_Form_Element_Hidden('accountId');
     $product_id = new Zend_Form_Element_Hidden('productId');
     $newStatus = new Zend_Form_Element_Select('newStatus');
     $newStatus->setAttrib('class', 'NormalBtn');
     $newStatus->setRequired(true);
     $newStatus->addMultiOption('', 'Select...');
     $description = new Zend_Form_Element_Textarea('description');
     $description->setAttrib('class', 'textfield');
     $description->setAttrib('rows', '2');
     $description->setAttrib('cols', '20');
     $description->setRequired(true);
     $newStatus1 = new Zend_Form_Element_Hidden('newStatus1');
     $description1 = new Zend_Form_Element_Hidden('description1');
     $submit = new Zend_Form_Element_Submit('Submit');
     $submit->setLabel('submit');
     $submit->setAttrib('class', 'recurring');
     $Confirm = new Zend_Form_Element_Submit('Confirm');
     $Confirm->setLabel('Confirm');
     $Confirm->setAttrib('class', 'recurring');
     $this->addElements(array($submit, $description, $newStatus, $account_id, $product_id, $Confirm, $newStatus1, $description1));
 }
开发者ID:maniargaurav,项目名称:OurBank,代码行数:25,代码来源:recurringstatus.php


示例13: init

 public function init()
 {
     $this->setAction(URL_BASE . '/action');
     $tr = Zend_Registry::get('tr');
     $name = new Zend_Form_Element_Text('name');
     $name->setLabel($tr->_('NAME'));
     $name->setRequired(true);
     $name->addValidator('NotEmpty', true, array('messages' => $tr->_('GENERAL_MISSING_TEXT_VALUE')));
     $this->addElement($name);
     $enabled = new Zend_Form_Element_Checkbox('enabled');
     $enabled->setLabel($tr->_('IS_ACTION_ENABLED'));
     $this->addElement($enabled);
     $public = new Zend_Form_Element_Checkbox('public');
     $public->setLabel($tr->_('IS_ACTION_PUBLIC'));
     $this->addElement($public);
     $route = new Zend_Form_Element_Text('route');
     $route->setLabel($tr->_('CUSTOM_ROUTE'));
     $route->setRequired(true);
     $route->addValidator('NotEmpty', true, array('messages' => $tr->_('GENERAL_MISSING_TEXT_VALUE')));
     $this->addElement($route);
     $desc = new Zend_Form_Element_Textarea('description');
     $desc->cols = 35;
     $desc->rows = 15;
     $desc->setLabel($tr->_('DESCRIPTION'));
     $desc->setRequired(false);
     $this->addElement($desc);
     parent::init();
 }
开发者ID:rogeriopradoj,项目名称:frapi-without-vhost,代码行数:28,代码来源:Action.php


示例14: init

 public function init()
 {
     $name = new Zend_Form_Element_Text('name');
     $name->setLabel('Name');
     $name->setRequired(true);
     $this->addElement($name);
     $enabled = new Zend_Form_Element_Checkbox('enabled');
     $enabled->setLabel('Is the action enabled ?');
     $this->addElement($enabled);
     $public = new Zend_Form_Element_Checkbox('public');
     $public->setLabel('Is the action public ?');
     $this->addElement($public);
     $use_custom_route = new Zend_Form_Element_Checkbox('use_custom_route');
     $use_custom_route->setLabel('Custom Route');
     $this->addElement($use_custom_route);
     $custom_route = new Zend_Form_Element_Text('route');
     //$custom_route->setLabel('Custom Route');
     $this->addElement($custom_route);
     $desc = new Zend_Form_Element_Textarea('description');
     $desc->cols = 40;
     $desc->rows = 15;
     $desc->setLabel('Description');
     $desc->setRequired(false);
     $this->addElement($desc);
     parent::init();
 }
开发者ID:jeremykendall,项目名称:spaz-api,代码行数:26,代码来源:Action.php


示例15: __construct

 public function __construct()
 {
     $transactionType = new Zend_Form_Element_Select('transactionType');
     $transactionType->setAttrib('class', 'NormalBtn');
     $transactionType->setRequired(true)->addValidators(array(array('NotEmpty')));
     $transactionMode = new Zend_Form_Element_Select('transactionMode');
     $transactionMode->setAttrib('class', 'NormalBtn');
     $transactionMode->setRequired(true);
     //                                 ->addValidators(array(array('NotEmpty')));
     $transactionMode->setAttrib('onchange', 'display(this.value);');
     $transaction_interest_amount = new Zend_Form_Element_Text('transaction_interest_amount');
     $transaction_interest_amount->setAttrib('class', 'NormalBtn');
     $transaction_fine_amount = new Zend_Form_Element_Text('transaction_fine_amount');
     $transaction_fine_amount->setAttrib('class', 'NormalBtn');
     $account_id = new Zend_Form_Element_Text('account_id');
     $account_id->setAttrib('class', 'NormalBtn');
     $transaction_date = new Zend_Form_Element_Text('transaction_date');
     $transaction_date->setAttrib('class', 'NormalBtn');
     $transaction_date->setRequired(true)->addValidators(array(array('NotEmpty')));
     $transaction_date->setRequired(true)->addValidator(new Zend_Validate_Date('YYYY-MM-DD'), true, array('messages' => array(Zend_Validate_Date::FALSEFORMAT => 'Enter the valid date')));
     $transaction_amount = new Zend_Form_Element_Text('transaction_amount');
     $transaction_amount->setAttrib('class', 'NormalBtn');
     $transaction_remarks = new Zend_Form_Element_Textarea('transaction_remarks', array('rows' => 3, 'cols' => 15));
     $transaction_remarks->setAttrib('class', 'NormalBtn');
     $transaction_remarks->setRequired(true)->addValidators(array(array('NotEmpty')));
     $submit = new Zend_Form_Element_Submit('submit');
     $submit->setAttrib('id', 'submit');
     $submit->setAttrib('class', 'NormalBtn');
     $submit->setLabel('submit');
     $this->addElements(array($transactionType, $transactionMode, $transaction_interest_amount, $transaction_fine_amount, $account_id, $transaction_date, $transaction_amount, $transaction_remarks, $submit));
 }
开发者ID:maniargaurav,项目名称:OurBank,代码行数:31,代码来源:Altertransaction.php


示例16: init

 public function init()
 {
     $this->setName('f2')->setAttrib('enctype', 'multipart/form-data')->setMethod('post');
     $this->addElement('Hidden', 'search', array('value' => 1));
     $tieu_de = new Zend_Form_Element_Text('tieu_de');
     $tieu_de->setLabel('Tiêu đề (*)')->setRequired(true)->addFilter('StripTags')->addFilter('StringTrim')->addValidator('NotEmpty')->setDecorators(array('ViewHelper', 'Errors', array(array('data' => 'HtmlTag'), array('tag' => 'td', 'style' => 'width: 85%')), array('Label', array('tag' => 'td')), array(array('row' => 'HtmlTag'), array('tag' => 'tr'))))->setAttrib('class', 'text-input large-input');
     $quan_trong = new Zend_Form_Element_Select('quan_trong');
     $quan_trong->setLabel('Quan Trọng')->setRequired(true)->setValue(0)->addMultiOptions(array(0 => 'Không', 1 => 'Có'))->setDecorators(array('ViewHelper', 'Errors', array(array('data' => 'HtmlTag'), array('tag' => 'td')), array('Label', array('tag' => 'td')), array(array('row' => 'HtmlTag'), array('tag' => 'tr'))));
     $noi_bat = new Zend_Form_Element_Select('noi_bat');
     $noi_bat->setLabel('Nổi Bật')->setRequired(true)->setValue(0)->addMultiOptions(array(0 => 'Không', 1 => 'Có'))->setDecorators(array('ViewHelper', 'Errors', array(array('data' => 'HtmlTag'), array('tag' => 'td')), array('Label', array('tag' => 'td')), array(array('row' => 'HtmlTag'), array('tag' => 'tr'))));
     $photo = new Zend_Form_Element_File('photo');
     $photo->setLabel('Upload hình')->setDescription('(*.jgp, *.gif, *.png , < 10MB )')->setDestination(BASE_PATH . '/upload/files/tin_tuc')->addValidator(new Zend_Validate_File_Extension(array('jpg,gif,png')))->addValidator(new Zend_Validate_File_FilesSize(array('min' => 1, 'max' => 10485760, 'bytestring' => true)))->setDecorators(array('File', 'Errors', array('Description', array('escape' => false, 'tag' => 'div', 'placement' => 'append')), array('HtmlTag', array('tag' => 'td')), array('Label', array('tag' => 'td')), array(array('row' => 'HtmlTag'), array('tag' => 'tr'))));
     $image = new Zend_Form_Element_Image('image');
     $image->setLabel('')->setDecorators(array('ViewHelper', 'Errors', array(array('data' => 'HtmlTag'), array('tag' => 'td')), array('Label', array('tag' => 'td')), array(array('row' => 'HtmlTag'), array('tag' => 'tr'))));
     $statusOptions = array("multiOptions" => Default_Model_Constraints::trang_thai());
     $trang_thai = new Zend_Form_Element_Radio('trang_thai', $statusOptions);
     $trang_thai->setRequired(true)->setLabel('Trạng thái')->setValue('1')->setSeparator('')->setDecorators(array('ViewHelper', 'Errors', array(array('data' => 'HtmlTag'), array('tag' => 'td')), array('Label', array('tag' => 'td')), array(array('row' => 'HtmlTag'), array('tag' => 'tr'))));
     $mo_ta_tom_tat = new Zend_Form_Element_Textarea('mo_ta_tom_tat');
     $mo_ta_tom_tat->setLabel('Mô tả tóm tắt')->addFilter('StripTags')->addFilter('StringTrim')->setDecorators(array('ViewHelper', 'Errors', array(array('data' => 'HtmlTag'), array('tag' => 'td')), array('Label', array('tag' => 'td')), array(array('row' => 'HtmlTag'), array('tag' => 'tr'))))->setAttribs(array('id' => 'mo_ta_tom_tat', 'class' => 'textarea', 'rows' => '4'));
     $mo_ta_chi_tiet = new Zend_Form_Element_Textarea('mo_ta_chi_tiet');
     $mo_ta_chi_tiet->setLabel('Mô tả chi tiết (*)')->setRequired(true)->addValidator('NotEmpty')->setDecorators(array('ViewHelper', 'Errors', array(array('data' => 'HtmlTag'), array('tag' => 'td')), array('Label', array('tag' => 'td')), array(array('row' => 'HtmlTag'), array('tag' => 'tr'))))->setAttribs(array('id' => 'mo_ta_chi_tiet', 'class' => 'text-input textarea'));
     $pdf = new Zend_Form_Element_File('pdf');
     $pdf->setLabel('Upload PDF')->setDescription('(*.pdf < 10MB )')->setDestination(BASE_PATH . '/upload/files/tin_tuc')->addValidator(new Zend_Validate_File_Extension(array('pdf')))->addValidator(new Zend_Validate_File_FilesSize(array('min' => 1, 'max' => 10485760, 'bytestring' => true)))->setDecorators(array('File', 'Errors', array('Description', array('escape' => false, 'tag' => 'div', 'placement' => 'append')), array('HtmlTag', array('tag' => 'td')), array('Label', array('tag' => 'td')), array(array('row' => 'HtmlTag'), array('tag' => 'tr'))));
     $submitCon = new Zend_Form_Element_Submit('submitCon');
     $submitCon->setDecorators(array('ViewHelper', array(array('data' => 'HtmlTag'), array('tag' => 'span')), array(array('row' => 'HtmlTag'), array('tag' => 'span'))))->setAttribs(array('class' => 'button'));
     $submitExit = new Zend_Form_Element_Submit('submitExit');
     $submitExit->setDecorators(array('ViewHelper', array(array('data' => 'HtmlTag'), array('tag' => 'span')), array(array('row' => 'HtmlTag'), array('tag' => 'span'))))->setAttribs(array('class' => 'button'));
     $url = new Zend_View_Helper_Url();
     $link = $url->url(array('module' => 'admin', 'controller' => 'tin-tuc', 'action' => 'index'), null, true);
     $cancel = new Zend_Form_Element_Button('cancel');
     $cancel->setDecorators(array('ViewHelper', array(array('data' => 'HtmlTag'), array('tag' => 'span')), array(array('row' => 'HtmlTag'), array('tag' => 'span'))))->setAttribs(array('class' => 'button', 'onclick' => 'window.location.href="' . $link . '"'));
     $this->addElements(array($tieu_de, $quan_trong, $noi_bat, $photo, $image, $pdf, $trang_thai, $mo_ta_tom_tat, $mo_ta_chi_tiet, $submitCon, $submitExit, $cancel));
     $this->addDisplayGroup(array('submitCon', 'submitExit', 'cancel'), 'submit', array('decorators' => array('FormElements', array(array('data' => 'HtmlTag'), array('tag' => 'td', 'colspan' => 2)), array(array('row' => 'HtmlTag'), array('tag' => 'td')))));
     $this->setDecorators(array('FormElements', array('HtmlTag', array('tag' => 'table', 'class' => 'tin_tuc')), 'Form'));
 }
开发者ID:nhochong,项目名称:qlkh-sgu,代码行数:35,代码来源:TinTuc.php


示例17: init

 public function init()
 {
     $this->setMethod('post');
     $this->setAttrib('action', BASE_URL . 'timeformat/edit');
     $this->setAttrib('id', 'formid');
     $this->setAttrib('name', 'timeformat');
     $id = new Zend_Form_Element_Hidden('id');
     $timeformat = new Zend_Form_Element_Text('timeformat');
     $timeformat->setAttrib('maxLength', 20);
     $timeformat->addFilter(new Zend_Filter_StringTrim());
     $timeformat->setRequired(true);
     $timeformat->addValidator('NotEmpty', false, array('messages' => 'Please enter time format.'));
     $description = new Zend_Form_Element_Textarea('description');
     $description->setAttrib('rows', 10);
     $description->setAttrib('cols', 50);
     $description->setAttrib('maxlength', '200');
     $submit = new Zend_Form_Element_Submit('submit');
     $submit->setAttrib('id', 'submitbutton');
     $submit->setLabel('Save');
     $url = "'timeformat/saveupdate/format/json'";
     $dialogMsg = "''";
     $toggleDivId = "''";
     $jsFunction = "'redirecttocontroller(\\'timeformat\\');'";
     $this->addElements(array($id, $timeformat, $description, $submit));
     $this->setElementDecorators(array('ViewHelper'));
 }
开发者ID:lukkyrich,项目名称:sentrifugo,代码行数:26,代码来源:timeformat.php


示例18: __construct

 public function __construct($options = null)
 {
     parent::__construct($options);
     $emailCategoryOptionList = array('Invite non-sparks to join campaign' => $this->getView()->translate('Admin_Non-Sparks_Invitation'), 'Invite sparks to join campaign' => $this->getView()->translate('Admin_Sparks_Invitation'), 'Send mail to sparks' => $this->getView()->translate('Admin_Send_Mail_To_Sparks'));
     $emailCategory = new Zend_Form_Element_Select('emailCategory');
     $emailCategory->setMultiOptions($emailCategoryOptionList);
     $emailList = new Zend_Form_Element_Textarea('emailList');
     $emailList->setAttribs(array('rows' => 5, 'cols' => 150, 'onChange' => 'datetable()'))->addFilter('StripTags')->addFilter('StringTrim')->addValidators(array(array('StringLength', false, array(0, 65535))));
     $subject = new Zend_Form_Element_Text('subject');
     $subject->setAttribs(array('size' => 150))->addFilter('StringTrim');
     $message = new Zend_Form_Element_Textarea('message');
     $message->setAttribs(array('rows' => 30, 'cols' => 150))->addFilter('StripTags')->addFilter('StringTrim')->addValidators(array(array('StringLength', false, array(0, 65535))));
     $optionList = array();
     $campaign = new Campaign();
     $campaigns = $campaign->fetchAll(null, "id desc", null, null);
     foreach ($campaigns as $campaign) {
         $optionList[$campaign->id] = $campaign->name;
     }
     $optionList['0'] = $this->getView()->translate('ADMIN_NOT_AUTO_INVITATION');
     $campaignId = new Zend_Form_Element_Select('campaignId');
     $campaignId->setMultiOptions($optionList);
     $code_source = new Zend_Form_Element_Text('code_source');
     $code_source->addFilter('StringTrim');
     $submit = new Zend_Form_Element_Submit('submit');
     $submit->setLabel($this->getView()->translate('INVITATION_MAIL_SEND'));
     $this->addElements(array($emailCategory, $emailList, $subject, $message, $campaignId, $code_source, $submit));
 }
开发者ID:omusico,项目名称:wildfire_php,代码行数:27,代码来源:CampaignInvitationMailForm.php


示例19: init

 /**
  *
  * Themes & styles
  *
  */
 public function init()
 {
     $cname = explode('_', get_class());
     $this->preInit(end($cname));
     // use template file
     $this->setDecorators(array(array('ViewScript', array('viewScript' => 'forms/SettingsStyles.phtml'))));
     // load settings
     $AppOptions = new Application_Model_AppOptions();
     $all_meta = $AppOptions->getAllOptions();
     // fields
     $themes_array = array('/bootstrap/css/bootstrap.min.css' => 'Boo 

鲜花

握手

雷人

路过

鸡蛋
该文章已有0人参与评论

请发表评论

全部评论

专题导读
上一篇:
PHP Zend_Form_Element_Xhtml类代码示例发布时间:2022-05-23
下一篇:
PHP Zend_Form_Element_Text类代码示例发布时间:2022-05-23
热门推荐
阅读排行榜

扫描微信二维码

查看手机版网站

随时了解更新最新资讯

139-2527-9053

在线客服(服务时间 9:00~18:00)

在线QQ客服
地址:深圳市南山区西丽大学城创智工业园
电邮:jeky_zhao#qq.com
移动电话:139-2527-9053

Powered by 互联科技 X3.4© 2001-2213 极客世界.|Sitemap