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


PHP Zend_Form_Element_Select::setAttrib方法代码示例

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


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

示例1: __construct

 public function __construct($options = null)
 {
     Zend_Dojo::enableForm($this);
     parent::__construct($options);
     $app = APPLICATION_PATH;
     $accountHeader = new Zend_Form_Element_Text('accountHeader');
     $accountHeader->setAttrib('class', 'txt_put');
     $accountHeader->setAttrib('id', 'accountHeader');
     $accountHeader->setRequired(true)->addValidators(array(array('NotEmpty')));
     $glcodeDescription = new Zend_Form_Element_Textarea('glcodeDescription', array('rows' => 3, 'cols' => 25));
     $glcodeDescription->setAttrib('id', 'glcodeDescription');
     $glcodeDescription->setRequired(true)->addValidators(array(array('NotEmpty')));
     $product = new Zend_Form_Element_Select('product');
     $product->setAttrib('select', '-----');
     $product->setAttrib('class', 'txt_put');
     $product->setRequired(true)->addValidators(array(array('NotEmpty')));
     $offerproduct = new Zend_Form_Element_Select('offerproduct');
     $offerproduct->setAttrib('select', '-----');
     $offerproduct->setAttrib('class', 'txt_put');
     $subheader = new Zend_Form_Element_Text('subheader');
     $subheader->setAttrib('class', 'txt_put');
     $subheader->setAttrib('id', 'subheader');
     $glsubaccountdescription = new Zend_Form_Element_Textarea('glsubaccountdescription', array('rows' => 3, 'cols' => 25));
     $glsubaccountdescription->setAttrib('id', 'glsubaccountdescription');
     $submit = new Zend_Form_Element_Submit('Save');
     $submit->setAttrib('id', 'Save');
     $submit->setAttrib('class', 'holiday1');
     $this->addElements(array($submit, $accountHeader, $glcodeDescription, $subheader, $glsubaccountdescription, $product, $offerproduct));
     $glcodeUpdateId = new Zend_Form_Element_Hidden('glcodeUpdateId');
     $glsubcodeupdate_id = new Zend_Form_Element_Hidden('glsubcodeupdate_id');
     $submit = new Zend_Form_Element_Submit('Submit');
     $submit->setAttrib('class', 'holiday');
     $this->addElements(array($submit, $glcodeUpdateId, $glsubcodeupdate_id));
 }
开发者ID:maniargaurav,项目名称:OurBank,代码行数:34,代码来源:Ledger.php

示例2: __construct

 public function __construct($currencysymbol)
 {
     Zend_Dojo::enableForm($this);
     parent::__construct($options);
     $finename = new Zend_Form_Element_Text('finename');
     $finename->setRequired(true)->addValidators(array(array('NotEmpty')));
     $finename->setAttrib('class', 'txt_put');
     $finename->setAttrib('id', 'finename');
     $membertype = new Zend_Form_Element_Select('membertype');
     $membertype->setAttrib('class', 'selectbutton');
     $membertype->setAttrib('id', 'membertype');
     $membertype->setRequired(true)->addValidators(array(array('NotEmpty')));
     $finedescription = new Zend_Form_Element_Text('finedescription');
     $finedescription->setAttrib('class', 'txt_put');
     $finedescription->setAttrib('id', 'finedescription');
     $finedescription->setRequired(true)->addValidators(array(array('NotEmpty')));
     $finevalue = new Zend_Form_Element_Text('finevalue');
     $finevalue->setAttrib('class', 'txt_put');
     $finevalue->setAttrib('id', 'finevalue');
     $finevalue->setAttrib('size', '6');
     $finevalue->setRequired(true)->addValidators(array(array('NotEmpty')));
     $submit = new Zend_Form_Element_Submit('Save');
     $submit->setAttrib('id', 'save');
     $this->addElements(array($finename, $finedescription, $membertype, $finevalue));
     $fineId = new Zend_Form_Element_Hidden('fineId');
     $submit = new Zend_Form_Element_Submit('Submit');
     $submit->setAttrib('class', 'finesubmit');
     $submit->setLabel('submit');
     $this->addElements(array($submit, $fineId));
 }
开发者ID:maniargaurav,项目名称:OurBank,代码行数:30,代码来源:Fine.php

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

示例4: init

 public function init()
 {
     $this->setMethod('post');
     $this->setAttrib('action', DOMAIN . 'states/edit');
     $this->setAttrib('id', 'formid');
     $this->setAttrib('name', 'states');
     $id = new Zend_Form_Element_Hidden('id');
     $country = new Zend_Form_Element_Select('countryid');
     $country->setAttrib('class', 'selectoption');
     $country->setAttrib('onchange', 'displayParticularState(this,"otheroption","state","")');
     $country->setRegisterInArrayValidator(false);
     $country->addMultiOption('', 'Select Country');
     $country->setRequired(true);
     $country->addValidator('NotEmpty', false, array('messages' => 'Please select country.'));
     $state = new Zend_Form_Element_Multiselect('state');
     $state->setAttrib('onchange', 'displayStateCode(this)');
     $state->setRegisterInArrayValidator(false);
     $state->setRequired(true);
     $state->addValidator('NotEmpty', false, array('messages' => 'Please select state.'));
     $state->addValidator(new Zend_Validate_Db_NoRecordExists(array('table' => 'main_states', 'field' => 'state_id_org', 'exclude' => 'id!="' . Zend_Controller_Front::getInstance()->getRequest()->getParam('id') . '" and isactive=1')));
     $state->getValidator('Db_NoRecordExists')->setMessage('State already exists.');
     $otherstatename = new Zend_Form_Element_Text('otherstatename');
     $otherstatename->setAttrib('maxLength', 20);
     $otherstatename->addValidators(array(array('validator' => 'Regex', 'breakChainOnFailure' => true, 'options' => array('pattern' => '/^[^ ][a-zA-Z\\s]*$/i', 'messages' => array('regexNotMatch' => 'Please enter valid state name.')))));
     $submit = new Zend_Form_Element_Submit('submit');
     $submit->setAttrib('id', 'submitbutton');
     $submit->setLabel('Save');
     $this->addElements(array($id, $country, $state, $otherstatename, $submit));
     $this->setElementDecorators(array('ViewHelper'));
 }
开发者ID:uskumar33,项目名称:DeltaONE,代码行数:30,代码来源:states.php

示例5: __construct

 public function __construct($options = null)
 {
     parent::__construct($options);
     $accountId1 = new Zend_Form_Element_Hidden('accountId');
     $productId1 = new Zend_Form_Element_Hidden('productId');
     $memberId1 = new Zend_Form_Element_Hidden('memberId');
     $maturedamount = new Zend_Form_Element_Hidden('maturedinterestamount');
     $interestamountto = new Zend_Form_Element_Hidden('interestamountto');
     $capitalamount = new Zend_Form_Element_Hidden('capitalamount');
     $penalinterest = new Zend_Form_Element_Hidden('penalinterest');
     $paymenttype = new Zend_Form_Element_Select('paymenttype');
     $paymenttype->addMultiOption('', 'select..');
     $paymenttype->setAttrib('class', 'NormalBtn');
     $paymenttype->setAttrib('id', 'paymenttype');
     $paymenttype->setAttrib('onchange', 'toggleField();');
     $paymenttype->setRequired(true);
     $description = new Zend_Form_Element_Textarea('transactiondescription');
     $description->setAttrib('class', 'textfield');
     $description->setAttrib('rows', '2');
     $description->setAttrib('cols', '20');
     $no = new Zend_Form_Element_Textarea('paymenttype_details');
     $no->setAttrib('class', 'textfield');
     $no->setAttrib('rows', '1');
     $no->setAttrib('cols', '20');
     $no->setAttrib('id', 'paymenttype_details');
     $no->setAttrib('style', 'display:none;');
     $no->setRequired(true);
     $submit = new Zend_Form_Element_Submit('Finalize');
     $submit->setLabel('Finalize');
     $submit->setAttrib('class', 'recurring');
     $this->addElements(array($accountId1, $productId1, $memberId1, $maturedamount, $submit, $capitalamount, $interestamountto, $penalinterest, $paymenttype, $description, $no));
 }
开发者ID:maniargaurav,项目名称:OurBank,代码行数:32,代码来源:Finalize.php

示例6: init

 public function init()
 {
     $this->setMethod('post');
     $this->setAttrib('id', 'formid');
     $this->setAttrib('name', 'frm_requisition_report');
     $raised_by = new Zend_Form_Element_Text("raised_by");
     $raised_by->setLabel("Raised By");
     $raised_by->setAttrib('name', '');
     $raised_by->setAttrib('id', 'idraised_by');
     $raised_by->setAttrib('title', 'Raised By');
     $requisition_status = new Zend_Form_Element_Select("req_status");
     $requisition_status->setLabel("Requisition Status");
     $requisition_status->addMultiOptions(array('' => 'Select Requisition Status', 'Initiated' => 'Initiated', 'Approved' => 'Approved', 'Rejected' => 'Rejected', 'Closed' => 'Closed', 'On hold' => 'On hold', 'Complete' => 'Complete', 'In process' => 'In process'));
     $requisition_status->setAttrib('title', 'Requisition Status');
     $raised_in = new Zend_Form_Element_Select('createdon');
     $raised_in->setLabel('Raised In');
     $raised_in->setAttrib('id', 'createdon');
     $reporting_manager = new Zend_Form_Element_Text("reporting_manager");
     $reporting_manager->setLabel("Reporting Manager");
     $reporting_manager->setAttrib('name', '');
     $reporting_manager->setAttrib('id', 'idreporting_manager');
     $job_title = new Zend_Form_Element_Select("jobtitle");
     $job_title->setLabel("Job Title");
     $job_title->setAttrib("onchange", "getpositions_req('department','business_unit','position_id','jobtitle');");
     $job_title->setAttrib('title', 'Job Title.');
     $submit = new Zend_Form_Element_Button('submit');
     $submit->setAttrib('id', 'idsubmitbutton');
     $submit->setLabel('Report');
     $this->addElements(array($raised_by, $requisition_status, $raised_in, $reporting_manager, $job_title, $submit));
     $this->setElementDecorators(array('ViewHelper'));
 }
开发者ID:rajbrt,项目名称:sentrifugo,代码行数:31,代码来源:Requisitionsstatusreport.php

示例7: __construct

 public function __construct($minimumDeposit)
 {
     parent::__construct($minimumDeposit);
     $date1 = new ZendX_JQuery_Form_Element_DatePicker('date1', array('label' => 'Date:'));
     $date1->setAttrib('class', 'txt_put');
     $date1->setJQueryParam('dateFormat', 'yy-mm-dd');
     $date1->setRequired(true);
     $period = new Zend_Form_Element_Select('period');
     $period->addMultiOption('', 'Select...');
     $period->setAttrib('class', 'txt_put');
     $period->setRequired(true)->addValidators(array(array('NotEmpty')));
     $period->setAttrib('onchange', 'getInterests(this.value)');
     $interest = new Zend_Form_Element_Text('interest');
     $interest->setAttrib('class', 'txt_put');
     $recuringamount = new Zend_Form_Element_Text('recuringamount');
     $recuringamount->setAttrib('class', 'txt_put');
     $amount = new Zend_Form_Element_Text('amount');
     $amount->addValidators(array(array('Float'), array('GreaterThan', false, array($minimumDeposit - 0.0001, 'messages' => array('notGreaterThan' => 'Minimum 
                                   Amount To open a savings account =' . $minimumDeposit)))));
     $amount->setAttrib('class', 'txt_put');
     $amount->setRequired(true);
     $amount->setAttrib('onchange', 'calculateTotalAmount(this.value)');
     $memberfirstname = new Zend_Form_Element_MultiCheckbox('memberfirstname');
     $memberfirstname->setAttrib('class', 'textfield');
     $memberfirstname->setRequired(true);
     $memberId = new Zend_Form_Element_Hidden('memberId');
     $productId = new Zend_Form_Element_Hidden('productId');
     $typeId = new Zend_Form_Element_Hidden('typeId');
     $memberTypeIdv = new Zend_Form_Element_Hidden('memberTypeIdv');
     $submit = new Zend_Form_Element_Submit('Submit');
     $Yes = new Zend_Form_Element_Submit('Yes');
     $back = new Zend_Form_Element_Submit('Back');
     $this->addElements(array($submit, $amount, $period, $interest, $recuringamount, $memberfirstname, $memberId, $date1, $productId, $typeId, $memberTypeIdv, $back, $Yes));
 }
开发者ID:maniargaurav,项目名称:OurBank,代码行数:34,代码来源:Recuring.php

示例8: __construct

 public function __construct($path)
 {
     parent::__construct($path);
     $formfield = new App_Form_Field();
     // 	$fieldtype,$fieldname,$table,$columnname,$cssname,$labelname,$required,$validationtype,$min,$max,$decorator,$value
     $meeting_name = $formfield->field('Text', 'meeting_name', '', '', 'mand', '', true, '', '', '', '', '', '', '');
     $meeting_name->addValidator('Alnum', true, array('allowWhiteSpace' => true));
     $group_head = $formfield->field('Text', 'group_head', '', '', 'mand', '', '', '', '', '', '', '', '', '');
     $group_head->setAttrib('readonly', 'readonly');
     $hiddenId = new Zend_Form_Element_Hidden('group_head_id');
     $meeting_place = $formfield->field('Text', 'meeting_place', '', '', 'mand', '', true, '', '', '', '', '', '', '');
     $meeting_place->addValidator('Alnum', true, array('allowWhiteSpace' => true));
     $meeting_time = $formfield->field('Text', 'meeting_time', '', '', 'mand', '', true, '', '', '', '', '', '', '');
     $institute_bank_id = new Zend_Form_Element_Select('institute_bank_id');
     $institute_bank_id->addMultiOption('', 'Select...');
     $institute_bank_id->setAttrib('class', 'txt_put');
     $institute_bank_id->setAttrib('onchange', 'getGroups(this.value,"' . $path . '")');
     $institute_bank_id->addValidators(array(array('NotEmpty')));
     $group_name = new Zend_Form_Element_Select('group_name');
     $group_name->addMultiOption('', 'Select...');
     $group_name->setAttrib('class', 'txt_put');
     $group_name->setAttrib('onchange', 'getHeadName(this.value,"' . $path . '")');
     $group_name->setRequired(true)->setRegisterInArrayValidator(false)->addValidators(array(array('NotEmpty')));
     $meeting_day = $formfield->field('Select', 'meeting_day', '', '', 'mand', '', true, '', '', '', '', '', '', '');
     $submit = $formfield->field('Submit', 'Submit', '', '', '', 'Submit', '', '', '', '', '', '', '', '');
     $Back = $formfield->field('Submit', 'Back', '', '', '', 'Back', '', '', '', '', '', '', '', '');
     $this->addElements(array($meeting_name, $group_head, $meeting_place, $meeting_time, $institute_bank_id, $group_name, $meeting_day, $Back, $hiddenId, $submit));
 }
开发者ID:maniargaurav,项目名称:OurBank,代码行数:28,代码来源:Meeting.php

示例9: init

 public function init()
 {
     $this->setMethod('post');
     $this->setAction('/main/new');
     $this->setAttrib('id', 'newRoute');
     $note = new Zend_Form_Element_Note('title', array('value' => '<h2 id="titleProductDetails">Create a New Route</h2>'));
     $intermed = new Zend_Form_Element_Hidden('intermed');
     $intermed->setAttrib('readonly', 'readonly');
     $intermed->addFilter('StripTags');
     $intermed->addFilter('HtmlEntities');
     $intermed->addFilter('StringTrim');
     $start = new Zend_Form_Element_Text('startForm');
     $start->setLabel('Starting Point*');
     $start->setAttrib('autocomplete', 'off');
     $start->addFilter('StripTags');
     $start->addFilter('HtmlEntities');
     $start->setAttrib('class', 'form-control');
     $start->addFilter('StringTrim');
     $start->setRequired(true)->addErrorMessage('Start Location Required');
     //        $start->addValidator('Regex', true, array('/^[a-zA-Z0-9.,:-\s]*$/'))->addErrorMessage('Invalid characters used');
     //        $start->addValidator('StringLength', true, array(0, 255))->addErrorMessage('Required Field');
     $end = new Zend_Form_Element_Text('endForm');
     $end->setLabel('Destination*');
     $end->setAttrib('autocomplete', 'off');
     $end->addFilter('StripTags');
     $end->setAttrib('class', 'form-control');
     $end->addFilter('HtmlEntities');
     $end->addFilter('StringTrim');
     $end->setRequired(true)->addErrorMessage('Destination Required');
     //        $end->addValidator('StringLength', true, array(0, 255))->addErrorMessage('Required Field');
     $routeDate = new Zend_Form_Element_Text('routeDate');
     $routeDate->setAttrib('autocomplete', 'off');
     $routeDate->setAttrib('readonly', 'readonly');
     $routeDate->setAttrib('maxlength', '10');
     $routeDate->setAttrib('class', 'form-control');
     $routeDate->setLabel('Date of Journey' . '*');
     $routeDate->addFilter('StripTags');
     $routeDate->addFilter('HtmlEntities');
     $routeDate->addFilter('StringTrim');
     $routeDate->setRequired(true)->addErrorMessage('Date Required');
     $routeDate->addValidator('Regex', true, array('/^[0-9.\\s]*$/'))->addErrorMessage('Invalid characters used');
     $routeDate->addValidator('StringLength', true, array(10, 10))->addErrorMessage('Required Field');
     $passangers = new Zend_Form_Element_Select('passangers');
     $passangers->setLabel('No of Passangers*');
     $passangers->setAttrib('autocomplete', 'off');
     $passangers->setAttrib('class', 'form-control');
     $passangers->addFilter('StripTags');
     $passangers->addFilter('HtmlEntities');
     $passangers->addFilter('StringTrim');
     $passangers->setRequired(true)->addErrorMessage('Password Required');
     $passangers->setMultiOptions(array('1' => '1 Passanger', '2' => '2 Passangers', '3' => '3 Passangers', '4' => '4 Passangers', '5' => '5 Passangers', '6' => '6 Passangers'));
     $submit = new Zend_Form_Element_Submit('newRoute');
     $submit->setLabel('New Route');
     $submit->setAttrib('class', 'btn btn-info');
     $submit->setAttrib('style', 'margin-top:20px');
     $this->addElements(array($note, $intermed, $start, $end, $passangers, $routeDate, $submit));
     $this->setElementDecorators(array('ViewHelper', 'Label', 'Errors'));
     $submit->setDecorators(array('ViewHelper'));
     $this->setDecorators(array('FormElements', 'Form', array('HtmlTag', array('tag' => 'div', 'id' => 'newRouteFormContainer'))));
 }
开发者ID:bogdanmatra,项目名称:ibm-hackathon,代码行数:60,代码来源:Route.php

示例10: __construct

 public function __construct($recurringBeginDate, $recurringClosedDate, $recurringMinAmount, $recurringMaxAmount, $app)
 {
     parent::__construct($recurringBeginDate, $recurringClosedDate, $recurringMinAmount, $recurringMaxAmount, $app);
     $startdate = new ZendX_JQuery_Form_Element_DatePicker('startdate');
     $startdate->setAttrib('id', 'startdate');
     $startdate->setAttrib('size', '8');
     $startdate->setAttrib('class', '');
     $startdate->setRequired(true)->addValidators(array(array('Date', true), array('Between', false, array($recurringBeginDate, $recurringClosedDate, 'messages' => array('notBetween' => 'date should be between ' . $recurringBeginDate . ' to (Closed date) ' . $recurringClosedDate)))));
     $recurringamount = new Zend_Form_Element_Text('recurringamount');
     $recurringamount->setRequired(true)->addValidators(array(array('Digits'), array('GreaterThan', false, array($recurringMinAmount)), array('LessThan', false, array($recurringMaxAmount)), array('NotEmpty')));
     $recurringamount->setAttrib('size', '8');
     $recurringperiod = new Zend_Form_Element_Text('recurringperiod');
     $recurringperiod->setAttrib('id', 'recurringperiod');
     $recurringperiod->setAttrib('class', 'NormalBtn');
     $memberfirstname = new Zend_Form_Element_MultiCheckbox('memberfirstname');
     $memberfirstname->setAttrib('class', 'textfield');
     $freequencyofdeposit = new Zend_Form_Element_Select('frequencyofdeposit');
     $freequencyofdeposit->addMultiOption('', 'Select...');
     $freequencyofdeposit->setAttrib('class', 'NormalBtn');
     $freequencyofdeposit->setAttrib('id', 'freequencyofdeposit');
     $perioddescription = new Zend_Form_Element_Select('perioddescription');
     $perioddescription->addMultiOption('', 'Select..');
     $perioddescription->setAttrib('class', 'NormalBtn');
     $perioddescription->setAttrib('id', 'perioddescription');
     $perioddescription->setRequired(true);
     $perioddescription->setAttrib('onchange', 'getInterests(this.value,"' . $app . '")');
     $periodinterest = new Zend_Form_Element_Select('periodinterest');
     $periodinterest->addMultiOption('', 'Select...');
     $periodinterest->setAttrib('class', 'NormalBtn');
     $periodinterest->setAttrib('id', 'periodinterest');
     $periodinterest->setAttrib('size', '5');
     $accountId = new Zend_Form_Element_Hidden('accountId');
     $productIdss = new Zend_Form_Element_Hidden('productId');
     $recurringindex = new Zend_Form_Element_Text('recurringinterest');
     $recurringindex->setAttrib('id', 'recurringinterest');
     $recurringindex->setAttrib('size', '8');
     $recurringindex->setAttrib('class', 'NormalBtn');
     $recurringindex->setAttrib('readonly', 'true');
     $recurringindex->setAttrib('class', 'NormalBtn');
     $recurringindex->setAttrib('readonly', 'true');
     $memberTypeId = new Zend_Form_Element_Hidden('memberTypeId');
     $memberId = new Zend_Form_Element_Hidden('member_id');
     $productId = new Zend_Form_Element_Hidden('product_id');
     $offerproductId = new Zend_Form_Element_Hidden('offerproduct_id');
     $groupId = new Zend_Form_Element_Hidden('groupId');
     $this->addElements(array($memberfirstname, $recurringindex, $freequencyofdeposit, $recurringperiod, $recurringamount, $startdate, $perioddescription, $periodinterest, $memberId, $productId, $offerproductId, $groupId, $memberTypeId, $accountId, $productIdss));
     $period_id = new Zend_Form_Element_Hidden('period_id');
     $period_id->setAttrib('id', 'period_id');
     $startdate1 = new Zend_Form_Element_Hidden('startdate1');
     $recurringamount1 = new Zend_Form_Element_Hidden('recurringamount1');
     $perioddescription1 = new Zend_Form_Element_Hidden('perioddescription1');
     $interest1 = new Zend_Form_Element_Hidden('interest1');
     $Confirm = new Zend_Form_Element_Submit('Confirm');
     $Confirm->setLabel('Confirm');
     $Confirm->setAttrib('class', 'recurring');
     $submit = new Zend_Form_Element_Submit('Submit');
     $submit->setLabel('submit');
     $submit->setAttrib('class', 'recurring');
     $this->addElements(array($submit, $period_id, $Confirm, $startdate1, $recurringamount1, $perioddescription1, $interest1));
 }
开发者ID:maniargaurav,项目名称:OurBank,代码行数:60,代码来源:RecurringAccount.php

示例11: __construct

 public function __construct($id, $subId)
 {
     parent::__construct($id, $subId);
     $formfield = new App_Form_Field();
     $cropId = new Zend_Form_Element_Select('crop_id[]');
     $cropId->setAttrib('class', 'txt_put');
     $cropId->setAttrib('id', 'crop_id[]');
     $season = new Zend_Form_Element_Select('season[]');
     $season->setAttrib('class', 'txt_put');
     $season->setAttrib('id', 'crop_id[]');
     // $cropId = $formfield->field('Select','crop_id[]','','','','',true,'','','','','',0,0);
     $acre = $formfield->field('Text', 'acre[]', '', '', '', '', true, '', '', '', '', '', 0, 0);
     $acre->setAttrib('size', 8);
     $quantity = $formfield->field('Text', 'quantity[]', '', '', '', '', true, '', '', '', '', '', 0, 0);
     $quantity->setAttrib('size', 12);
     $marketed = $formfield->field('Text', 'marketed[]', '', '', '', '', true, '', '', '', '', '', 0, 0);
     $marketed->setAttrib('size', 12);
     $price = $formfield->field('Text', 'price[]', '', '', '', '', true, '', '', '', '', '', 0, 0);
     //hidden feilds
     $id = $formfield->field('Hidden', 'id[]', '', '', '', '', false, '', '', '', '', '', 0, $id);
     $subId = $formfield->field('Hidden', 'submodule_id[]', '', '', '', '', false, '', '', '', '', '', 0, $subId);
     $createdBy = $formfield->field('Hidden', 'created_by[]', '', '', '', '', false, '', '', '', '', '', 0, 1);
     $createdDate = $formfield->field('Hidden', 'created_date[]', '', '', '', '', false, '', '', '', '', '', 0, date("y/m/d H:i:s"));
     $crpid = $formfield->field('Hidden', 'crpid[]', '', '', '', '', '', '', '', '', '', '', 0, 0);
     $this->addElements(array($id, $cropId, $acre, $quantity, $marketed, $price, $subId, $createdBy, $createdDate, $crpid, $season));
 }
开发者ID:maniargaurav,项目名称:OurBank,代码行数:26,代码来源:Crop.php

示例12: __construct

 public function __construct($path)
 {
     $fromglcode = new Zend_Form_Element_Select('fromglcode');
     $fromglcode->addMultiOption('', 'Select' . '...');
     $fromglcode->setAttrib('class', 'selectbutton');
     //         $fromglcode->setRequired(true)
     //                     ->addValidators(array(array('NotEmpty')));
     $fromglcode->setAttrib('onchange', 'getglcode(this.value,"' . $path . '")');
     $fromglsubcode = new Zend_Form_Element_Select('fromglsubcode');
     $fromglsubcode->addMultiOption('', 'Select' . '...');
     $fromglsubcode->setAttrib('class', 'selectbutton');
     $toglcode = new Zend_Form_Element_Select('toglcode');
     $toglcode->addMultiOption('', 'Select' . '...');
     $toglcode->setAttrib('class', 'selectbutton');
     $toglcode->setRequired(true)->addValidators(array(array('NotEmpty')));
     $toglcode->setAttrib('onchange', 'gettoglcode(this.value,"' . $path . '")');
     $toglsubcode = new Zend_Form_Element_Select('toglsubcode');
     $toglsubcode->addMultiOption('', 'Select' . '...');
     $toglsubcode->setAttrib('class', 'selectbutton');
     $amount = new Zend_Form_Element_Text('amount');
     $amount->setRequired(true)->addValidators(array(array('NotEmpty')));
     $amount->setAttrib('class', 'txt_put');
     $transactiondate = new Zend_Form_Element_Text('transactiondate');
     $transactiondate->setRequired(true)->addValidators(array(array('NotEmpty')));
     $transactiondate->setAttrib('class', 'txt_put');
     $description = new Zend_Form_Element_Textarea('description');
     $description->setAttrib('class', 'textfield');
     $description->setAttrib('rows', '1');
     $description->setAttrib('cols', '20');
     $description->setAttrib('id', 'description');
     $description->setRequired(true);
     $officeType = new Zend_Form_Element_Select('officeType');
     $officeType->addMultiOption('', 'Select' . '...');
     $officeType->setAttrib('class', 'selectbutton');
     $officeType->setRequired(true)->addValidators(array(array('NotEmpty')));
     $officeType->setAttrib('onchange', 'getBranch(this.value,"' . $path . '")');
     $subOffice = new Zend_Form_Element_Select('subOffice');
     $subOffice->addMultiOption('', 'Select' . '...');
     $subOffice->setAttrib('class', 'selectbutton');
     $paymenttype = new Zend_Form_Element_Select('paymenttype');
     $paymenttype->addMultiOption('', 'select');
     $paymenttype->setAttrib('class', 'NormalBtn');
     $paymenttype->setAttrib('id', 'paymenttype');
     $paymenttype->setAttrib('onchange', 'toggleField();');
     $paymenttype->setRequired(true);
     $no = new Zend_Form_Element_Textarea('paymenttype_details');
     $no->setAttrib('class', 'textfield');
     $no->setAttrib('rows', '1');
     $no->setAttrib('cols', '20');
     $no->setAttrib('id', 'paymenttype_details');
     $no->setAttrib('style', 'display:none;');
     $no->setRequired(true);
     $submit = new Zend_Form_Element_Submit('Submit');
     $submit->setAttrib('class', 'officesubmit');
     $this->addElements(array($fromglcode, $fromglsubcode, $toglcode, $toglsubcode, $amount, $transactiondate, $description, $submit, $officeType, $subOffice, $paymenttype, $no));
 }
开发者ID:maniargaurav,项目名称:OurBank,代码行数:56,代码来源:Receipts.php

示例13: __construct

 public function __construct($options = null)
 {
     Zend_Dojo::enableForm($this);
     parent::__construct($options);
     $creditline_id = new Zend_Form_Element_Text('creditline_id');
     $institution_id = new Zend_Form_Element_Text('institution_id');
     $institutionName = new Zend_Form_Element_Select('institutionname');
     $institutionName->setAttrib('class', 'txt_put');
     $institutionName->setAttrib('id', 'institutionname');
     $institutionName->setLabel('institutionname')->setRequired(true);
     $institutionName->addMultiOption('', 'Select...');
     $institutionName->setAttrib('onchange', 'getState(this.value)');
     $institutionNames = new Zend_Form_Element_Text('institutionnames');
     $institutionNames->setAttrib('class', 'txt_put');
     $institutionNames->setAttrib('readonly', 'true');
     $instituteamount = new Zend_Form_Element_Text('instituteamount');
     $instituteamount->setAttrib('class', 'txt_put');
     $instituteamount->setAttrib('readonly', 'true');
     $institutionamount = new Zend_Form_Element_Text('institutionamount');
     $institutionamount->setAttrib('class', 'txt_put');
     $institutionamount->setAttrib('readonly', 'true');
     $maxcreditlinelimit = new Zend_Form_Element_Text('maxcreditlinelimit');
     $maxcreditlinelimit->setAttrib('class', 'txt_put');
     $maxcreditlinelimit->setAttrib('readonly', 'true');
     $creditlinename = new Zend_Form_Element_Text('creditlinename');
     $creditlinename->addValidator(new Zend_Validate_Db_NoRecordExists('ourbank_creditlineinformation', 'creditlinename'));
     $creditlinename->setAttrib('class', 'txt_put');
     $creditlinename->setAttrib('id', 'creditlinename');
     $creditlinename->setLabel('creditlinename')->setRequired(true)->addValidators(array(array('NotEmpty')));
     $creditlineshortname = new Zend_Form_Element_Text('creditline_shortname');
     $creditlineshortname->setAttrib('class', 'txt_put');
     $creditlineshortname->setAttrib('id', 'creditline_shortname');
     $creditlineshortname->setLabel('creditline_shortname')->setRequired(true)->addValidators(array('NotEmpty'));
     $creditlineamount = new Zend_Form_Element_Text('creditlineamount');
     $creditlineamount->setAttrib('class', 'txt_put');
     $creditlineamount->setAttrib('id', 'creditlineamount');
     $creditlineamount->setRequired(true)->addValidators(array(array('NotEmpty'), array('Float')));
     $creditlineinterest = new Zend_Form_Element_Text('creditlineinterest');
     $creditlineinterest->setAttrib('class', 'txt_put');
     $creditlineinterest->setAttrib('id', 'creditlineinterest');
     $creditlineinterest->setRequired(true)->addValidators(array(array('NotEmpty'), array('stringLength', false, array(1, 3)), array('Digits')));
     $creditlinefrom = new ZendX_JQuery_Form_Element_DatePicker('creditline_beginingdate');
     $creditlinefrom->setJQueryParam('dateFormat', 'yy-mm-dd');
     $creditlinefrom->setRequired(true)->addValidators(array(array('Date')));
     $creditlinefrom->setAttrib('class', 'txt_put');
     $creditlinefrom->setAttrib('id', 'creditline_beginingdate');
     $creditlineto = new ZendX_JQuery_Form_Element_DatePicker('creditline_closingdate');
     $creditlineto->setJQueryParam('dateFormat', 'yy-mm-dd');
     $creditlineto->setRequired(true)->addValidators(array(array('Date')));
     $creditlineto->setAttrib('class', 'txt_put');
     $creditlineto->setAttrib('id', 'creditline_closingdate');
     $submit = new Zend_Form_Element_Submit('Submit');
     $submit->setAttrib('class', 'officesubmit');
     $submit->setlabel('Submit');
     $this->addElements(array($creditline_id, $institutionName, $creditlinename, $creditlineshortname, $creditlineamount, $creditlineinterest, $creditlinefrom, $creditlineto, $submit, $institutionamount, $instituteamount, $institutionNames, $institution_id, $maxcreditlinelimit));
 }
开发者ID:maniargaurav,项目名称:OurBank,代码行数:56,代码来源:creditline.php

示例14: init

 public function init()
 {
     $languages = new Zend_Form_Element_Select('languages');
     $languages->addMultiOption('', 'Select...');
     $languages->setAttrib('class', 'txt_put');
     $languages->setRequired(true)->addValidators(array(array('NotEmpty')));
     $languages->setAttrib('onchange', 'getmember(this.value,"' . $app . '")');
     $submit = new Zend_Form_Element_Submit('Submit');
     $submit->removeDecorator('DtDdWrapper');
     $this->addElements(array($languages, $submit));
 }
开发者ID:maniargaurav,项目名称:OurBank,代码行数:11,代码来源:Settings.php

示例15: init

 public function init()
 {
     $this->setMethod('post');
     $this->setAttrib('id', 'formid');
     $this->setAttrib('name', 'managerleaverequest');
     $id = new Zend_Form_Element_Hidden('id');
     $appliedleavesdaycount = new Zend_Form_Element_Text('appliedleavesdaycount');
     $appliedleavesdaycount->setAttrib('readonly', 'true');
     $appliedleavesdaycount->setAttrib('onfocus', 'this.blur()');
     $employeename = new Zend_Form_Element_Text('employeename');
     $employeename->setAttrib('readonly', 'true');
     $employeename->setAttrib('onfocus', 'this.blur()');
     $managerstatus = new Zend_Form_Element_Select('managerstatus');
     $managerstatus->setRegisterInArrayValidator(false);
     $managerstatus->setMultiOptions(array('1' => 'Approve', '2' => 'Reject'));
     $comments = new Zend_Form_Element_Textarea('comments');
     $comments->setLabel("Comments");
     $comments->setAttrib('rows', 10);
     $comments->setAttrib('cols', 50);
     $comments->setAttrib('maxlength', '200');
     $leavetypeid = new Zend_Form_Element_Select('leavetypeid');
     $leavetypeid->setAttrib('class', 'selectoption');
     $leavetypeid->setRegisterInArrayValidator(false);
     $leavetypeid->setAttrib('readonly', 'true');
     $leavetypeid->setAttrib('onfocus', 'this.blur()');
     $leaveday = new Zend_Form_Element_Select('leaveday');
     $leaveday->setRegisterInArrayValidator(false);
     $leaveday->setMultiOptions(array('1' => 'Full Day', '2' => 'Half Day'));
     $leaveday->setAttrib('readonly', 'true');
     $leaveday->setAttrib('onfocus', 'this.blur()');
     $from_date = new Zend_Form_Element_Text('from_date');
     $from_date->setAttrib('readonly', 'true');
     $from_date->setAttrib('onfocus', 'this.blur()');
     $to_date = new Zend_Form_Element_Text('to_date');
     $to_date->setAttrib('readonly', 'true');
     $to_date->setAttrib('onfocus', 'this.blur()');
     $reason = new Zend_Form_Element_Textarea('reason');
     $reason->setAttrib('rows', 10);
     $reason->setAttrib('cols', 50);
     $reason->setAttrib('maxlength', '400');
     $reason->setAttrib('readonly', 'true');
     $reason->setAttrib('onfocus', 'this.blur()');
     $leavestatus = new Zend_Form_Element_Text('leavestatus');
     $leavestatus->setAttrib('readonly', 'true');
     $leavestatus->setAttrib('onfocus', 'this.blur()');
     $createddate = new Zend_Form_Element_Text('createddate');
     $createddate->setAttrib('readonly', 'true');
     $createddate->setAttrib('onfocus', 'this.blur()');
     $submit = new Zend_Form_Element_Submit('submit');
     $submit->setAttrib('id', 'submitbutton');
     $submit->setLabel('Save');
     $this->addElements(array($id, $employeename, $managerstatus, $comments, $reason, $leaveday, $from_date, $to_date, $leavetypeid, $appliedleavesdaycount, $leavestatus, $createddate, $submit));
     $this->setElementDecorators(array('ViewHelper'));
 }
开发者ID:rajbrt,项目名称:sentrifugo,代码行数:54,代码来源:managerleaverequest.php


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