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


PHP ZendX_JQuery_Form_Element_DatePicker::setOptions方法代码示例

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


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

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

示例2: init

 public function init()
 {
     $this->setMethod('post');
     $this->setAttrib('action', DOMAIN . 'employee/add');
     $this->setAttrib('id', 'formid');
     $this->setAttrib('name', 'empskills');
     $id = new Zend_Form_Element_Hidden('id');
     $userid = new Zend_Form_Element_Hidden('user_id');
     $skillname = new Zend_Form_Element_Text('skillname');
     $skillname->setRequired(true);
     $skillname->setAttrib('maxLength', 50);
     $skillname->addFilter('StripTags');
     $skillname->addFilter('StringTrim');
     $skillname->addValidator('NotEmpty', false, array('messages' => 'Please enter skill.'));
     $yearsofexp = new Zend_Form_Element_Text('yearsofexp');
     $yearsofexp->setAttrib('maxLength', 5);
     $yearsofexp->addFilter(new Zend_Filter_StringTrim());
     $yearsofexp->setRequired(true);
     $yearsofexp->addValidator('NotEmpty', false, array('messages' => 'Please enter years of experience.'));
     $yearsofexp->addValidators(array(array('validator' => 'Regex', 'breakChainOnFailure' => true, 'options' => array('pattern' => '/^[0-9]\\d{0,1}(\\.\\d*)?$/', 'messages' => array('regexNotMatch' => 'Please enter numbers less than 100.')))));
     $competencylevelid = new Zend_Form_Element_Select('competencylevelid');
     $competencylevelid->setRequired(true)->addErrorMessage('Please select competency level.');
     $competencylevelid->addValidator('NotEmpty', false, array('messages' => 'Please select competency level.'));
     $competencylevelid->setRegisterInArrayValidator(false);
     $year_skill = new ZendX_JQuery_Form_Element_DatePicker('year_skill_last_used');
     $year_skill->setOptions(array('class' => 'brdr_none'));
     $year_skill->setAttrib('readonly', 'true');
     $year_skill->setAttrib('onfocus', 'this.blur()');
     $submit = new Zend_Form_Element_Submit('submit');
     $submit->setAttrib('id', 'submitbutton');
     $submit->setLabel('Save');
     $this->addElements(array($id, $userid, $skillname, $yearsofexp, $competencylevelid, $year_skill, $submit));
     $this->setElementDecorators(array('ViewHelper'));
     $this->setElementDecorators(array('UiWidgetElement'), array('year_skill_last_used'));
 }
开发者ID:uskumar33,项目名称:DeltaONE,代码行数:35,代码来源:empskills.php

示例3: init

 public function init()
 {
     $this->setMethod('post');
     $this->setAttrib('id', 'formid');
     $this->setAttrib('name', 'businessunitsreport');
     $this->setAttrib('action', BASE_URL . 'reports/businessunits');
     $bunitname = new Zend_Form_Element_Text('bunitname');
     $bunitname->setLabel('Business Unit');
     $bunitname->setAttrib('onblur', 'clearbuname(this)');
     $bunitcode = new Zend_Form_Element_Text('bunitcode');
     $bunitcode->setLabel('Code');
     $bunitcode->setAttrib('onblur', 'clearbuname(this)');
     $bunitcode->setAttrib('class', 'selectoption');
     $startdate = new ZendX_JQuery_Form_Element_DatePicker('startdate');
     $startdate->setLabel('Started On');
     $startdate->setAttrib('readonly', 'true');
     $startdate->setOptions(array('class' => 'brdr_none'));
     $start_date = new ZendX_JQuery_Form_Element_DatePicker('start_date');
     $start_date->setAttrib('readonly', 'true');
     $start_date->setAttrib('onfocus', 'this.blur()');
     $start_date->setOptions(array('class' => 'brdr_none'));
     $country = new Zend_Form_Element_Select('country');
     $country->setLabel('Country');
     $this->addElements(array($bunitname, $bunitcode, $startdate, $country));
     $this->setElementDecorators(array('ViewHelper'));
     $this->setElementDecorators(array('UiWidgetElement'), array('startdate'));
 }
开发者ID:rajbrt,项目名称:sentrifugo,代码行数:27,代码来源:businessunitsreport.php

示例4: init

 public function init()
 {
     $this->setMethod('post');
     $this->setAttrib('id', 'formid');
     $this->setAttrib('name', 'leavereport');
     $id = new Zend_Form_Element_Hidden('id');
     $employeename = new Zend_Form_Element_Text('employeename');
     $employeename->setLabel('Leave Applied By');
     $employeename->setAttrib('onblur', 'clearautocompletename(this)');
     $department = new Zend_Form_Element_Select('department');
     $department->setLabel('Department');
     $department->addMultiOption('', 'Select Department');
     $department->setAttrib('class', 'selectoption');
     $department->setRegisterInArrayValidator(false);
     $leavestatus = new Zend_Form_Element_Select('leavestatus');
     $leavestatus->setLabel('Leave Status');
     $leavestatus->setMultiOptions(array('' => 'Select Leave Status', '1' => 'Pending for approval', '2' => 'Approved', '3' => 'Rejected', '4' => 'Cancel'));
     $leavestatus->setRegisterInArrayValidator(false);
     $from_date = new ZendX_JQuery_Form_Element_DatePicker('from_date');
     $from_date->setLabel('Applied Date');
     $from_date->setAttrib('readonly', 'true');
     $from_date->setAttrib('onfocus', 'this.blur()');
     $from_date->setOptions(array('class' => 'brdr_none'));
     $submit = new Zend_Form_Element_Submit('submit');
     $submit->setAttrib('id', 'submitbutton');
     $submit->setLabel('Save');
     $this->addElements(array($id, $employeename, $department, $leavestatus, $from_date, $submit));
     $this->setElementDecorators(array('ViewHelper'));
     $this->setElementDecorators(array('UiWidgetElement'), array('from_date'));
 }
开发者ID:lukkyrich,项目名称:sentrifugo,代码行数:30,代码来源:leavereport.php

示例5: init

 public function init()
 {
     $this->setMethod('post');
     $this->setAttrib('id', 'formid');
     $this->setAttrib('name', 'departmentsreport');
     $this->setAttrib('action', BASE_URL . 'reports/departments');
     $deptname = new Zend_Form_Element_Text('deptname');
     $deptname->setLabel('Department');
     $deptname->setAttrib('onblur', 'clearautocompletenames(this)');
     $dcode = new Zend_Form_Element_Text('dcode');
     $dcode->setLabel('Code');
     $dcode->setAttrib('class', 'selectoption');
     $dcode->addValidator("regex", true, array('pattern' => '/^([a-zA-Z0-9.\\-]+ ?)+$/', 'messages' => array('regexNotMatch' => 'Please enter only alpha numeric characters.')));
     $dcode->setAttrib('onblur', 'clearautocompletenames(this)');
     $bname = new Zend_Form_Element_Text('bname');
     $bname->setLabel('Business Unit');
     $bname->addValidator("regex", true, array('pattern' => '/^([a-zA-Z.\\-]+ ?)+$/', 'messages' => array('regexNotMatch' => 'Please enter only alphabets.')));
     $bname->setAttrib('onblur', 'clearautocompletenames(this)');
     $startdate = new ZendX_JQuery_Form_Element_DatePicker('startdate');
     $startdate->setLabel('Started On');
     $startdate->setAttrib('readonly', 'true');
     $startdate->setOptions(array('class' => 'brdr_none'));
     $country = new Zend_Form_Element_Select('country');
     $country->setLabel('Country');
     $this->addElements(array($deptname, $dcode, $bname, $startdate, $country));
     $this->setElementDecorators(array('ViewHelper'));
     $this->setElementDecorators(array('UiWidgetElement'), array('startdate'));
 }
开发者ID:rajbrt,项目名称:sentrifugo,代码行数:28,代码来源:departmentsreport.php

示例6: init

 public function init()
 {
     $this->setMethod('post');
     $this->setAttrib('id', 'formid');
     $this->setAttrib('name', 'emppersonaldetails');
     $id = new Zend_Form_Element_Hidden('id');
     $userid = new Zend_Form_Element_Hidden('user_id');
     $genderid = new Zend_Form_Element_Select('genderid');
     $genderid->addMultiOption('', 'Select Gender');
     $genderid->setRegisterInArrayValidator(false);
     $genderid->setRequired(true);
     $genderid->addValidator('NotEmpty', false, array('messages' => 'Please select gender.'));
     $maritalstatusid = new Zend_Form_Element_Select('maritalstatusid');
     $maritalstatusid->addMultiOption('', 'Select Marital Status');
     $maritalstatusid->setRegisterInArrayValidator(false);
     $maritalstatusid->setRequired(true);
     $maritalstatusid->addValidator('NotEmpty', false, array('messages' => 'Please select marital status.'));
     $ethniccodeid = new Zend_Form_Element_Select('ethniccodeid');
     $ethniccodeid->addMultiOption('', 'Select Ethnic Code');
     $ethniccodeid->setLabel('Ethnic Code');
     $ethniccodeid->setRegisterInArrayValidator(false);
     $racecodeid = new Zend_Form_Element_Select('racecodeid');
     $racecodeid->addMultiOption('', 'Select Race Code');
     $racecodeid->setLabel('Race Code');
     $racecodeid->setRegisterInArrayValidator(false);
     $languageid = new Zend_Form_Element_Select('languageid');
     $languageid->addMultiOption('', 'Select Language');
     $languageid->setLabel('Language');
     $languageid->setRegisterInArrayValidator(false);
     $nationalityid = new Zend_Form_Element_Select('nationalityid');
     $nationalityid->addMultiOption('', 'Select Nationality');
     $nationalityid->setRegisterInArrayValidator(false);
     $nationalityid->setRequired(true);
     $nationalityid->addValidator('NotEmpty', false, array('messages' => 'Please select nationality.'));
     $dob = new ZendX_JQuery_Form_Element_DatePicker('dob');
     $dob->setOptions(array('class' => 'brdr_none'));
     $dob->setRequired(true);
     $dob->setAttrib('readonly', 'true');
     $dob->setAttrib('onfocus', 'this.blur()');
     $dob->addValidator('NotEmpty', false, array('messages' => 'Please select date of birth.'));
     //DOB should not be current date....
     $celebrated_dob = new ZendX_JQuery_Form_Element_DatePicker('celebrated_dob');
     $celebrated_dob->setOptions(array('class' => 'brdr_none'));
     $celebrated_dob->setAttrib('readonly', 'true');
     $celebrated_dob->setAttrib('onfocus', 'this.blur()');
     $bloodgroup = new Zend_Form_Element_Text('bloodgroup');
     $bloodgroup->setAttrib('size', 5);
     $bloodgroup->setAttrib('maxlength', 10);
     /*$submit = new Zend_Form_Element_Submit('submit');
     		$submit->setAttrib('id', 'submitbutton');
     		$submit->setLabel('Save');*/
     $submitadd = new Zend_Form_Element_Button('submitbutton');
     $submitadd->setAttrib('id', 'submitbuttons');
     $submitadd->setAttrib('onclick', 'validatedocumentonsubmit(this)');
     $submitadd->setLabel('Save');
     $this->addElements(array($id, $userid, $genderid, $maritalstatusid, $nationalityid, $ethniccodeid, $racecodeid, $languageid, $dob, $celebrated_dob, $bloodgroup, $submitadd));
     $this->setElementDecorators(array('ViewHelper'));
     $this->setElementDecorators(array('UiWidgetElement'), array('dob', 'celebrated_dob'));
 }
开发者ID:rajbrt,项目名称:sentrifugo,代码行数:59,代码来源:emppersonaldetails.php

示例7: init

 public function init()
 {
     $this->setMethod('post');
     $this->setAttrib('id', 'formid');
     $this->setAttrib('name', 'empsalarydetails');
     $id = new Zend_Form_Element_Hidden('id');
     $userid = new Zend_Form_Element_Hidden('user_id');
     $currencyid = new Zend_Form_Element_Select('currencyid');
     $currencyid->setLabel('Salary Currency');
     $currencyid->setRegisterInArrayValidator(false);
     $salarytype = new Zend_Form_Element_Select('salarytype');
     $salarytype->setLabel("Pay Frequency");
     $salarytype->setAttrib('id', 'jobpayfrequency');
     //$salarytype->setAttrib('onchange', 'changesalarytext(this)');
     $salarytype->setRegisterInArrayValidator(false);
     /* $salarytype->setMultiOptions(array(	
        '' => 'Select Salary Type',
        '1'=>'Yearly' ,
        '2'=>'Hourly',
        )); */
     $salary = new Zend_Form_Element_Text('salary');
     $salary->setLabel("Salary");
     $salary->setAttrib('maxLength', 8);
     $salary->addFilter(new Zend_Filter_StringTrim());
     $salary->addValidators(array(array('validator' => 'Regex', 'breakChainOnFailure' => true, 'options' => array('pattern' => '/^[0-9\\.]*$/', 'messages' => array('regexNotMatch' => 'Please enter only numbers.')))));
     $bankname = new Zend_Form_Element_Text('bankname');
     $bankname->setAttrib('maxlength', 40);
     $bankname->setLabel('Bank Name');
     $bankname->addFilters(array('StringTrim'));
     $bankname->addValidator("regex", true, array('pattern' => '/^[a-zA-Z][a-zA-Z0-9\\-\\. ]*$/', 'messages' => array('regexNotMatch' => 'Please enter valid bank name.')));
     $accountholder_name = new Zend_Form_Element_Text('accountholder_name');
     $accountholder_name->setAttrib('maxlength', 40);
     $accountholder_name->setLabel('Account Holder Name');
     $accountholder_name->addFilters(array('StringTrim'));
     $accountholder_name->addValidators(array(array('validator' => 'Regex', 'breakChainOnFailure' => true, 'options' => array('pattern' => '/^[a-zA-Z\\s]+$/i', 'messages' => array('regexNotMatch' => 'Please enter only alphabets.')))));
     $accountholding = new ZendX_JQuery_Form_Element_DatePicker('accountholding');
     $accountholding->setLabel('Account Holding Since');
     $accountholding->setAttrib('readonly', 'true');
     $accountholding->setAttrib('onfocus', 'this.blur()');
     $accountholding->setOptions(array('class' => 'brdr_none'));
     $accountclasstypeid = new Zend_Form_Element_Select('accountclasstypeid');
     $accountclasstypeid->setLabel('Account Class Type');
     $accountclasstypeid->setRegisterInArrayValidator(false);
     $bankaccountid = new Zend_Form_Element_Select('bankaccountid');
     $bankaccountid->setLabel('Account Type');
     $bankaccountid->setRegisterInArrayValidator(false);
     $accountnumber = new Zend_Form_Element_Text('accountnumber');
     $accountnumber->setAttrib('maxlength', 20);
     $accountnumber->setLabel('Account Number');
     $accountnumber->addFilters(array('StringTrim'));
     $accountnumber->addValidator("regex", true, array('pattern' => '/^[a-zA-Z0-9 ]*$/', 'messages' => array('regexNotMatch' => 'Please enter only alphanumeric characters.')));
     $submit = new Zend_Form_Element_Submit('submit');
     $submit->setAttrib('id', 'submitbutton');
     $submit->setLabel('Save');
     $this->addElements(array($id, $userid, $currencyid, $salarytype, $salary, $bankname, $accountholder_name, $accountholding, $accountclasstypeid, $bankaccountid, $accountnumber, $submit));
     $this->setElementDecorators(array('ViewHelper'));
     $this->setElementDecorators(array('UiWidgetElement'), array('accountholding'));
 }
开发者ID:uskumar33,项目名称:DeltaONE,代码行数:58,代码来源:empsalarydetails.php

示例8: init

 public function init()
 {
     $this->setMethod('post');
     $this->setAttrib('id', 'formid');
     $this->setAttrib('name', 'workeligibilitydetails');
     $id = new Zend_Form_Element_Hidden('id');
     $userid = new Zend_Form_Element_Hidden('user_id');
     $emptyflag = new Zend_Form_Element_Hidden('emptyFlag');
     $issuingauthflag = new Zend_Form_Element_Hidden('issuingauthflag');
     //Document type Id....
     $docType = new Zend_Form_Element_Select('documenttype_id');
     $docType->setRegisterInArrayValidator(false);
     $docType->setAttrib('onchange', 'checkissuingauthority(this)');
     $docType->addMultiOption('', 'Select Document Type');
     //Document Issue Date...
     $doc_issue_date = new ZendX_JQuery_Form_Element_DatePicker('doc_issue_date');
     $doc_issue_date->setOptions(array('class' => 'brdr_none'));
     $doc_issue_date->setAttrib('readonly', 'true');
     $doc_issue_date->setAttrib('onfocus', 'this.blur()');
     // Document Expiry Date...
     $doc_expiry_date = new ZendX_JQuery_Form_Element_DatePicker('doc_expiry_date');
     $doc_expiry_date->setAttrib('readonly', 'true');
     $doc_expiry_date->setAttrib('onfocus', 'this.blur()');
     $doc_expiry_date->setOptions(array('class' => 'brdr_none'));
     // Expiration Date should be greater than today's date...
     // issuing authority name...
     $issueAuth_name = new Zend_Form_Element_Text('issuingauth_name');
     $issueAuth_name->setAttrib('maxLength', 50);
     $issueAuth_name->addFilter(new Zend_Filter_StringTrim());
     $issueAuth_name->addValidators(array(array('validator' => 'Regex', 'breakChainOnFailure' => true, 'options' => array('pattern' => '/^[a-zA-Z][a-zA-Z0-9\\-\\&\\s]+$/i', 'messages' => array('regexNotMatch' => 'Please enter valid name.')))));
     //issuing authority country.....
     $country = new Zend_Form_Element_Select('issuingauth_country');
     $country->setAttrib('onchange', 'displayParticularState(this,"","issuingauth_state","")');
     $country->setRegisterInArrayValidator(false);
     //issuing authority state.....
     $state = new Zend_Form_Element_Select('issuingauth_state');
     $state->setAttrib('onchange', 'displayParticularCity(this,"","issuingauth_city","")');
     $state->setRegisterInArrayValidator(false);
     $state->addMultiOption('', 'Select State');
     //issuing authority city.....
     $city = new Zend_Form_Element_Select('issuingauth_city');
     $city->setRegisterInArrayValidator(false);
     $city->addMultiOption('', 'Select City');
     //issuing authority postal code .....
     $issuingAuth_pcode = new Zend_Form_Element_Text('issuingauth_postalcode');
     $issuingAuth_pcode->addFilter(new Zend_Filter_StringTrim());
     $issuingAuth_pcode->setAttrib("maxlength", 10);
     $issuingAuth_pcode->addValidators(array(array('StringLength', false, array('min' => 3, 'max' => 10, 'messages' => array(Zend_Validate_StringLength::TOO_LONG => 'Issuing authority postal code must contain at most %max% characters.', Zend_Validate_StringLength::TOO_SHORT => 'Issuing authority postal code must contain at least %min% characters.')))));
     $issuingAuth_pcode->addValidators(array(array('validator' => 'Regex', 'breakChainOnFailure' => true, 'options' => array('pattern' => '/^(?!0{3})[0-9a-zA-Z]+$/', 'messages' => array('regexNotMatch' => 'Please enter valid postal code.')))));
     // Form Submit .........
     $submit = new Zend_Form_Element_Submit('submit');
     $submit->setAttrib('id', 'submitbutton');
     $submit->setLabel('Save');
     $this->addElements(array($id, $userid, $issuingauthflag, $docType, $doc_issue_date, $doc_expiry_date, $issueAuth_name, $country, $state, $city, $issuingAuth_pcode, $emptyflag, $submit));
     $this->setElementDecorators(array('ViewHelper'));
     $this->setElementDecorators(array('UiWidgetElement'), array('doc_issue_date', 'doc_expiry_date'));
 }
开发者ID:lukkyrich,项目名称:sentrifugo,代码行数:57,代码来源:Workeligibilitydetails.php

示例9: init

 public function init()
 {
     $this->setMethod('post');
     $this->setAttrib('id', 'formid');
     $this->setAttrib('name', 'empjobhistory');
     $id = new Zend_Form_Element_Hidden('id');
     $userid = new Zend_Form_Element_Hidden('user_id');
     $positionheld = new Zend_Form_Element_Select('positionheld');
     $positionheld->setLabel('Position');
     $positionheld->setRegisterInArrayValidator(false);
     // $positionheld->setRequired(true);
     // $positionheld->addValidator('NotEmpty', false, array('messages' => 'Please select position.'));
     $department = new Zend_Form_Element_Select('department');
     $department->setLabel('Department');
     $department->setRegisterInArrayValidator(false);
     // $department->setRequired(true);
     // $department->addValidator('NotEmpty', false, array('messages' => 'Please select department.'));
     $jobtitleid = new Zend_Form_Element_Select('jobtitleid');
     $jobtitleid->setLabel('Job Title');
     $jobtitleid->setRegisterInArrayValidator(false);
     // $jobtitleid->setRequired(true);
     // $jobtitleid->addValidator('NotEmpty', false, array('messages' => 'Please select job title.'));
     $start_date = new ZendX_JQuery_Form_Element_DatePicker('start_date');
     $start_date->setLabel('From');
     $start_date->setOptions(array('class' => 'brdr_none'));
     $start_date->setAttrib('readonly', 'true');
     $start_date->setAttrib('onfocus', 'this.blur()');
     $start_date->setRequired(true);
     $start_date->addValidator('NotEmpty', false, array('messages' => 'Please enter start date.'));
     $end_date = new ZendX_JQuery_Form_Element_DatePicker('end_date');
     $end_date->setLabel('To');
     $end_date->setOptions(array('class' => 'brdr_none'));
     $end_date->setAttrib('readonly', 'true');
     $end_date->setAttrib('onfocus', 'this.blur()');
     $received_amount = new Zend_Form_Element_Text("received_amount");
     $received_amount->setLabel("Amount Received");
     $received_amount->setAttrib('maxLength', 10);
     $received_amount->addValidators(array(array('validator' => 'Regex', 'breakChainOnFailure' => true, 'options' => array('pattern' => '/^[0-9\\.]*$/', 'messages' => array('regexNotMatch' => 'Please enter only numbers.')))));
     $paid_amount = new Zend_Form_Element_Text("paid_amount");
     $paid_amount->setLabel("Amount Paid");
     $paid_amount->setAttrib('maxLength', 10);
     $paid_amount->addValidators(array(array('validator' => 'Regex', 'breakChainOnFailure' => true, 'options' => array('pattern' => '/^[0-9\\.]*$/', 'messages' => array('regexNotMatch' => 'Please enter only numbers.')))));
     $client = new Zend_Form_Element_Select('client');
     $client->setLabel('Client');
     $client->setRegisterInArrayValidator(false);
     $client->setRequired(true);
     $client->addValidator('NotEmpty', false, array('messages' => 'Please select a client.'));
     $vendor = new Zend_Form_Element_Text("vendor");
     $vendor->setLabel("Vendor");
     $vendor->addValidator("regex", true, array('pattern' => '/^[a-zA-Z.&\\- ?]+$/', 'messages' => array('regexNotMatch' => 'Please enter a valid vendor name.')));
     $submit = new Zend_Form_Element_Submit('submit');
     $submit->setAttrib('id', 'submitbutton');
     $submit->setLabel('Save');
     $this->addElements(array($id, $userid, $positionheld, $jobtitleid, $department, $start_date, $end_date, $received_amount, $paid_amount, $client, $vendor, $submit));
     $this->setElementDecorators(array('ViewHelper'));
     $this->setElementDecorators(array('UiWidgetElement'), array('start_date', 'end_date'));
 }
开发者ID:rajbrt,项目名称:sentrifugo,代码行数:57,代码来源:empjobhistory.php

示例10: init

 public function init()
 {
     $this->setMethod('post');
     $this->setAttrib('id', 'formid');
     $this->setAttrib('name', 'educationdetails');
     $this->setAttrib('action', DOMAIN . 'educationdetails/addpopup/');
     $id = new Zend_Form_Element_Hidden('id');
     $user_id = new Zend_Form_Element_Hidden('user_id');
     $educationlevel = new Zend_Form_Element_Select('educationlevel');
     $educationlevel->setLabel("Education Level");
     $educationlevel->setRegisterInArrayValidator(false);
     $educationlevel->setRequired(true);
     $educationlevel->addValidator('NotEmpty', false, array('messages' => 'Please select educational level.'));
     //institution_name ...
     $institution_name = new Zend_Form_Element_Text('institution_name');
     $institution_name->addFilter(new Zend_Filter_StringTrim());
     $institution_name->setRequired(true);
     $institution_name->setAttrib("maxlength", 50);
     $institution_name->addValidator('NotEmpty', false, array('messages' => 'Please enter institution name.'));
     $institution_name->addValidators(array(array('validator' => 'Regex', 'breakChainOnFailure' => true, 'options' => array('pattern' => '/^[a-zA-Z\\s]+$/i', 'messages' => array('regexNotMatch' => 'Please enter only alphabets.')))));
     //course ...
     $course = new Zend_Form_Element_Text('course');
     $course->addFilter(new Zend_Filter_StringTrim());
     $course->setRequired(true);
     $course->setAttrib("maxlength", 50);
     $course->addValidator('NotEmpty', false, array('messages' => 'Please enter course name.'));
     $course->addValidators(array(array('validator' => 'Regex', 'breakChainOnFailure' => true, 'options' => array('pattern' => '/^[a-zA-Z0-9\\-\\.\\s]+$/i', 'messages' => array('regexNotMatch' => 'Please enter valid course name.')))));
     //from_date..
     $from_date = new ZendX_JQuery_Form_Element_DatePicker('from_date');
     $from_date->setOptions(array('class' => 'brdr_none'));
     $from_date->setRequired(true);
     $from_date->setAttrib('readonly', 'true');
     $from_date->setAttrib('onfocus', 'this.blur()');
     $from_date->addValidator('NotEmpty', false, array('messages' => 'Please select from date.'));
     //to_date
     $to_date = new ZendX_JQuery_Form_Element_DatePicker('to_date');
     $to_date->setOptions(array('class' => 'brdr_none'));
     $to_date->setRequired(true);
     $to_date->setAttrib('readonly', 'true');
     $to_date->setAttrib('onfocus', 'this.blur()');
     $to_date->addValidator('NotEmpty', false, array('messages' => 'Please select to date.'));
     // percentage...
     $percentage = new Zend_Form_Element_Text('percentage');
     $percentage->addFilter(new Zend_Filter_StringTrim());
     $percentage->setRequired(true);
     $percentage->setAttrib("maxlength", 2);
     $percentage->addValidator('NotEmpty', false, array('messages' => 'Please enter percentage.'));
     $percentage->addValidator("regex", true, array('pattern' => '/^[0-9]+$/', 'messages' => array('regexNotMatch' => 'Please enter only numbers.')));
     //Form Submit....
     $submit = new Zend_Form_Element_Submit('submit');
     $submit->setAttrib('id', 'submitbutton');
     $submit->setLabel('Save');
     $this->addElements(array($id, $user_id, $educationlevel, $from_date, $to_date, $percentage, $course, $institution_name, $submit));
     $this->setElementDecorators(array('ViewHelper'));
     $this->setElementDecorators(array('UiWidgetElement'), array('from_date', 'to_date'));
 }
开发者ID:uskumar33,项目名称:DeltaONE,代码行数:56,代码来源:Educationdetails.php

示例11: init

 public function init()
 {
     $this->setMethod('post');
     $this->setAttrib('id', 'formid');
     $this->setAttrib('name', 'trainingandcertificationdetails');
     $id = new Zend_Form_Element_Hidden('id');
     $user_id = new Zend_Form_Element_Hidden('user_id');
     //course_name ...
     $course_name = new Zend_Form_Element_Text('course_name');
     $course_name->addFilter(new Zend_Filter_StringTrim());
     $course_name->setRequired(true);
     $course_name->setAttrib('maxLength', 50);
     $course_name->addValidator('NotEmpty', false, array('messages' => 'Please enter course name.'));
     $course_name->addValidators(array(array('validator' => 'Regex', 'breakChainOnFailure' => true, 'options' => array('pattern' => '/^[a-zA-Z0-9\\-\\s]+$/i', 'messages' => array('regexNotMatch' => 'Please enter valid course name.')))));
     // course_level...
     $course_level = new Zend_Form_Element_Text('course_level');
     $course_level->addFilter(new Zend_Filter_StringTrim());
     $course_level->setRequired(true);
     $course_level->setAttrib('maxLength', 50);
     $course_level->addValidator('NotEmpty', false, array('messages' => 'Please enter course level.'));
     $course_level->addValidators(array(array('validator' => 'Regex', 'breakChainOnFailure' => true, 'options' => array('pattern' => '/^[a-zA-Z0-9\\.\\-\\s]+$/i', 'messages' => array('regexNotMatch' => 'Please enter valid course level.')))));
     //issued_date
     $issued_date = new ZendX_JQuery_Form_Element_DatePicker('issued_date');
     $issued_date->setOptions(array('class' => 'brdr_none'));
     $issued_date->setAttrib('readonly', 'true');
     $issued_date->setAttrib('onfocus', 'this.blur()');
     // description ....
     $description = new Zend_Form_Element_Textarea('description');
     $description->setAttrib('rows', 10);
     $description->setAttrib('cols', 50);
     //course_offered_by ....
     $course_offered_by = new Zend_Form_Element_Text('course_offered_by');
     $course_offered_by->addFilter(new Zend_Filter_StringTrim());
     $course_offered_by->setRequired(true);
     $course_offered_by->setAttrib('maxLength', 50);
     $course_offered_by->addValidator('NotEmpty', false, array('messages' => 'Please enter course offered by.'));
     $course_offered_by->addValidators(array(array('validator' => 'Regex', 'breakChainOnFailure' => true, 'options' => array('pattern' => '/^[a-zA-Z0-9\\-\\s]+$/i', 'messages' => array('regexNotMatch' => 'Please enter valid name.')))));
     //Referer mobile number ....
     $certification_name = new Zend_Form_Element_Text('certification_name');
     $certification_name->addFilter(new Zend_Filter_StringTrim());
     $certification_name->setAttrib('maxLength', 50);
     $certification_name->addValidators(array(array('validator' => 'Regex', 'breakChainOnFailure' => true, 'options' => array('pattern' => '/^[a-zA-z0-9\\-\\#\\.\\s]+$/i', 'messages' => array('regexNotMatch' => 'Please enter valid certification name.')))));
     $certificationNameStr = Zend_Controller_Front::getInstance()->getRequest()->getParam('certification_name', null);
     //If certification is done then should enter the issue date......
     if ($certificationNameStr != "") {
         $issued_date->setRequired(true);
         $issued_date->addValidator('NotEmpty', false, array('messages' => 'Please select date.'));
     }
     //Form Submit....
     $submit = new Zend_Form_Element_Submit('submit');
     $submit->setAttrib('id', 'submitbutton');
     $submit->setLabel('Save');
     $this->addElements(array($id, $user_id, $certification_name, $course_offered_by, $description, $issued_date, $course_level, $course_name, $submit));
     $this->setElementDecorators(array('ViewHelper'));
     $this->setElementDecorators(array('UiWidgetElement'), array('issued_date'));
 }
开发者ID:rajbrt,项目名称:sentrifugo,代码行数:56,代码来源:Trainingandcertificationdetails.php

示例12: init

 public function init()
 {
     $this->setMethod('post');
     $this->setAttrib('id', 'formid');
     $this->setAttrib('name', 'currencyconverter');
     $id = new Zend_Form_Element_Hidden('id');
     $id_val = Zend_Controller_Front::getInstance()->getRequest()->getParam('id');
     $basecurrency = new Zend_Form_Element_Select('basecurrency');
     $basecurrency->setAttrib('class', 'selectoption');
     $basecurrency->addMultiOption('', 'Select base currency');
     $basecurrency->setAttrib('onchange', 'displayTargetCurrency(this)');
     $basecurrency->setRegisterInArrayValidator(false);
     $basecurrency->setRequired(true);
     $basecurrency->addValidator('NotEmpty', false, array('messages' => 'Please select base currency.'));
     $targetcurrency = new Zend_Form_Element_Select('targetcurrency');
     $targetcurrency->setAttrib('class', 'selectoption');
     $targetcurrency->addMultiOption('', 'Select target currency');
     $targetcurrency->setRegisterInArrayValidator(false);
     $targetcurrency->setRequired(true);
     $targetcurrency->addValidator('NotEmpty', false, array('messages' => 'Please select target currency.'));
     if ($id_val == '') {
         $targetcurrency->addValidator(new Zend_Validate_Db_NoRecordExists(array('table' => 'main_currencyconverter', 'field' => 'targetcurrency', 'exclude' => 'basecurrency="' . Zend_Controller_Front::getInstance()->getRequest()->getParam('basecurrency') . '" AND targetcurrency="' . Zend_Controller_Front::getInstance()->getRequest()->getParam('targetcurrency') . '" and isactive=1')));
         $targetcurrency->getValidator('Db_NoRecordExists')->setMessage('Currency combination already exists.');
     }
     $exchangerate = new Zend_Form_Element_Text("exchangerate");
     $exchangerate->setAttrib('maxLength', 15);
     $exchangerate->addFilter(new Zend_Filter_StringTrim());
     $exchangerate->setRequired(true);
     $exchangerate->addValidator('NotEmpty', false, array('messages' => 'Please enter exchange rate.'));
     $exchangerate->addValidator("regex", false, array("/^[0-9]+(\\.[0-9]{1,6})?\$/", "messages" => "Please enter valid exchange rate."));
     $start_date = new ZendX_JQuery_Form_Element_DatePicker('start_date');
     $start_date->setAttrib('readonly', 'true');
     $start_date->setAttrib('onfocus', 'this.blur()');
     $start_date->setOptions(array('class' => 'brdr_none'));
     $start_date->setRequired(true);
     $start_date->addValidator('NotEmpty', false, array('messages' => 'Please select start date.'));
     $end_date = new ZendX_JQuery_Form_Element_DatePicker('end_date');
     $end_date->setAttrib('readonly', 'true');
     $end_date->setAttrib('onfocus', 'this.blur()');
     $end_date->setOptions(array('class' => 'brdr_none'));
     $end_date->setRequired(true);
     $end_date->addValidator('NotEmpty', false, array('messages' => 'Please select end 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, $basecurrency, $targetcurrency, $exchangerate, $start_date, $end_date, $description, $submit));
     $this->setElementDecorators(array('ViewHelper'));
     $this->setElementDecorators(array('UiWidgetElement'), array('start_date', 'end_date'));
 }
开发者ID:uskumar33,项目名称:DeltaONE,代码行数:53,代码来源:currencyconverter.php

示例13: init

 public function init()
 {
     $this->setMethod('post');
     $this->setAttrib('id', 'formid');
     $this->setAttrib('name', 'creditcarddetails');
     $id = new Zend_Form_Element_Hidden('id');
     $user_id = new Zend_Form_Element_Hidden('user_id');
     //Card Type....(only alphabets)
     $cardType = new Zend_Form_Element_Text('card_type');
     $cardType->addFilter(new Zend_Filter_StringTrim());
     $cardType->setAttrib('maxLength', 50);
     $cardType->addValidators(array(array('StringLength', false, array('min' => 2, 'max' => 50, 'messages' => array(Zend_Validate_StringLength::TOO_LONG => 'Card type must contain at most %max% characters.', Zend_Validate_StringLength::TOO_SHORT => 'Card type must contain at least %min% characters.')))));
     $cardType->addValidators(array(array('validator' => 'Regex', 'breakChainOnFailure' => true, 'options' => array('pattern' => '/^[a-zA-Z\\s]+$/i', 'messages' => array('regexNotMatch' => 'Please enter only alphabets.')))));
     //Card Number....
     $cardNum = new Zend_Form_Element_Text('card_number');
     $cardNum->addFilters(array('StringTrim', 'StripTags'));
     $cardNum->setAttrib("maxlength", 16);
     $cardNum->addValidators(array(array('StringLength', false, array('min' => 16, 'max' => 16, 'messages' => array(Zend_Validate_StringLength::TOO_LONG => 'Card number must contain at most %max% characters.', Zend_Validate_StringLength::TOO_SHORT => 'Card number must contain at least %min% characters.')))));
     $cardNum->addValidator(new Zend_Validate_Db_NoRecordExists(array('table' => 'main_empcreditcarddetails', 'field' => 'card_number', 'exclude' => 'id!="' . Zend_Controller_Front::getInstance()->getRequest()->getParam('id') . '"')));
     $cardNum->getValidator('Db_NoRecordExists')->setMessage('Card number already exists.');
     $cardNum->addValidators(array(array('validator' => 'Regex', 'breakChainOnFailure' => true, 'options' => array('pattern' => '/^[0-9]+$/i', 'messages' => array('regexNotMatch' => 'Please enter only numbers.')))));
     //Name on the card .... (only Alphabets)
     $nameoncard = new Zend_Form_Element_Text('nameoncard');
     $nameoncard->addFilter(new Zend_Filter_StringTrim());
     $nameoncard->setAttrib('maxLength', 50);
     $nameoncard->addValidators(array(array('validator' => 'Regex', 'breakChainOnFailure' => true, 'options' => array('pattern' => '/^[a-zA-Z\\s]+$/i', 'messages' => array('regexNotMatch' => 'Please enter only alphabets.')))));
     // Card Expiration Date ....
     $card_expired_date = new ZendX_JQuery_Form_Element_DatePicker('card_expiration');
     $card_expired_date->setOptions(array('class' => 'brdr_none'));
     $card_expired_date->setAttrib('readonly', 'true');
     $card_expired_date->setAttrib('onfocus', 'this.blur()');
     // Expiration Date should be greater than today's date...
     $card_expired_date->addValidator(new sapp_DateGreaterThanToday());
     //Card Code ...
     $card_code = new Zend_Form_Element_Text('card_code');
     $card_code->addFilter(new Zend_Filter_StringTrim());
     $card_code->setAttrib('maxLength', 4);
     $card_code->addValidators(array(array('StringLength', false, array('min' => 3, 'max' => 4, 'messages' => array(Zend_Validate_StringLength::TOO_LONG => 'Card code must contain at most %max% characters.', Zend_Validate_StringLength::TOO_SHORT => 'Card code must contain at least %min% characters.')))));
     $card_code->addValidators(array(array('validator' => 'Regex', 'breakChainOnFailure' => true, 'options' => array('pattern' => '/^[0-9]+$/i', 'messages' => array('regexNotMatch' => 'Please enter only numbers.')))));
     //Card issued by....(company name)
     $card_issuedBy = new Zend_Form_Element_Text('card_issuedby');
     $card_issuedBy->addFilter(new Zend_Filter_StringTrim());
     $card_issuedBy->setAttrib('maxLength', 50);
     $card_issuedBy->addValidators(array(array('validator' => 'Regex', 'breakChainOnFailure' => true, 'options' => array('pattern' => '/^[a-zA-Z\\s]+$/i', 'messages' => array('regexNotMatch' => 'Please enter only alphabets.')))));
     // Form Submit .........
     $submit = new Zend_Form_Element_Submit('submit');
     $submit->setAttrib('id', 'submitbutton');
     $submit->setLabel('Save');
     $this->addElements(array($id, $user_id, $cardType, $cardNum, $nameoncard, $card_expired_date, $card_issuedBy, $card_code, $submit));
     $this->setElementDecorators(array('ViewHelper'));
     $this->setElementDecorators(array('UiWidgetElement'), array('card_expiration'));
 }
开发者ID:lukkyrich,项目名称:sentrifugo,代码行数:52,代码来源:Creditcarddetails.php

示例14: init

 public function init()
 {
     $this->setMethod('post');
     $this->setAttrib('action', DOMAIN . 'reports/userlogreport');
     $this->setAttrib('id', 'logreport');
     $this->setAttrib('name', 'logreport');
     $emprole = new Zend_Form_Element_Select('emp_role');
     $emprole->setLabel('Employee Role');
     $emprole->setAttrib('onchange', 'changeelement(this)');
     $roleModel = new Default_Model_Roles();
     $roleList = $roleModel->getRolesList_USERLOG();
     $emprole->addMultiOption('', 'Select Employee Role');
     foreach ($roleList as $roleid => $rolename) {
         $emprole->addMultiOption($roleid, $rolename);
     }
     $group = new Zend_Form_Element_Select('group');
     $group->setLabel('Group');
     $group->setAttrib('onchange', 'changeelement(this)');
     $groupModel = new Default_Model_Groups();
     $groupList = $groupModel->getGroupList();
     $group->addMultiOption('', 'Select Group');
     foreach ($groupList as $groupid => $groupname) {
         $group->addMultiOption($groupid, $groupname);
     }
     $employeeId = new Zend_Form_Element_Text('employeeIdf');
     $employeeId->setAttrib('onblur', 'clearautocompleteuserlog(this)');
     $employeeId->addFilter(new Zend_Filter_StringTrim());
     $employeeId->setLabel("Employee ID");
     $username = new Zend_Form_Element_Text('username');
     $username->setAttrib('class', 'formelement');
     $username->setAttrib('onblur', 'clearautocompleteuserlog(this)');
     $username->addFilter(new Zend_Filter_StringTrim());
     $username->setLabel("User Name");
     $emailId = new Zend_Form_Element_Text('emailId');
     $emailId->setAttrib('onblur', 'clearautocompleteuserlog(this)');
     $emailId->addFilter(new Zend_Filter_StringTrim());
     $emailId->setLabel("Email");
     $logindate = new ZendX_JQuery_Form_Element_DatePicker('logindate');
     $logindate->setAttrib('onblur', 'blurelement(this)');
     $logindate->setLabel("Login Date");
     $logindate->setAttrib('readonly', 'true');
     $logindate->setAttrib('onfocus', 'this.blur()');
     $logindate->setOptions(array('class' => 'brdr_none'));
     $ipaddress = new Zend_Form_Element_Text('ipaddress');
     $ipaddress->setAttrib('onblur', 'clearautocompleteuserlog(this)');
     $ipaddress->addFilter(new Zend_Filter_StringTrim());
     $ipaddress->setLabel("Ip Address");
     $this->addElements(array($emprole, $group, $employeeId, $username, $emailId, $logindate, $ipaddress));
     $this->setElementDecorators(array('ViewHelper'));
     $this->setElementDecorators(array('UiWidgetElement'), array('logindate'));
 }
开发者ID:uskumar33,项目名称:DeltaONE,代码行数:51,代码来源:logreport.php

示例15: init

 public function init()
 {
     $this->setMethod('post');
     $this->setAttrib('id', 'formid');
     $this->setAttrib('name', 'dependencydetails');
     $id = new Zend_Form_Element_Hidden('id');
     $user_id = new Zend_Form_Element_Hidden('user_id');
     //Dependent Name ...
     $dependent_name = new Zend_Form_Element_Text('dependent_name');
     $dependent_name->addFilter(new Zend_Filter_StringTrim());
     $dependent_name->setRequired(true);
     $dependent_name->setAttrib("maxlength", 50);
     $dependent_name->addValidator('NotEmpty', false, array('messages' => 'Please enter dependent name.'));
     $dependent_name->addValidators(array(array('validator' => 'Regex', 'breakChainOnFailure' => true, 'options' => array('pattern' => '/^[a-zA-Z\\s]+$/i', 'messages' => array('regexNotMatch' => 'Please enter only alphabets.')))));
     //Disablity Type
     $dependent_relation = new Zend_Form_Element_Select('dependent_relation');
     $dependent_relation->setRequired(true)->addErrorMessage('Please select dependent relation.');
     $dependent_relation->addValidator('NotEmpty', false, array('messages' => 'Please select dependent relation.'));
     //dependent_custody....
     $dependent_custody = new Zend_Form_Element_Select('dependent_custody');
     $dependent_custody->addValidator('NotEmpty', false, array('messages' => 'Please select dependent custody code.'));
     $dependent_custody->setRequired(true)->addErrorMessage('Please select dependent custody code.');
     $dependent_custody->addMultiOptions(array('' => 'Select Dependent Custody Code', 'both parents' => 'Both Parents', 'former spouse' => 'Former Spouse', 'subscriber only' => 'Subscriber Only', 'other Or unknown' => 'Other Or Unknown'));
     //Dependent DOB...
     $dependent_dob = new ZendX_JQuery_Form_Element_DatePicker('dependent_dob');
     $dependent_dob->setOptions(array('class' => 'brdr_none'));
     $dependent_dob->setAttrib('onchange', 'calcDays("dependent_dob","",this,1)');
     $dependent_dob->setRequired(true);
     $dependent_dob->setAttrib('readonly', 'true');
     $dependent_dob->setAttrib('onfocus', 'this.blur()');
     $dependent_dob->addValidator('NotEmpty', false, array('messages' => 'Please select date.'));
     //dependent_age ...
     $dependent_age = new Zend_Form_Element_Text('dependent_age');
     $dependent_age->addFilter(new Zend_Filter_StringTrim());
     $dependent_age->setAttrib("maxlength", 3);
     $dependent_age->setAttrib('readonly', 'true');
     $dependent_age->setAttrib('onfocus', 'this.blur()');
     //Form Submit....
     $submit = new Zend_Form_Element_Submit('submit');
     $submit->setAttrib('id', 'submitbutton');
     $submit->setLabel('Save');
     $this->addElements(array($id, $user_id, $dependent_name, $dependent_relation, $dependent_custody, $dependent_dob, $dependent_age, $submit));
     $this->setElementDecorators(array('ViewHelper'));
     $this->setElementDecorators(array('UiWidgetElement'), array('dependent_dob'));
 }
开发者ID:lukkyrich,项目名称:sentrifugo,代码行数:45,代码来源:Dependencydetails.php


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