コード例 #1
1
ファイル: holidaydates.php プロジェクト: uskumar33/DeltaONE
 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'));
 }
コード例 #2
0
ファイル: Savings.php プロジェクト: maniargaurav/OurBank
 public function __construct($minimumDeposit)
 {
     parent::__construct($minimumDeposit);
     $savings_amount = new Zend_Form_Element_Text('savings_amount');
     $savings_amount->addValidators(array(array('Float'), array('GreaterThan', false, array($minimumDeposit - 0.0001, 'messages' => array('notGreaterThan' => 'Minimum 
                                          Amount To open a savings account =' . $minimumDeposit)))));
     $savings_amount->setAttrib('class', 'txt_put');
     $savings_amount->setAttrib('id', 'amount');
     $savings_amount->setRequired(true);
     $savings_amount->setAttrib('onchange', 'calculateTotalAmount(this.value)');
     $memberfirstname = new Zend_Form_Element_MultiCheckbox('memberfirstname');
     $memberfirstname->setAttrib('class', 'textfield');
     $memberfirstname->setAttrib('id', 'selector');
     //         $memberfirstname->setRequired(true);
     $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);
     $memberId = new Zend_Form_Element_Hidden('memberId');
     $Type = new Zend_Form_Element_Hidden('Type');
     $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, $savings_amount, $memberfirstname, $memberId, $date1, $productId, $typeId, $Type, $memberTypeIdv, $back, $Yes));
 }
コード例 #3
0
ファイル: Savings.php プロジェクト: maniargaurav/OurBank
 public function __construct($minimumDeposit, $ID, $codenum)
 {
     parent::__construct($minimumDeposit, $ID, $codenum);
     //$fieldtype,$fieldname,$table,$columnname,$cssname,$labelname,$required,$validationtype,$min,$max,$rows,$cols,$decorator,$value
     $formfield = new App_Form_Field();
     $amount = $formfield->field('Text', 'amount', '', '', 'txt_put', '', true, '', '', '', '', '', 0, 0);
     $amount->addValidators(array(array('Float'), array('GreaterThan', false, array($minimumDeposit - 0.0001, 'messages' => array('notGreaterThan' => 'Minimum 
                                          Amount To open a savings account =' . $minimumDeposit)))));
     $date = new ZendX_JQuery_Form_Element_DatePicker('date');
     $date->setAttrib('class', 'txt_put');
     $date->setJQueryParam('dateFormat', 'yy-mm-dd');
     $date->setRequired(true);
     $date->setAttrib('size', 12);
     //hidden feilds
     $code = $formfield->field('Hidden', 'code', '', '', '', '', false, '', '', '', '', '', 0, $codenum);
     $Id = $formfield->field('Hidden', 'Id', '', '', '', '', false, '', '', '', '', '', 0, $ID);
     $submit = $formfield->field('Submit', 'Submit', '', '', '', '', false, '', '', '', '', '', 0, 0);
     $Yes = $formfield->field('Submit', 'Yes', '', '', '', '', false, '', '', '', '', '', 0, 0);
     $back = $formfield->field('Submit', 'Back', '', '', '', '', false, '', '', '', '', '', 0, 0);
     $this->addElements(array($submit, $amount, $code, $Id, $date, $back, $Yes));
     if (substr(base64_decode($codenum), 4, 1) == 2 or substr(base64_decode($codenum), 4, 1) == 3) {
         $group = new Zend_Form_Element_MultiCheckbox('group');
         $this->addElements(array($group));
     } else {
         $group = 0;
     }
 }
コード例 #4
0
 public function __construct($accNum)
 {
     parent::__construct($accNum);
     $date = new ZendX_JQuery_Form_Element_DatePicker('date');
     $date->setAttrib('class', '');
     $date->setRequired(true);
     //$fieldtype,$fieldname,$table,$columnname,$cssname,$labelname,$required,$validationtype,$min,$max,$rows,$cols,$decorator,$value
     $formfield = new App_Form_Field();
     $amount = $formfield->field('Text', 'amount', '', '', 'txt_put', '', true, '', '', '', '', '', 0, '');
     $graterthan = new Zend_Validate_GreaterThan(0);
     $amount->setRequired(true)->addValidators(array(array('NotEmpty'), array('Float'), array($graterthan, true)));
     $transactionMode = $formfield->field('Select', 'transactionMode', '', '', 'txt_put', '', true, '', '', '', '', '', 0, '');
     //             $transactionMode->setAttrib('onchange','toggleField();');
     $transactionMode->setAttrib('class', 'paymenttype');
     $transactionMode->setAttrib('id', 'paymenttype');
     $othertext = $formfield->field('Text', 'othertext', '', '', 'txt_put', '', false, '', '', '', '', '', 0, '');
     $transactionModeDetails = $formfield->field('Textarea', 'paymenttype_details', '', '', 'txt_put', '', false, '', '', '', 1, 20, '', 0, '');
     $transactionModeDetails->setAttrib('style', 'display:none');
     $description = $formfield->field('Textarea', 'description', '', '', 'txt_put', '', true, '', '', '', 2, 20, '', 0, '');
     //             $p = $formfield->field('Text','p','','','txt_put','','','','','','','',0,$p);
     //             $p->setAttrib('disable','true');
     //             $int = $formfield->field('Text','int','','','txt_put','','','','','','','',0,$int);
     //             $int->setAttrib('disable','true');
     //             $totalAmt = $formfield->field('Text','totalAmt','','','txt_put','','','','','','','',0,$totalAmt);
     //             $totalAmt->setAttrib('disable','true');
     // hidden feilds
     $totalamount = $formfield->field('Hidden', 'totalamount', '', '', 'total', '', false, '', '', '', '', '', 0, $accNum);
     $accNum = $formfield->field('Hidden', 'accNum', '', '', 'txt_put', '', true, '', '', '', '', '', 0, $accNum);
     $sms = new Zend_Form_Element_Checkbox('sms');
     $submit = new Zend_Form_Element_Submit('Submit');
     $submit->setAttrib('id', 'button');
     $back = new Zend_Form_Element_Submit('Back');
     $back->setAttrib('id', 'button2');
     $this->addElements(array($date, $othertext, $amount, $description, $transactionMode, $transactionModeDetails, $submit, $accNum, $totalamount, $back, $sms));
 }
コード例 #5
0
ファイル: Loans.php プロジェクト: maniargaurav/OurBank
 public function __construct($minimumDeposit, $ID, $code, $app)
 {
     parent::__construct($minimumDeposit, $ID, $code, $app);
     //$fieldtype,$fieldname,$table,$columnname,$cssname,$labelname,$required,$validationtype,$min,$max,$rows,$cols,$decorator,$value
     $formfield = new App_Form_Field();
     $amount = $formfield->field('Text', 'amount', '', '', 'txt_put', '', true, '', '', '', '', '', 0, 0);
     $amount->addValidators(array(array('Float'), array('GreaterThan', false, array($minimumDeposit - 0.0001, 'messages' => array('notGreaterThan' => 'Minimum 
                                   Amount To open a savings account =' . $minimumDeposit)))));
     $date = new ZendX_JQuery_Form_Element_DatePicker('date');
     $date->setAttrib('class', 'txt_put');
     $date->setJQueryParam('dateFormat', 'yy-mm-dd');
     $date->setRequired(true);
     $installments = $formfield->field('Select', 'installments', '', '', 'txt_put', '', true, '', '', '', '', '', 0, 0);
     $installments->setAttrib('onchange', 'getInterests(this.value,"' . $app . '",' . base64_decode($ID) . ')');
     $interest = $formfield->field('Text', 'interest', '', '', 'txt_put', '', true, '', '', '', '', '', 0, 0);
     $interest->setAttrib('size', '6');
     $interest->setAttrib('readonly', 'true');
     $interesttype = $formfield->field('Select', 'interesttype_id', '', '', 'txt_put', '', true, '', '', '', '', '', 0, 0);
     $savingAccount = $formfield->field('Select', 'savingAccount', '', '', 'txt_put', '', true, '', '', '', '', '', 0, 0);
     $fundings = $formfield->field('Select', 'fundings', '', '', 'txt_put', '', true, '', '', '', '', '', 0, 0);
     $fundings->addMultiOption('', 'Select...');
     $fundings->addMultiOption('1', 'funders');
     $fundings->addMultiOption('2', 'group');
     $fundings->setAttrib('onchange', 'displayRow(this.value)');
     $funders = $formfield->field('Radio', 'funders', '', '', 'txt_put', '', true, '', '', '', '', '', 0, 0);
     $funders->setAttrib('size', '8');
     //hidden feilds
     $code = $formfield->field('Hidden', 'code', '', '', '', '', false, '', '', '', '', '', 0, $code);
     $Id = $formfield->field('Hidden', 'Id', '', '', '', '', false, '', '', '', '', '', 0, $ID);
     $submit = $formfield->field('Submit', 'Submit', '', '', '', '', false, '', '', '', '', '', 0, 0);
     $Yes = $formfield->field('Submit', 'Yes', '', '', '', '', false, '', '', '', '', '', 0, 0);
     $back = $formfield->field('Submit', 'Back', '', '', '', '', false, '', '', '', '', '', 0, 0);
     $this->addElements(array($submit, $amount, $installments, $interest, $interesttype, $savingAccount, $fundings, $funders, $code, $Id, $date, $back, $Yes));
 }
コード例 #6
0
ファイル: Deposit.php プロジェクト: maniargaurav/OurBank
 public function __construct($accNum)
 {
     parent::__construct($accNum);
     $date = new ZendX_JQuery_Form_Element_DatePicker('date');
     $date->setAttrib('class', 'txt_put');
     $date->setJQueryParam('dateFormat', 'yy-mm-dd');
     $date->setRequired(true);
     $date->setAttrib('size', 12);
     $date1 = new ZendX_JQuery_Form_Element_DatePicker('date1');
     $date1->setAttrib('class', 'txt_put');
     $date1->setJQueryParam('dateFormat', 'yy-mm-dd');
     $date1->setRequired(true);
     $date1->setAttrib('size', 12);
     //$fieldtype,$fieldname,$table,$columnname,$cssname,$labelname,$required,$validationtype,$min,$max,$rows,$cols,$decorator,$value
     $formfield = new App_Form_Field();
     $amount = $formfield->field('Text', 'amount', '', '', 'txt_put', '', true, '', '', '', '', '', 0, '');
     $graterthan = new Zend_Validate_GreaterThan(0);
     $amount->setRequired(true)->addValidators(array(array('NotEmpty'), array('Float'), array($graterthan, true)));
     $amount->setAttrib('size', 12);
     $description = $formfield->field('Textarea', 'description', '', '', 'txt_put', '', true, '', '', '', 2, 15, '', 0, '');
     $transactionMode = $formfield->field('Select', 'transactionMode', '', '', 'txt_put', '', true, '', '', '', '', '', 0, '');
     // hidden feilds
     $accNum = $formfield->field('Hidden', 'accNum', '', '', 'txt_put', '', true, '', '', '', '', '', 0, $accNum);
     $sms = new Zend_Form_Element_Checkbox('sms');
     $back = new Zend_Form_Element_Submit('Back');
     $submit = new Zend_Form_Element_Submit('Submit');
     $this->addElements(array($date, $amount, $transactionMode, $description, $submit, $accNum, $back, $sms, $date1));
 }
コード例 #7
0
 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));
 }
コード例 #8
0
ファイル: Holiday.php プロジェクト: maniargaurav/OurBank
 public function init()
 {
     $holidayname = new Zend_Form_Element_Text('holidayname');
     $holidayname->addValidator(new Zend_Validate_Db_NoRecordExists('ourbank_holidayupdates', 'holidayname'));
     $holidayname->setAttrib('class', 'txt_put');
     $holidayname->setRequired(true)->addValidators(array(array('NotEmpty')));
     $office_id = new Zend_Form_Element_Select('office_id');
     $office_id->addMultiOption('', 'Select...');
     $office_id->addMultiOption('All', 'All');
     $office_id->setAttrib('class', 'txt_put');
     $office_id->setRequired(true)->addValidators(array(array('NotEmpty')));
     $holidayupdate_id = new Zend_Form_Element_Hidden('holidayupdate_id');
     $holidayfrom = new ZendX_JQuery_Form_Element_DatePicker('holidayfrom');
     $holidayfrom->setAttrib('class', 'txt_put');
     $holidayfrom->setJQueryParam('dateFormat', 'yy-mm-dd');
     $holidayfrom->setRequired(true)->addValidator(new Zend_Validate_Date('YYYY-MM-DD'), true, array('messages' => array(Zend_Validate_Date::FALSEFORMAT => 'Enter the valid date')));
     $holidayupto = new ZendX_JQuery_Form_Element_DatePicker('holidayupto');
     $holidayupto->setAttrib('class', 'txt_put');
     $holidayupto->setJQueryParam('dateFormat', 'yy-mm-dd');
     $holidayupto->setRequired(true)->addValidator(new Zend_Validate_Date('YYYY-MM-DD'), true, array('messages' => array(Zend_Validate_Date::FALSEFORMAT => 'Enter the valid date')));
     $repayment_date = new ZendX_JQuery_Form_Element_DatePicker('repayment_date');
     $repayment_date->setAttrib('class', 'txt_put');
     $repayment_date->setJQueryParam('dateFormat', 'yy-mm-dd');
     $repayment_date->setRequired(true)->addValidators(array(array('NotEmpty')));
     array('messages' => array(Zend_Validate_Date::FALSEFORMAT => 'Enter the valid date'));
     $submit = new Zend_Form_Element_Submit('Submit');
     $submit->removeDecorator('DtDdWrapper');
     $this->addElements(array($holidayname, $office_id, $holidayfrom, $holidayupto, $repayment_date, $holidayupdate_id, $submit));
 }
コード例 #9
0
 public function __construct($loanamount)
 {
     Zend_Dojo::enableForm($this);
     parent::__construct($loanamount);
     //$fieldtype,$fieldname,$table,$columnname,$cssname,$labelname,$required,$validationtype,$min,$max,$rows,$cols,$decorator,$value
     $formfield = new App_Form_Field();
     $date = new ZendX_JQuery_Form_Element_DatePicker('date');
     $date->setAttrib('class', 'txt_put');
     $date->setJQueryParam('dateFormat', 'yy-mm-dd');
     $date->setRequired(true);
     $Amount = new Zend_Form_Element_Text('Amount');
     $Amount->setAttrib('class', 'textfield');
     $lessthan = new Zend_Validate_LessThan(array('max' => $loanamount + 1, 'inclusive' => false));
     $Amount->setRequired(true)->addValidators(array(array('NotEmpty'), array('Float'), array($lessthan, true)));
     $transactionMode = $formfield->field('Select', 'transactionMode', '', '', 'tmode', '', true, '', '', '', '', '', 0, '');
     $etransfer = $formfield->field('Select', 'etransfer', '', '', 'etran', '', false, '', '', '', '', '', 0, '');
     $etransfer->setRegisterInArrayValidator(false);
     $memberid = $formfield->field('Hidden', 'memberid', '', '', 'memberclass', '', false, '', '', '', '', '', 0, '');
     $membertypeid = $formfield->field('Hidden', 'membertypeid', '', '', 'membertypeclass', '', false, '', '', '', '', '', 0, '');
     $pathhidden = $formfield->field('Hidden', 'pathhidden', '', '', 'pathclass', '', false, '', '', '', '', '', 0, '');
     $othrtext = new Zend_Form_Element_Text('othertext');
     $othrtext->setAttrib('size', 12);
     $description = new Zend_Form_Element_Textarea('description');
     $description->setAttrib('rows', '2');
     $description->setAttrib('cols', '20');
     $description->setRequired(true);
     $sms = new Zend_Form_Element_Checkbox('sms');
     $back = new Zend_Form_Element_Submit('Back');
     $back->setAttrib('id', 'button2');
     $submit = new Zend_Form_Element_Submit('Submit');
     $submit->setAttrib('id', 'button');
     $this->addElements(array($date, $Amount, $transactionMode, $etransfer, $othrtext, $description, $sms, $memberid, $pathhidden, $membertypeid, $submit, $back));
 }
コード例 #10
0
 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'));
 }
コード例 #11
0
ファイル: empjobhistory.php プロジェクト: rajbrt/sentrifugo
 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'));
 }
コード例 #12
0
ファイル: creditline.php プロジェクト: maniargaurav/OurBank
 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));
 }
コード例 #13
0
 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'));
 }
コード例 #14
0
 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'));
 }
コード例 #15
0
 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'));
 }
コード例 #16
0
 public function __construct($amountTopay, $currentdate, $lastPaidDate)
 {
     parent::__construct($amountTopay, $currentdate, $lastPaidDate);
     $transactionMode = new Zend_Form_Element_Select('transactionMode');
     $transactionMode->addMultiOption('', 'Select...');
     $transactionMode->setAttrib('class', 'selectbutton');
     $transactionMode->setAttrib('onchange', 'toggleField();');
     $transactionMode->setAttrib('id', 'paymenttype');
     $transactionMode->setRequired(true);
     $transactionModeDetails = new Zend_Form_Element_Textarea('paymenttype_details');
     $transactionModeDetails->setAttrib('class', 'txt_put');
     $transactionModeDetails->setAttrib('id', 'paymenttype_details');
     $transactionModeDetails->setAttrib('style', 'display:none');
     $transactionModeDetails->setAttrib('rows', '1');
     $transactionModeDetails->setAttrib('cols', '20');
     $transactionModeDetails->setRequired(true);
     $recurringDate = new ZendX_JQuery_Form_Element_DatePicker('recurringDate');
     $recurringDate->setRequired(true);
     $recurringDate->setAttrib('id', 'recurringDate');
     $recurringDate->setAttrib('size', '8');
     $recurringDate->setAttrib('class', '');
     $recurringDate->setRequired(true);
     $amount = new Zend_Form_Element_Text('amount');
     $amount->setRequired(true)->addValidators(array(array('Float'), array('GreaterThan', false, array($amountTopay - 0.0001, 'messages' => array('notGreaterThan' => 'Min Payable Amount=' . $amountTopay)))));
     $amount->setAttrib('class', 'txt_put');
     $amount->setAttrib('id', 'amount');
     $amount->setAttrib('size', '8');
     $accountId = new Zend_Form_Element_Hidden('accountId');
     $productId = new Zend_Form_Element_Hidden('productId');
     $recurringDate1 = new Zend_Form_Element_Hidden('recurringDate1');
     $amount1 = new Zend_Form_Element_Hidden('amounts1');
     $transactionMode1 = new Zend_Form_Element_Hidden('transactionMode1');
     $paymenttype_details1 = new Zend_Form_Element_Hidden('paymenttype_details1');
     $fine1 = new Zend_Form_Element_Hidden('fine1');
     $Submit = new Zend_Form_Element_Submit('Submit');
     $Submit->setLabel('submit');
     $Confirm = new Zend_Form_Element_Submit('Confirm');
     $Confirm->setLabel('Confirm');
     $this->addElements(array($transactionMode, $transactionModeDetails, $Submit, $recurringDate, $amount, $accountId, $productId, $Confirm, $recurringDate1, $amount1, $transactionMode1, $paymenttype_details1, $fine1));
 }
コード例 #17
0
ファイル: User.php プロジェクト: maniargaurav/OurBank
 public function __construct($options = null)
 {
     Zend_Dojo::enableForm($this);
     parent::__construct($options);
     $product_id = new Zend_Dojo_Form_Element_ComboBox('product_id');
     $product_id->addMultiOption('', 'Select...');
     $product_id->setAttrib('class', 'txt_put');
     $product_id->setRequired(true)->addValidators(array(array('NotEmpty')));
     $offerproductname = new Zend_Dojo_Form_Element_ValidationTextBox('offerproductname');
     $offerproductname->addValidator(new Zend_Validate_Db_NoRecordExists('ourbank_productsofferdetails', 'offerproductname'));
     $offerproductname->setAttrib('class', 'txt_put');
     $offerproductname->setRequired(true)->addValidators(array(array('NotEmpty')));
     $offerproductshortname = new Zend_Dojo_Form_Element_ValidationTextBox('offerproductshortname');
     $offerproductshortname->addValidator(new Zend_Validate_Db_NoRecordExists('ourbank_productsofferdetails', 'offerproductshortname'));
     $offerproductshortname->setAttrib('class', 'txt_put');
     $offerproductshortname->setRequired(true)->addValidators(array(array('NotEmpty')));
     $offerproduct_description = new Zend_Dojo_Form_Element_SimpleTextarea('offerproduct_description', array('rows' => 3, 'cols' => 20));
     $offerproduct_description->setAttrib('class', '');
     $offerproduct_description->setRequired(true)->addValidators(array(array('NotEmpty')));
     //         $begindate = new Zend_Dojo_Form_Element_DateTextBox('begindate');
     //         $begindate->setLabel('Birthday');
     $begindate = new ZendX_JQuery_Form_Element_DatePicker('begindate', array('label' => 'Date:'));
     $begindate->setJQueryParam('dateFormat', 'yy-mm-dd');
     $begindate->setAttrib('class', 'txt_put');
     $begindate->setRequired(true)->addValidators(array(array('Date', true, array('messages' => array('dateNotYYYY-MM-DD' => 'Please enter in this format(YYYY-MM-DD)', 'dateInvalid' => "'%value%' is not a valid date Please enter in this format(YYYY-MM-DD)"))), array('Between', false, array($beginDate, $matureDate, 'messages' => array('notBetween' => 'date should be between ' . $beginDate . ' to (Closed date) ' . $matureDate)))));
     $minmumloanamount = new Zend_Dojo_Form_Element_NumberSpinner('minmumloanamount', array('value' => '7', 'label' => 'NumberSpinner', 'smallDelta' => 5, 'largeDelta' => 25, 'defaultTimeout' => 500, 'timeoutChangeRate' => 100, 'min' => 9, 'max' => 1550, 'places' => 0, 'maxlength' => 20));
     $minmumloanamount->setAttrib('class', 'txt_put');
     $minmumloanamount->setRequired(true)->addValidators(array(array('NotEmpty')));
     $closedate = new Zend_Dojo_Form_Element_TextBox('closedate');
     $closedate->setAttrib('class', 'txt_put');
     $closedate->setRequired(true)->addValidator(new Zend_Validate_Date('YYYY-MM-DD'), true)->addValidator(new Zend_Validate_GreaterThan($begindate));
     $applicableto = new Zend_Dojo_Form_Element_ComboBox('applicableto');
     $applicableto->addMultiOption('', 'Select...');
     $applicableto->setAttrib('class', 'txt_put');
     $applicableto->setRequired(true)->addValidators(array(array('NotEmpty')));
     $maximunloanamount = new Zend_Dojo_Form_Element_NumberTextBox('maximunloanamount');
     $maximunloanamount->setAttrib('class', 'txt_put');
     $maximunloanamount->setRequired(true);
     $validator = new Zend_Validate_Digits();
     $maximunloanamount->addValidator($validator, true);
     $minimumfrequency = new Zend_Dojo_Form_Element_NumberTextBox('minimumfrequency');
     $minimumfrequency->setAttrib('class', 'txt_put');
     $minimumfrequency->setRequired(true)->addValidators(array(array('NotEmpty')));
     $maximumfrequency = new Zend_Dojo_Form_Element_NumberTextBox('maximumfrequency');
     $maximumfrequency->setAttrib('class', 'txt_put');
     $maximumfrequency->setRequired(true)->addValidators(array(array('NotEmpty')));
     $graceperiodnumber = new Zend_Dojo_Form_Element_NumberTextBox('graceperiodnumber');
     $graceperiodnumber->setAttrib('class', 'txt_put');
     $graceperiodnumber->setRequired(true)->addValidators(array(array('NotEmpty')));
     $submit = new Zend_Dojo_Form_Element_SubmitButton('Submit');
     $this->addElements(array($offerproductname, $offerproductshortname, $offerproduct_description, $begindate, $closedate, $applicableto, $minmumloanamount, $maximunloanamount, $minimumfrequency, $maximumfrequency, $graceperiodnumber, $product_id, $submit));
 }
コード例 #18
0
ファイル: Fixed.php プロジェクト: maniargaurav/OurBank
 public function __construct($path, $minumumbal, $maximumbal)
 {
     parent::__construct($path, $minumumbal);
     $formfield = new App_Form_Field();
     // 	$fieldtype,$fieldname,$table,$columnname,$cssname,$labelname,$required,$validationtype,$min,$max,$rows,$cols,$decorator,$value
     $date = new ZendX_JQuery_Form_Element_DatePicker('date');
     $date->setJQueryParam('dateFormat', 'dd/mm/yy');
     $date->setAttrib('autocomplete', 'off');
     $date->setRequired(true);
     $period = new Zend_Form_Element_Select('period');
     $period->addMultiOption('', 'Select...');
     $period->setRequired(true);
     $period->setAttrib('onchange', 'getInterests(this.value)');
     $interest = new Zend_Form_Element_Text('interest');
     $interest->setRequired(true);
     $tAmount = $formfield->field('Text', 'tAmount', '', '', 'mand amount1 number', 'Category name', true, '', '', '', '', '', 0, 0);
     //         $tAmount = new Zend_Form_Element_Text('tAmount');
     //         $tAmount->setAttrib('class', 'amount1');
     //         $tAmount->setAttrib('class', 'number');
     //         $tAmount->setAttrib('readonly', true);
     //         $tAmount->setRequired(true);
     $valid = new Zend_Validate_Between(array('min' => $minumumbal, 'max' => $maximumbal));
     $tAmount->addValidators(array(array($valid, true)));
     //         $tAmount->setAttrib('onchange', 'calculateMatureAmount()');
     $matureamount = new Zend_Form_Element_Text('matureamount');
     $matureamount->setAttrib('class', 'txt_put');
     $amount = new Zend_Form_Element_Text('amount');
     $amount->setAttrib('class', 'txt_put');
     //         $amount->setRequired(true);
     $amount->setAttrib('onchange', 'calculateTotalAmount(this.value),calculateMatureAmount()');
     $memberfirstname = new Zend_Form_Element_MultiCheckbox('memberfirstname');
     $memberfirstname->setAttrib('class', 'textfield');
     //         $memberfirstname->setRequired(true);
     $fixedfee = new Zend_Form_Element_Text('fixedfee');
     $fixedfee->setAttrib('class', 'txt_put');
     $fixedfee->setAttrib('readonly', 'true');
     $totalamount = new Zend_Form_Element_Text('totalamount');
     $totalamount->setAttrib('class', 'txt_put');
     $totalamount->setAttrib('readonly', 'true');
     $memberId = new Zend_Form_Element_Hidden('memberId');
     $productId = new Zend_Form_Element_Hidden('Id');
     $membercode = new Zend_Form_Element_Hidden('code');
     $typeId = new Zend_Form_Element_Hidden('typeId');
     $Type = new Zend_Form_Element_Hidden('Type');
     $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, $matureamount, $interest, $tAmount, $memberfirstname, $fixedfee, $memberId, $membercode, $totalamount, $Type, $date, $productId, $typeId, $memberTypeIdv, $Yes, $back));
 }
コード例 #19
0
ファイル: Fundings.php プロジェクト: maniargaurav/OurBank
 public function init()
 {
     $fundingupdates_id = new Zend_Form_Element_Hidden('fundingupdates_id');
     $funding_id = new Zend_Form_Element_Hidden('funding_id');
     $funder_id = new Zend_Form_Element_Select('funder_id');
     $funder_id->addMultiOption('', 'Select...');
     $funder_id->setAttrib('class', 'txt_put');
     $funder_id->setRequired(true)->addValidators(array(array('NotEmpty')));
     //  $funder_id = new Zend_Form_Element_Text('funder_id');
     //         $funder_id->addValidators(array(array('NotEmpty')));
     //         $funder_id->setAttrib('class', 'txt_put');
     //         $funder_id->setRequired(true)
     // 		->addValidators(array(array('NotEmpty')));
     //
     $institutionName = new Zend_Form_Element_Select('institutionname');
     $institutionName->setAttrib('class', 'txt_put');
     $institutionName->setAttrib('id', 'institutionname');
     $institutionName->setLabel('institutionname')->setRequired(true);
     $institutionName->addMultiOption('', 'Select...');
     $fundingname = new Zend_Form_Element_Text('fundingname');
     $fundingname->addValidator(new Zend_Validate_Db_NoRecordExists('ourbank_fundingdetails', 'fundingname'));
     $fundingname->setAttrib('class', 'txt_put');
     $fundingname->setRequired(true)->addValidators(array('NotEmpty', 'alpha'));
     $interest = new Zend_Form_Element_Text('interest');
     $interest->addValidator(new Zend_Validate_Db_NoRecordExists('ourbank_fundingdetails', 'fundingname'));
     $interest->setAttrib('class', 'txt_put');
     $interest->setRequired(true)->addValidators(array(array('NotEmpty')));
     $funding_currency_id = new Zend_Form_Element_Select('funding_currency_id');
     $funding_currency_id->addMultiOption('', 'Select...');
     $funding_currency_id->setAttrib('class', 'txt_put');
     $funding_currency_id->setRequired(true)->addValidators(array(array('NotEmpty')));
     $fundingamount = new Zend_Form_Element_Text('fundingamount');
     $fundingamount->setAttrib('class', 'txt_put');
     $fundingamount->setRequired(true)->addValidators(array('Float'));
     $exchangerate = new Zend_Form_Element_Text('exchangerate');
     $exchangerate->setAttrib('class', 'txt_put');
     $exchangerate->setRequired(true)->addValidators(array(array('Float')));
     $fund_beginingdate = new ZendX_JQuery_Form_Element_DatePicker('fund_beginingdate');
     $fund_beginingdate->setAttrib('class', 'txt_put');
     $fund_beginingdate->setJQueryParam('dateFormat', 'yy-mm-dd');
     $fund_beginingdate->setRequired(true)->addValidator(new Zend_Validate_Date('YYYY-MM-DD'), true);
     $fund_closingdate = new ZendX_JQuery_Form_Element_DatePicker('fund_closingdate');
     $fund_closingdate->setAttrib('class', 'txt_put');
     $fund_closingdate->setJQueryParam('dateFormat', 'yy-mm-dd');
     $fund_closingdate->setRequired(true)->addValidator(new Zend_Validate_Date('YYYY-MM-DD'), true);
     $submit = new Zend_Form_Element_Submit('Submit');
     $submit->removeDecorator('DtDdWrapper');
     $this->addElements(array($fundingupdates_id, $fundingupdates_id, $funder_id, $funding_id, $fundingname, $funding_currency_id, $fundingamount, $exchangerate, $fund_beginingdate, $fund_closingdate, $institutionName, $interest, $submit));
 }
コード例 #20
0
ファイル: Recurring.php プロジェクト: maniargaurav/OurBank
 public function __construct($path, $minumumbal, $maximumbal)
 {
     parent::__construct($path, $minumumbal);
     $date1 = new ZendX_JQuery_Form_Element_DatePicker('date1');
     $date1->setAttrib('class', 'txt_put');
     $date1->setAttrib('autocomplete', 'off');
     $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);
     $period->setAttrib('onchange', 'getInterests("' . $path . '",this.value)');
     $interest = new Zend_Form_Element_Text('interest');
     $interest->setAttrib('class', 'txt_put');
     //         $interest->setAttrib('readonly', 'true');
     $tAmount = new Zend_Form_Element_Text('tAmount');
     $tAmount->setAttrib('class', 'txt_put');
     $tAmount->setAttrib('onchange', 'calculateMatureAmount()');
     $valid = new Zend_Validate_Between(array('min' => $minumumbal, 'max' => $maximumbal));
     $tAmount->addValidators(array(array($valid, true)));
     $matureamount = new Zend_Form_Element_Text('matureamount');
     $matureamount->setAttrib('class', 'txt_put');
     $amount = new Zend_Form_Element_Text('amount');
     $amount->setAttrib('class', 'txt_put');
     //         $amount->setRequired(true);
     $amount->setAttrib('onchange', 'calculateTotalAmount(this.value),calculateMatureAmount()');
     $memberfirstname = new Zend_Form_Element_MultiCheckbox('memberfirstname');
     $memberfirstname->setAttrib('class', 'textfield');
     //         $memberfirstname->setRequired(true);
     $fixedfee = new Zend_Form_Element_Text('fixedfee');
     $fixedfee->setAttrib('class', 'txt_put');
     $fixedfee->setAttrib('readonly', 'true');
     $totalamount = new Zend_Form_Element_Text('totalamount');
     $totalamount->setAttrib('class', 'txt_put');
     $totalamount->setAttrib('readonly', 'true');
     $memberId = new Zend_Form_Element_Hidden('memberId');
     $productId = new Zend_Form_Element_Hidden('Id');
     $membercode = new Zend_Form_Element_Hidden('code');
     $typeId = new Zend_Form_Element_Hidden('typeId');
     $Type = new Zend_Form_Element_Hidden('Type');
     $memberTypeIdv = new Zend_Form_Element_Hidden('memberTypeIdv');
     $submit = new Zend_Form_Element_Submit('Submit');
     $submit->setRequired(false);
     $Yes = new Zend_Form_Element_Submit('Yes');
     $back = new Zend_Form_Element_Submit('Back');
     $this->addElements(array($submit, $amount, $period, $matureamount, $interest, $tAmount, $memberfirstname, $fixedfee, $memberId, $membercode, $totalamount, $Type, $date1, $productId, $typeId, $memberTypeIdv, $Yes, $back));
 }
コード例 #21
0
ファイル: Search.php プロジェクト: maniargaurav/OurBank
 public function __construct($options = null)
 {
     Zend_Dojo::enableForm($this);
     parent::__construct($options);
     $field1 = new ZendX_JQuery_Form_Element_DatePicker('field1');
     $field1->setAttrib('class', 'txt_put');
     $field1->setRequired(true);
     $field2 = new ZendX_JQuery_Form_Element_DatePicker('field2');
     $field2->setAttrib('class', 'txt_put');
     $field2->setRequired(true);
     $field3 = new Zend_Form_Element_Select('field3');
     $field3->addMultiOption('', 'Select');
     $field3->setAttrib('class', 'txt_put');
     $submit = new Zend_Form_Element_Submit('Search');
     $pdf = new Zend_Form_Element_Submit('PDF');
     $this->addElements(array($field1, $field2, $field3, $submit, $pdf));
 }
コード例 #22
0
 public function __construct($options = null)
 {
     parent::__construct($options);
     $accountId = new Zend_Form_Element_Hidden('accountcode');
     $memberId = new Zend_Form_Element_Hidden('membercode');
     $Date = new ZendX_JQuery_Form_Element_DatePicker('date');
     $Date->setAttrib('class', 'txt_put');
     $Date->setJQueryParam('dateFormat', 'yy-mm-dd');
     $Date->setRequired(true)->addValidator(new Zend_Validate_Date('YYYY-MM-DD'), true, array('messages' => array(Zend_Validate_Date::FALSEFORMAT => 'Enter the valid date')));
     $Amount = new Zend_Form_Element_Text('amount');
     $Amount->setRequired(true)->addValidators(array(array('NotEmpty'), array('Float'), array('GreaterThan', false, array('0'))));
     $Amount->setAttrib('class', 'textfield');
     $Amount->setAttrib('id', 'amount');
     $Amount->setAttrib('size', '8');
     $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');
     $description->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);
     $categoryId = new Zend_Form_Element_Hidden('categoryId');
     $categoryId->setAttrib('class', 'textfield');
     $date1 = new Zend_Form_Element_Hidden('date1');
     $amount1 = new Zend_Form_Element_Hidden('amounts');
     $transactiondescription1 = new Zend_Form_Element_Hidden('transactiondescription1');
     $paymenttype_details1 = new Zend_Form_Element_Hidden('paymenttype_details1');
     $paymenttype1 = new Zend_Form_Element_Hidden('paymenttype1');
     $confirm = new Zend_Form_Element_Submit('confirm');
     $confirm->setAttrib('class', 'NormalBtn');
     $submit = new Zend_Form_Element_Submit('Submit');
     $submit->setAttrib('class', 'NormalBtn');
     $submit->setLabel('submit');
     $this->addElements(array($Date, $Amount, $paymenttype, $submit, $accountId, $memberId, $description, $no, $categoryId, $confirm, $date1, $amount1, $transactiondescription1, $paymenttype_details1, $paymenttype1));
 }
コード例 #23
0
 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'));
 }
コード例 #24
0
ファイル: Withdrawal.php プロジェクト: maniargaurav/OurBank
 public function __construct($accNum, $balance, $minimumbalance)
 {
     parent::__construct($accNum, $balance, $minimumbalance);
     $limitamount = $balance - $minimumbalance;
     $date = new ZendX_JQuery_Form_Element_DatePicker('date');
     $date->setAttrib('class', 'txt_put');
     $date->setJQueryParam('dateFormat', 'yy-mm-dd');
     $date->setRequired(true);
     $date->setAttrib('autocomplete', 'off');
     $date->setAttrib('size', 12);
     $date1 = new ZendX_JQuery_Form_Element_DatePicker('date1');
     $date1->setAttrib('class', 'txt_put');
     $date1->setJQueryParam('dateFormat', 'yy-mm-dd');
     $date1->setRequired(true);
     $date1->setAttrib('autocomplete', 'off');
     $date1->setAttrib('size', 12);
     //$fieldtype,$fieldname,$table,$columnname,$cssname,$labelname,$required,$validationtype,$min,$max,$rows,$cols,$decorator,$value
     $formfield = new App_Form_Field();
     // 		$amount = $formfield->field('Text','amount','','','txt_put maxvalue','',true,'','','','','',0,'');
     //                 $lessthan=new Zend_Validate_LessThan($limitamount);
     //                 $amount->setRequired(true)
     //                 ->addValidators(array(array('NotEmpty'),array('Float')));
     //                 $amount->setAttrib('size', 10);
     $description = $formfield->field('Textarea', 'description', '', '', 'txt_put', '', true, '', '', '', 2, 10, '', 0, '');
     $description1 = $formfield->field('Textarea', 'description1', '', '', 'txt_put', '', true, '', '', '', 2, 10, '', 0, '');
     $transactionMode = $formfield->field('Select', 'transactionMode', '', '', 'tmode', '', true, '', '', '', '', '', 0, '');
     $transactionMode1 = $formfield->field('Select', 'transactionMode1', '', '', 'tmode', '', true, '', '', '', '', '', 0, '');
     $othrtext = new Zend_Form_Element_Text('othertext');
     $othrtext->setRequired(true);
     $othrtext->setAttrib('size', 12);
     $othrtext1 = new Zend_Form_Element_Text('othertext1');
     $othrtext1->setRequired(true);
     $othrtext1->setAttrib('size', 12);
     $acc = base64_encode($accNum);
     // hidden feilds
     $accNum = $formfield->field('Hidden', 'accNum', '', '', 'txt_put', '', true, '', '', '', '', '', 0, $acc);
     $sms = new Zend_Form_Element_Checkbox('sms');
     $back = new Zend_Form_Element_Submit('Back');
     $submit = new Zend_Form_Element_Submit('Submit');
     $this->addElements(array($date, $transactionMode, $transactionMode1, $description, $description1, $submit, $accNum, $back, $sms, $othrtext, $othrtext1, $date1));
 }
コード例 #25
0
ファイル: Loan.php プロジェクト: maniargaurav/OurBank
 public function __construct($beginDate, $matureDate, $minimumDeposit, $maxmDeposit, $app)
 {
     Zend_Dojo::enableForm($this);
     parent::__construct($beginDate, $matureDate, $minimumDeposit, $maxmDeposit);
     $memberfirstname = new Zend_Form_Element_MultiCheckbox('memberfirstname');
     $memberfirstname->setAttrib('class', 'txt_put');
     $memberfirstname->setRequired(true);
     $savingAccount = new Zend_Form_Element_multiCheckbox('savingAccount');
     $savingAccount->setAttrib('class', 'txt_put');
     //         $savingAccount->setRequired(true);
     $startdate = new ZendX_JQuery_Form_Element_DatePicker('loanAccountdate', array('label' => 'Date:'));
     $startdate->setJQueryParam('dateFormat', 'yy-mm-dd');
     $startdate->setAttrib('size', '8');
     $startdate->setAttrib('class', 'txt_put');
     $startdate->setRequired(true);
     $amount = new Zend_Form_Element_Text('amount');
     $amount->setRequired(true);
     $amount->addValidator('Float');
     $amount->setAttrib('size', '8');
     $amount->setAttrib('class', 'txt_put');
     $amount->setAttrib('onchange', 'calculateTotalAmount(this.value)');
     $loanInstallements = new Zend_Form_Element_Select('loanInterest');
     $loanInstallements->addMultiOption('', 'Select...');
     $loanInstallements->setAttrib('class', 'txt_put');
     $loanInstallements->setAttrib('id', 'loanInterest');
     $loanInstallements->setRequired(true);
     $loanInstallements->setAttrib('onchange', 'getInterests(this.value,"' . $app . '")');
     $interest = new Zend_Form_Element_Text('interest');
     $interest->setAttrib('class', 'txt_put');
     $interest->setAttrib('id', 'interest');
     $interest->setAttrib('size', '8');
     $this->addElements(array($memberfirstname, $interest, $startdate, $amount, $loanInstallements));
     $submit = new Zend_Form_Element_Submit('Submit');
     $memberId = new Zend_Form_Element_Hidden('memberId');
     $productId = new Zend_Form_Element_Hidden('productId');
     $typeId = new Zend_Form_Element_Hidden('typeId');
     $Type = new Zend_Form_Element_Hidden('Type');
     $back = new Zend_Form_Element_Submit('Back');
     $Yes = new Zend_Form_Element_Submit('Yes');
     $this->addElements(array($submit, $memberId, $productId, $savingAccount, $typeId, $Type, $back, $Yes));
 }
コード例 #26
0
 public function __construct($options = null)
 {
     parent::__construct($options);
     $date = new ZendX_JQuery_Form_Element_DatePicker('Date1');
     $date->setAttrib('class', '');
     $date->setJQueryParam('dateFormat', 'yy-mm-dd');
     $date->setRequired(true)->addValidator(new Zend_Validate_Date('YYYY-MM-DD'), true, array('messages' => array(Zend_Validate_Date::FALSEFORMAT => 'Enter the valid date')));
     $accountCode = new Zend_Form_Element_Hidden('accountcode');
     $memberId = new Zend_Form_Element_Hidden('membercode');
     $categoryId = new Zend_Form_Element_Hidden('categoryId');
     $loanAmount = new Zend_Form_Element_Hidden('loan_amount');
     $typeId = new Zend_Form_Element_Hidden('typeId');
     $creditlinebalance = new Zend_Form_Element_Text('creditlinebalance');
     $creditlinebalance->setAttrib('readonly', 'true');
     $transactionType = new Zend_Form_Element_Select('transaction_type');
     $transactionType->setAttrib('class', 'NormalBtn');
     $transactionType->setAttrib('id', 'transaction_type');
     $transactionType->addMultiOption('3', '-Loan Disbursement-');
     $Amount = new Zend_Form_Element_Text('Amount');
     $Amount->setRequired(true)->addValidators(array(array('NotEmpty'), array('Digits'), array('GreaterThan', false, array('0'))));
     $Amount->setAttrib('class', 'textfield');
     $Amount->setAttrib('id', 'Amount');
     $description = new Zend_Form_Element_Textarea('description');
     $description->setAttrib('rows', '2');
     $description->setAttrib('cols', '20');
     $description->setRequired(true);
     $fee = new Zend_Form_Element_Text('fee');
     $fee->setAttrib('class', 'textfield');
     $fee->setAttrib('readonly', 'true');
     $Save = new Zend_Form_Element_Submit('Save');
     $Save->setAttrib('class', 'officesubmit');
     $submit = new Zend_Form_Element_Submit('Submit');
     $submit->setAttrib('class', 'officesubmit');
     $transactionTypeId = new Zend_Form_Element_Hidden('transactionType_id');
     $transactionTypeId->setAttrib('class', 'textfield');
     $disburseddate = new Zend_Form_Element_Hidden('disburseddate');
     $description1 = new Zend_Form_Element_Hidden('description1');
     $Amount1 = new Zend_Form_Element_Hidden('Amount1');
     $fee1 = new Zend_Form_Element_Hidden('fee1');
     $this->addElements(array($Amount, $date, $transactionType, $description, $categoryId, $memberId, $typeId, $fee, $submit, $loanAmount, $accountCode, $transactionTypeId, $creditlinebalance, $Save, $disburseddate, $description1, $Amount1, $fee1));
 }
コード例 #27
0
ファイル: loandue.php プロジェクト: maniargaurav/OurBank
 public function __construct($app)
 {
     Zend_Dojo::enableForm($this);
     parent::__construct($app);
     $field1 = new ZendX_JQuery_Form_Element_DatePicker('field1');
     $field1->setAttrib('class', 'txt_put');
     $field1->setRequired(true);
     $field3 = new Zend_Form_Element_Select('field3');
     $field3->setAttrib('onchange', 'Getuser(this.value,"' . $app . '")');
     //('onchange','getMember(this.value,"'.$app.'")');
     $field3->addMultiOption('', 'Select');
     $field3->setAttrib('class', 'txt_put');
     $field4 = new Zend_Form_Element_Text('field4');
     $field4->setAttrib('class', 'txt_put');
     $field5 = new Zend_Form_Element_Select('field5');
     $field5->addMultiOption('', 'Select');
     $field5->setAttrib('class', 'txt_put');
     $field5->setRegisterInArrayValidator(false);
     $submit = new Zend_Form_Element_Submit('Search');
     $pdf = new Zend_Form_Element_Submit('PDF');
     $this->addElements(array($field1, $field3, $field4, $field5, $submit, $pdf));
 }
コード例 #28
0
 public function init()
 {
     $this->setMethod('post');
     $this->setAttrib('id', 'formid');
     $this->setAttrib('name', 'empprobationreview');
     $id = new Zend_Form_Element_Hidden('id');
     $userid = new Zend_Form_Element_Hidden('user_id');
     $reviewdate = new ZendX_JQuery_Form_Element_DatePicker('reviewdate');
     $reviewdate->setOptions(array('class' => 'brdr_none'));
     $reviewdate->setAttrib('readonly', 'false');
     $reviewdate->setRequired(true);
     $reviewdate->addValidator('NotEmpty', false, array('messages' => 'Please select review date.'));
     $next_reviewdate = new ZendX_JQuery_Form_Element_DatePicker('next_reviewdate');
     $next_reviewdate->setOptions(array('class' => 'brdr_none'));
     $next_reviewdate->setAttrib('readonly', 'false');
     $next_reviewdate->setRequired(true);
     $next_reviewdate->addValidator('NotEmpty', false, array('messages' => 'Please select next review date.'));
     $feedback = new Zend_Form_Element_Textarea('feedback');
     $feedback->setAttrib('rows', 10);
     $feedback->setAttrib('cols', 50);
     $feedback->setAttrib('maxlength', '2000');
     $feedback->setRequired(true);
     $feedback->addValidator('NotEmpty', false, array('messages' => 'Please enter feedback or comments.'));
     $probationstatus = new Zend_Form_Element_Select("probationstatus");
     $probationstatus->setRegisterInArrayValidator(true);
     $probationstatus->setAttrib("class", "formDataElement");
     $probationstatus->addMultiOptions(array('' => 'Select Probation Status', 'Performance Review' => 'Performance Review', 'Probation Complete' => 'Probation Complete', 'Extended' => 'Extended'));
     $probationstatus->setAttrib('title', 'Probation Status');
     $probationstatus->setRequired(true);
     $probationstatus->addValidator('NotEmpty', false, array('messages' => 'Please select status.'));
     $submitadd = new Zend_Form_Element_Button('submitbutton');
     $submitadd->setAttrib('id', 'submitbuttons');
     $submitadd->setAttrib('onclick', 'validatedocumentonsubmit(this)');
     $submitadd->setLabel('Save');
     $this->addElements(array($id, $userid, $reviewdate, $feedback, $probationstatus, $next_reviewdate, $submitadd));
 }
コード例 #29
0
 public function init()
 {
     $this->setMethod('post');
     $this->setAttrib('id', 'formid');
     $this->setAttrib('enctype', 'multipart/form-data');
     $this->setAttrib('name', 'organisationinfo');
     $this->setAttrib('action', BASE_URL . 'organisationinfo/addorghead');
     $id = new Zend_Form_Element_Hidden('id');
     $description = new Zend_Form_Element_Textarea('description');
     $description->setAttrib('rows', 10);
     $description->setAttrib('cols', 50);
     $firstname_orghead = new Zend_Form_Element_Text('firstname_orghead');
     $firstname_orghead->setAttrib('maxLength', 50);
     $firstname_orghead->addFilter(new Zend_Filter_StringTrim());
     $firstname_orghead->setRequired(true);
     $firstname_orghead->addValidator('NotEmpty', false, array('messages' => 'Please enter first name of organization head.'));
     $firstname_orghead->addValidator("regex", true, array('pattern' => '/^[a-zA-Z.\\- ?]+$/', 'messages' => array('regexNotMatch' => 'Please enter valid first name.')));
     $lastname_orghead = new Zend_Form_Element_Text('lastname_orghead');
     $lastname_orghead->setAttrib('maxLength', 50);
     $lastname_orghead->addFilter(new Zend_Filter_StringTrim());
     $lastname_orghead->setRequired(true);
     $lastname_orghead->addValidator('NotEmpty', false, array('messages' => 'Please enter last name of organization head.'));
     $lastname_orghead->addValidator("regex", true, array('pattern' => '/^[a-zA-Z.\\- ?]+$/', 'messages' => array('regexNotMatch' => 'Please enter valid last name.')));
     $designation = new Zend_Form_Element_Text('designation');
     $designation->setAttrib('maxLength', 50);
     $designation->addFilter(new Zend_Filter_StringTrim());
     $designation->addValidator("regex", true, array('pattern' => '/^[a-zA-Z.\\- ?]+$/', 'messages' => array('regexNotMatch' => 'Please enter valid designation.')));
     $employeeId = new Zend_Form_Element_Text("employeeId");
     $employeeId->setRequired("true");
     $employeeId->setLabel("Employee ID");
     $employeeId->setAttrib("class", "formDataElement");
     $employeeId->setAttrib("readonly", "readonly");
     $employeeId->setAttrib('onfocus', 'this.blur()');
     $employeeId->addValidator('NotEmpty', false, array('messages' => 'Identity codes are not configured yet.'));
     $prefix_id = new Zend_Form_Element_Select('prefix_id');
     $prefix_id->setLabel("Prefix");
     $prefix_id->setRegisterInArrayValidator(false);
     $emprole = new Zend_Form_Element_Select("emprole");
     $emprole->setRegisterInArrayValidator(false);
     $emprole->setRequired(true);
     $emprole->setLabel("Role");
     $emprole->setAttrib("class", "formDataElement");
     $emprole->addValidator('NotEmpty', false, array('messages' => 'Please select role.'));
     $emailaddress = new Zend_Form_Element_Text("emailaddress");
     $emailaddress->setRequired(true);
     $emailaddress->addValidator('NotEmpty', false, array('messages' => 'Please enter email.'));
     $emailaddress->addValidator("regex", true, array('pattern' => '/^(?!.*\\.{2})[a-zA-Z0-9_.+-]+@[a-zA-Z0-9-]+\\.[a-zA-Z0-9-.]+$/', 'messages' => array('regexNotMatch' => 'Please enter valid email.')));
     $emailaddress->setLabel("Email");
     $emailaddress->setAttrib("class", "formDataElement");
     $emailaddress->addValidator(new Zend_Validate_Db_NoRecordExists(array('table' => 'main_users', 'field' => 'emailaddress', 'exclude' => 'id!="' . Zend_Controller_Front::getInstance()->getRequest()->getParam('user_id', 0) . '" and isactive!=0')));
     $emailaddress->getValidator('Db_NoRecordExists')->setMessage('Email already exists.');
     $jobtitle = new Zend_Form_Element_Select('jobtitle_id');
     $jobtitle->setLabel("Job Title");
     $jobtitle->addMultiOption('', 'Select Job Title');
     $jobtitle->setAttrib('onchange', 'displayPositions(this,"position_id","")');
     $jobtitle->setRegisterInArrayValidator(false);
     $position = new Zend_Form_Element_Select('position_id');
     $position->setLabel("Position");
     $position->addMultiOption('', 'Select Position');
     $position->setRegisterInArrayValidator(false);
     $date_of_joining = new ZendX_JQuery_Form_Element_DatePicker('date_of_joining_head');
     $date_of_joining->setLabel("Date of Joining");
     $date_of_joining->setOptions(array('class' => 'brdr_none'));
     $date_of_joining->setRequired(true);
     $date_of_joining->setAttrib('readonly', 'true');
     $date_of_joining->setAttrib('onfocus', 'this.blur()');
     $date_of_joining->addValidator('NotEmpty', false, array('messages' => 'Please select date of joining.'));
     $submit = new Zend_Form_Element_Submit('submit');
     $submit->setAttrib('id', 'submitbutton');
     $submit->setLabel('Save');
     $this->addElements(array($id, $description, $lastname_orghead, $firstname_orghead, $designation, $employeeId, $prefix_id, $emprole, $emailaddress, $jobtitle, $position, $date_of_joining, $submit));
     //$email,$secondaryemail,
     $this->setElementDecorators(array('ViewHelper'));
     $this->setElementDecorators(array('File'), array('org_image'));
     $this->setElementDecorators(array('UiWidgetElement'), array('org_startdate', 'date_of_joining_head'));
 }
コード例 #30
0
ファイル: employee.php プロジェクト: lukkyrich/sentrifugo
 public function init()
 {
     $this->setMethod('post');
     $this->setAttrib('action', DOMAIN . 'employee/add');
     $this->setAttrib('id', 'formid');
     $this->setAttrib('name', 'employee');
     $controller_name = Zend_Controller_Front::getInstance()->getRequest()->getControllerName();
     $id = new Zend_Form_Element_Hidden('id');
     $id_val = Zend_Controller_Front::getInstance()->getRequest()->getParam('id', null);
     $userid = new Zend_Form_Element_Hidden('user_id');
     $reportingmanager = new Zend_Form_Element_Select('reporting_manager');
     $reportingmanager->addMultiOption('', 'Select Reporting Manager');
     $reportingmanager->setRegisterInArrayValidator(false);
     if ($controller_name != 'organisationinfo') {
         $reportingmanager->setRequired(true);
         $reportingmanager->addValidator('NotEmpty', false, array('messages' => 'Please select reporting manager.'));
     }
     $reportingmanager->addValidator(new Zend_Validate_Db_RecordExists(array('table' => 'main_users', 'field' => 'id', 'exclude' => 'isactive = 1')));
     $reportingmanager->getValidator('Db_RecordExists')->setMessage('Selected reporting manager is inactivated.');
     $emproleStr = Zend_Controller_Front::getInstance()->getRequest()->getParam('emprole', null);
     $empstatus = new Zend_Form_Element_Select('emp_status_id');
     $empstatus->setAttrib('onchange', 'displayempstatusmessage()');
     $empstatus->setRegisterInArrayValidator(false);
     if ($controller_name != 'organisationinfo') {
         $empstatus->setRequired(true);
         $empstatus->addValidator('NotEmpty', false, array('messages' => 'Please select employment status.'));
     }
     $empstatus->addValidator(new Zend_Validate_Db_RecordExists(array('table' => 'main_employmentstatus', 'field' => 'workcodename', 'exclude' => 'isactive = 1')));
     $empstatus->getValidator('Db_RecordExists')->setMessage('Selected employment status is deleted.');
     $businessunit = new Zend_Form_Element_Select('businessunit_id');
     $businessunit->setAttrib('onchange', 'displayEmployeeDepartments(this,"department_id","")');
     $businessunit->addValidator(new Zend_Validate_Db_RecordExists(array('table' => 'main_businessunits', 'field' => 'id', 'exclude' => 'isactive = 1')));
     $businessunit->getValidator('Db_RecordExists')->setMessage('Selected business unit is deleted.');
     $department = new Zend_Form_Element_Select('department_id');
     $department->addMultiOption('', 'Select Department');
     $department->setRegisterInArrayValidator(false);
     $roleArr = array();
     if ($controller_name != 'organisationinfo') {
         //For management 'department is not manditory'......
         if ($emproleStr != "") {
             $roleArr = explode('_', $emproleStr);
             if (!empty($roleArr)) {
                 if (isset($roleArr[1]) && $roleArr[1] != MANAGEMENT_GROUP) {
                     $department->setRequired(true);
                     $department->addValidator('NotEmpty', false, array('messages' => 'Please select department.'));
                 }
             }
         } else {
             $department->setRequired(true);
             $department->addValidator('NotEmpty', false, array('messages' => 'Please select department.'));
         }
     }
     $department->setAttrib("onchange", "displayReportingmanagers_emp('department_id','reporting_manager','emprole','id')");
     $department->addValidator(new Zend_Validate_Db_RecordExists(array('table' => 'main_departments', 'field' => 'id', 'exclude' => 'isactive = 1')));
     $department->getValidator('Db_RecordExists')->setMessage('Selected department is deleted.');
     $jobtitle = new Zend_Form_Element_Select('jobtitle_id');
     $jobtitle->setLabel("Job Title");
     $jobtitle->addMultiOption('', 'Select Job Title');
     $jobtitle->setAttrib('onchange', 'displayPositions(this,"position_id","")');
     $jobtitle->setRegisterInArrayValidator(false);
     $jobtitle->addValidator(new Zend_Validate_Db_RecordExists(array('table' => 'main_jobtitles', 'field' => 'id', 'exclude' => 'isactive = 1')));
     $jobtitle->getValidator('Db_RecordExists')->setMessage('Selected job title is deleted.');
     $position = new Zend_Form_Element_Select('position_id');
     $position->setLabel("Position");
     $position->addMultiOption('', 'Select Position');
     $position->setRegisterInArrayValidator(false);
     $position->addValidator(new Zend_Validate_Db_RecordExists(array('table' => 'main_positions', 'field' => 'id', 'exclude' => 'isactive = 1')));
     $position->getValidator('Db_RecordExists')->setMessage('Selected position is deleted.');
     $prefix_id = new Zend_Form_Element_Select('prefix_id');
     $prefix_id->addMultiOption('', 'Select Prefix');
     $prefix_id->setLabel("Prefix");
     $prefix_id->setRegisterInArrayValidator(false);
     $prefix_id->addValidator(new Zend_Validate_Db_RecordExists(array('table' => 'main_prefix', 'field' => 'id', 'exclude' => 'isactive = 1')));
     $prefix_id->getValidator('Db_RecordExists')->setMessage('Selected prefix is deleted.');
     $extension_number = new Zend_Form_Element_Text('extension_number');
     $extension_number->setAttrib('maxLength', 4);
     $extension_number->setLabel("Extension");
     $extension_number->addFilter(new Zend_Filter_StringTrim());
     $extension_number->addValidator("regex", true, array('pattern' => '/^[0-9]+$/', 'messages' => array('regexNotMatch' => 'Please enter only numbers.')));
     $office_number = new Zend_Form_Element_Text('office_number');
     $office_number->setAttrib('maxLength', 10);
     $office_number->setLabel("Work Telephone Number");
     $office_number->addFilter(new Zend_Filter_StringTrim());
     $office_number->addValidator("regex", true, array('pattern' => '/^(?!0{10})[0-9\\+\\-\\)\\(]+$/', 'messages' => array('regexNotMatch' => 'Please enter valid phone number.')));
     $office_faxnumber = new Zend_Form_Element_Text('office_faxnumber');
     $office_faxnumber->setAttrib('maxLength', 15);
     $office_faxnumber->setLabel("Fax");
     $office_faxnumber->addFilter(new Zend_Filter_StringTrim());
     $office_faxnumber->addValidator("regex", true, array('pattern' => '/^[0-9\\+\\-\\)\\(]+$/', 'messages' => array('regexNotMatch' => 'Please enter valid fax number.')));
     $yearsofexp = new Zend_Form_Element_Text('years_exp');
     $yearsofexp->setAttrib('maxLength', 2);
     $yearsofexp->addFilter(new Zend_Filter_StringTrim());
     $yearsofexp->addValidator("regex", true, array('pattern' => '/^[0-9]\\d{0,1}(\\.\\d*)?$/', 'messages' => array('regexNotMatch' => 'Please enter only numbers.')));
     $date_of_joining = new ZendX_JQuery_Form_Element_DatePicker('date_of_joining');
     $date_of_joining->setLabel("Date Of Joining");
     $date_of_joining->setOptions(array('class' => 'brdr_none'));
     $date_of_joining->setRequired(true);
     $date_of_joining->setAttrib('readonly', 'true');
     $date_of_joining->setAttrib('onfocus', 'this.blur()');
     $date_of_joining->addValidator('NotEmpty', false, array('messages' => 'Please select date of joining.'));
     $date_of_leaving = new ZendX_JQuery_Form_Element_DatePicker('date_of_leaving');
     $date_of_leaving->setOptions(array('class' => 'brdr_none'));
     $date_of_leaving->setAttrib('onchange', 'validatejoiningdate(this)');
     $date_of_leaving->setAttrib('readonly', 'true');
     $date_of_leaving->setAttrib('onfocus', 'this.blur()');
     $submit = new Zend_Form_Element_Submit('submit');
     $submit->setAttrib('id', 'submitbutton');
     $submit->setLabel('Save');
     //fields from user management
     $employeeId = new Zend_Form_Element_Text("employeeId");
     $employeeId->setRequired("true");
     $employeeId->setLabel("Employee ID");
     $employeeId->setAttrib("class", "formDataElement");
     $employeeId->setAttrib("readonly", "readonly");
     $employeeId->setAttrib('onfocus', 'this.blur()');
     $employeeId->addValidator('NotEmpty', false, array('messages' => 'Identity codes are not configured yet.'));
     $employeeId->addValidator(new Zend_Validate_Db_NoRecordExists(array('table' => 'main_users', 'field' => 'employeeId', 'exclude' => 'id!="' . Zend_Controller_Front::getInstance()->getRequest()->getParam('user_id', 0) . '" ')));
     $employeeId->getValidator('Db_NoRecordExists')->setMessage('Employee ID already exists. Please try again.');
     /*$userfullname = new Zend_Form_Element_Text("userfullname");
       $userfullname->setLabel("Full Name");	
       $userfullname->setAttrib("class", "formDataElement");
       $userfullname->setAttrib('maxlength', 50);*/
     $first_name = new Zend_Form_Element_Text("firstname");
     $first_name->setLabel("First Name");
     $first_name->setAttrib("class", "formDataElement");
     $first_name->setAttrib('maxlength', 50);
     $last_name = new Zend_Form_Element_Text("lastname");
     $last_name->setLabel("Last Name");
     $last_name->setAttrib("class", "formDataElement");
     $last_name->setAttrib('maxlength', 50);
     $other_modeofentry = new Zend_Form_Element_Text("other_modeofentry");
     $other_modeofentry->setLabel("Mode of Employment(Other)");
     $other_modeofentry->setAttrib("class", "formDataElement");
     $other_modeofentry->setAttrib('maxlength', 50);
     $modeofentry = new Zend_Form_Element_Select("modeofentry");
     $modeofentry->setLabel("Mode of Employment")->addMultiOptions(array('' => 'Select mode of entry', 'Direct' => 'Direct', 'Interview' => 'Interview', 'Other' => 'Other', 'Reference' => 'Reference'));
     $modeofentry->setAttrib("class", "formDataElement");
     if ($controller_name != 'organisationinfo') {
         if ($id_val == '') {
             $modeofentry->setRequired(true);
             $modeofentry->addValidator('NotEmpty', false, array('messages' => 'Please select mode of employment.'));
         }
     }
     $candidatereferredby = new Zend_Form_Element_Select("candidatereferredby");
     $candidatereferredby->setRegisterInArrayValidator(false);
     $candidatereferredby->setLabel("Referred By");
     $candidatereferredby->setAttrib("class", "formDataElement");
     $rccandidatename = new Zend_Form_Element_Select("rccandidatename");
     $rccandidatename->setRegisterInArrayValidator(false);
     $rccandidatename->setLabel("Candidate Name");
     $rccandidatename->setAttrib("class", "formDataElement");
     $rccandidatename->setAttrib("onchange", "disp_requisition(this.value,'disp_requi')");
     $emailaddress = new Zend_Form_Element_Text("emailaddress");
     $modeofentry_val = Zend_Controller_Front::getInstance()->getRequest()->getParam('modeofentry', null);
     $hid_modeofentry_val = Zend_Controller_Front::getInstance()->getRequest()->getParam('hid_modeofentry', null);
     if ($modeofentry_val != '' || $hid_modeofentry_val != '') {
         if ($modeofentry_val == 'Direct' || $hid_modeofentry_val == 'Direct') {
             /*$userfullname->setRequired(true);
               $userfullname->addValidator('NotEmpty', false, array('messages' => 'Please enter full name.'));*/
             $first_name->setRequired(true);
             $first_name->addValidator('NotEmpty', false, array('messages' => 'Please enter first name.'));
             $last_name->setRequired(true);
             $last_name->addValidator('NotEmpty', false, array('messages' => 'Please enter last name.'));
         } else {
             if ($modeofentry_val == 'Other' || $hid_modeofentry_val == 'Direct') {
                 $other_modeofentry->setRequired(true);
                 $other_modeofentry->addValidator('NotEmpty', false, array('messages' => 'Please enter mode of employment(Other).'));
                 $rccandidatename->setRequired(true);
                 $rccandidatename->addValidator('NotEmpty', false, array('messages' => 'Please select candidate name.'));
             } else {
                 if ($modeofentry_val == 'Reference' || $hid_modeofentry_val == 'Direct') {
                     $candidatereferredby->setRequired(true);
                     $candidatereferredby->addValidator('NotEmpty', false, array('messages' => 'Please select referred by.'));
                     $rccandidatename->setRequired(true);
                     $rccandidatename->addValidator('NotEmpty', false, array('messages' => 'Please select candidate name.'));
                 } else {
                     $empid = Zend_Controller_Front::getInstance()->getRequest()->getParam('id', null);
                     if ($empid == '') {
                         $rccandidatename->setRequired(true);
                         $rccandidatename->addValidator('NotEmpty', false, array('messages' => 'Please select candidate name.'));
                     }
                 }
             }
         }
     }
     /*$userfullname->addValidator("regex",true,array(                           
                              'pattern'=>'/^([a-zA-Z.]+ ?)+$/',
                              'messages'=>array(
                                 
       'regexNotMatch'=>'Please enter only alphabets.'
                              )
                   ));*/
     $first_name->addValidator("regex", true, array('pattern' => '/^([a-zA-Z.]+ ?)+$/', 'messages' => array('regexNotMatch' => 'Please enter only alphabets.')));
     $last_name->addValidator("regex", true, array('pattern' => '/^([a-zA-Z.]+ ?)+$/', 'messages' => array('regexNotMatch' => 'Please enter only alphabets.')));
     $other_modeofentry->addValidator("regex", true, array('pattern' => '/^([a-zA-Z.]+ ?)+$/', 'messages' => array('regexNotMatch' => 'Please enter only alphabets.')));
     $emailaddress->setRequired(true);
     $emailaddress->addValidator('NotEmpty', false, array('messages' => 'Please enter email.'));
     $emailaddress->addValidator("regex", true, array('pattern' => '/^(?!.*\\.{2})[a-zA-Z0-9_.+-]+@[a-zA-Z0-9-]+\\.[a-zA-Z0-9-.]+$/', 'messages' => array('regexNotMatch' => 'Please enter valid email.')));
     $emailaddress->setLabel("Email");
     $emailaddress->setAttrib("class", "formDataElement");
     $emailaddress->addValidator(new Zend_Validate_Db_NoRecordExists(array('table' => 'main_users', 'field' => 'emailaddress', 'exclude' => 'id!="' . Zend_Controller_Front::getInstance()->getRequest()->getParam('user_id', 0) . '" ')));
     $emailaddress->getValidator('Db_NoRecordExists')->setMessage('Email already exists.');
     $role_id = '';
     if ($emproleStr) {
         $rolArr = explode('_', $emproleStr);
         if (!empty($rolArr)) {
             if (isset($rolArr[0])) {
                 $role_id = $rolArr[0];
             }
         }
     }
     $emprole = new Zend_Form_Element_Select("emprole");
     $emprole->setRegisterInArrayValidator(false);
     $emprole->setRequired(true);
     $emprole->setLabel("Role");
     $emprole->setAttrib("class", "formDataElement");
     $emprole->addValidator('NotEmpty', false, array('messages' => 'Please select role.'));
     $emprole->addValidator(new Zend_Validate_Db_RecordExists(array('table' => 'main_roles', 'field' => 'id', 'exclude' => 'isactive = 1 and id="' . $role_id . '" ')));
     $emprole->getValidator('Db_RecordExists')->setMessage('Selected role is deleted.');
     $hid_modeofentry = new Zend_Form_Element_Hidden('hid_modeofentry');
     $hid_rccandidatename = new Zend_Form_Element_Hidden('hid_rccandidatename');
     $act_inact = new Zend_Form_Element_Checkbox("act_inact");
     $disp_requi = new Zend_Form_Element_Text('disp_requi');
     $disp_requi->setAttrib('readonly', 'readonly');
     $disp_requi->setAttrib('onfocus', 'this.blur()');
     //end of fields from user management
     $this->addElements(array($id, $userid, $reportingmanager, $empstatus, $businessunit, $department, $jobtitle, $position, $prefix_id, $extension_number, $office_number, $office_faxnumber, $yearsofexp, $date_of_joining, $date_of_leaving, $submit, $employeeId, $modeofentry, $candidatereferredby, $rccandidatename, $emailaddress, $emprole, $hid_modeofentry, $hid_rccandidatename, $other_modeofentry, $act_inact, $disp_requi, $first_name, $last_name));
     $this->setElementDecorators(array('ViewHelper'));
     $this->setElementDecorators(array('UiWidgetElement'), array('date_of_joining', 'date_of_leaving'));
 }