예제 #1
0
파일: Form.php 프로젝트: massimozappino/zmz
 public function __construct($options = null)
 {
     Zmz_Form_Initialize::init($this);
     $jqueryHelper = new ZendX_JQuery_View_Helper_JQuery();
     $this->_jquery = $jqueryHelper->jQuery();
     parent::__construct($options);
 }
예제 #2
0
 public function __construct($options = null)
 {
     $this->addPrefixPath('My_Form_', 'My/Form/');
     parent::__construct($options);
     $this->addElement('validateText', 'username', array('label' => 'Username', 'formId' => 'login', 'trim' => true, 'required' => true, 'validators' => array(array('validator' => 'StringLength', 'options' => array(5, 15))), 'class' => 'required', 'js' => array('minlength' => '5', 'maxlength' => '15', 'class' => 'required input')));
     $this->addElement('validateText', 'password', array('label' => 'Password', 'formId' => 'login', 'password' => true, 'trim' => true, 'required' => true, 'validators' => array(array('validator' => 'StringLength', 'options' => array(5, 15))), 'class' => 'required', 'js' => array('minlength' => '5', 'maxlength' => '15', 'class' => 'required input')));
 }
예제 #3
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));
 }
예제 #4
0
 public function __construct($option = array())
 {
     $this->addPrefixPath('Common_Form_Decorator', 'Common/Form/Decorator', 'decorator');
     $oRegistry = Zend_Registry::getInstance();
     $this->_oConfig = $oRegistry->get(REGISTRY_CONFIG);
     $this->_option = $option;
     $this->_oRequest = Zend_Controller_Front::getInstance()->getRequest();
     if (isset($option['decorators'])) {
         $this->setDecorators($option['decorators']);
     } else {
         $this->addDecorators(array('FormElements', array('HtmlTag', array('tag' => 'div', 'class' => 'form')), 'Form'));
     }
     // first set up the $elementDecoratorsNoTag decorator, this is a copy of our regular element decorators, but do not get wrapped in a div tag
     foreach ($this->elementDecorators as $decorator) {
         if (is_array($decorator) && $decorator[0] == 'HtmlTag') {
             continue;
             // skip copying this value to the decorator
         }
         $this->elementDecoratorsNoTag[] = $decorator;
     }
     // set the default decorators to our element decorators, any elements added to the form
     // will use these decorators
     $this->setElementDecorators($this->elementDecorators);
     parent::__construct();
 }
예제 #5
0
 public function __construct()
 {
     parent::__construct();
     //$fieldtype,$fieldname,$table,$columnname,$cssname,$labelname,$required,$validationtype,$min,$max,$decorator,$value
     $formfield = new App_Form_Field();
     $datefrom = $formfield->field('Select', 'glsubcode', '', '', 'mand', 'Sub ledger', true, '', '', '', '', '', 0, '');
     //add element to form
     $this->addElements(array($datefrom));
 }
예제 #6
0
 public function __construct($options = null)
 {
     Zend_Dojo::enableForm($this);
     parent::__construct($options);
     $accountnumber = new Zend_Form_Element_Text('accountnumber');
     $accountnumber->setAttrib('class', 'txt_put');
     $submit = new Zend_Form_Element_Submit('Search');
     $this->addElements(array($accountnumber, $submit));
 }
예제 #7
0
파일: Form.php 프로젝트: rtsantos/mais
 /**
  *
  * @param array $options 
  */
 public function __construct($options = null)
 {
     parent::__construct($options);
     $this->_errorsValid = array();
     $this->_enablejQueryValidate = false;
     $this->_enableFocusFirstElement = true;
     #$this->setAttrib('id', 'zendt_form');
     $this->setName('zendt_form');
 }
예제 #8
0
 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');
     $submit = new Zend_Form_Element_Submit('Search');
     $pdf = new Zend_Form_Element_Submit('PDF');
     $this->addElements(array($field1, $submit, $pdf));
 }
예제 #9
0
 public function __construct($options = null)
 {
     Zend_Dojo::enableForm($this);
     parent::__construct($options);
     $product_id = new Zend_Form_Element_Select('product_id');
     $product_id->addMultiOption('', 'Select...');
     $product_id->setAttrib('class', 'txt_put');
     $product_id->setRequired(true)->addValidators(array(array('NotEmpty')));
     $offerproductname = new Zend_Form_Element_Text('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_Form_Element_Text('offerproductshortname');
     $offerproductshortname->setAttrib('class', 'txt_put');
     $offerproductshortname->setRequired(true)->addValidators(array(array('NotEmpty')));
     $offerproduct_description = new Zend_Form_Element_Textarea('offerproduct_description', array('rows' => 3, 'cols' => 20));
     $offerproduct_description->setAttrib('class', '');
     $offerproduct_description->setRequired(true)->addValidators(array(array('NotEmpty')));
     $begindate = new Zend_Form_Element_Text('begindate');
     $begindate->setAttrib('class', 'txt_put');
     $begindate->setRequired(true)->addValidator(new Zend_Validate_Date('YYYY-MM-DD'), true);
     $closedate = new Zend_Form_Element_Text('closedate');
     $closedate->setAttrib('class', 'txt_put');
     $closedate->setRequired(true)->addValidator(new Zend_Validate_Date('YYYY-MM-DD'), true);
     $applicableto = new Zend_Form_Element_Select('applicableto');
     $applicableto->addMultiOption('', 'Select...');
     $applicableto->setAttrib('class', 'txt_put');
     $applicableto->setRequired(true)->addValidators(array(array('NotEmpty')));
     $minmumloanamount = new Zend_Form_Element_Text('minmumloanamount');
     $minmumloanamount->setAttrib('class', 'txt_put');
     $maximunloanamount = new Zend_Form_Element_Text('maximunloanamount');
     $maximunloanamount->setAttrib('class', 'txt_put');
     $minimumfrequency = new Zend_Form_Element_Text('minimumfrequency');
     $minimumfrequency->setAttrib('class', 'txt_put');
     $minimumfrequency->setRequired(true)->addValidators(array(array('NotEmpty')));
     $maximumfrequency = new Zend_Form_Element_Text('maximumfrequency');
     $maximumfrequency->setAttrib('class', 'txt_put');
     $maximumfrequency->setRequired(true)->addValidators(array(array('NotEmpty')));
     $graceperiodnumber = new Zend_Form_Element_Text('graceperiodnumber');
     $graceperiodnumber->setAttrib('class', 'txt_put');
     $graceperiodnumber->setRequired(true)->addValidators(array(array('NotEmpty')));
     $penal_Interest = new Zend_Form_Element_Text('penal_Interest');
     $penal_Interest->setAttrib('class', 'txt_put');
     $period_ofrange_monthfrom = new Zend_Form_Element_Text('period_ofrange_monthfrom');
     $period_ofrange_monthfrom->setAttrib('class', 'txt_put');
     $period_ofrange_monthfrom->setAttrib('size', '5');
     $period_ofrange_monthto = new Zend_Form_Element_Text('period_ofrange_monthto');
     $period_ofrange_monthto->setAttrib('class', 'txt_put');
     $period_ofrange_monthto->setAttrib('size', '5');
     $Interest = new Zend_Form_Element_Text('Interest');
     $Interest->setAttrib('class', 'txt_put');
     $Interest->setAttrib('size', '5');
     $submit = new Zend_Form_Element_Submit('Submit');
     $this->addElements(array($offerproductname, $offerproductshortname, $offerproduct_description, $begindate, $closedate, $penal_Interest, $applicableto, $minmumloanamount, $maximunloanamount, $minimumfrequency, $maximumfrequency, $graceperiodnumber, $fund_id, $product_id, $submit, $period_ofrange_monthfrom, $period_ofrange_monthto, $Interest));
 }
예제 #10
0
 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));
 }
예제 #11
0
파일: Form.php 프로젝트: Webowiec/zendnote
 public function __construct($option)
 {
     $oRegistry = Zend_Registry::getInstance();
     $this->_oConfig = $oRegistry->get(REGISTRY_CONFIG);
     $this->_option = $option;
     if (isset($option['request'])) {
         $this->_oRequest = $option['request'];
         unset($option['request']);
     } else {
         $this->_oRequest = Zend_Controller_Front::getInstance()->getRequest();
         //throw new Exception('Obiekt requestu wymagany!');
     }
     parent::__construct($option);
 }
예제 #12
0
 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_TextBox('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_TextBox('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');
     $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_TextBox('maximunloanamount');
     $maximunloanamount->setAttrib('class', 'txt_put');
     $maximunloanamount->setRequired(true);
     $validator = new Zend_Validate_Digits();
     $maximunloanamount->addValidator($validator, true);
     $minimumfrequency = new Zend_Dojo_Form_Element_TextBox('minimumfrequency');
     $minimumfrequency->setAttrib('class', 'txt_put');
     $minimumfrequency->setRequired(true)->addValidators(array(array('NotEmpty')));
     $maximumfrequency = new Zend_Dojo_Form_Element_TextBox('maximumfrequency');
     $maximumfrequency->setAttrib('class', 'txt_put');
     $maximumfrequency->setRequired(true)->addValidators(array(array('NotEmpty')));
     $graceperiodnumber = new Zend_Dojo_Form_Element_TextBox('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));
 }
예제 #13
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));
 }
예제 #14
0
 /**
  * Set form elements for a Content_Node object
  *
  * @param Content_Node $target
  * @param string $action
  * @param array $options
  */
 function __construct(Content_Node $target, $action, $options = array())
 {
     parent::__construct($options);
     $this->setAction($action)->setMethod('post');
     $this->setAttrib('id', 'content_form');
     $type = Zoo::getService('content')->getType($target->type);
     try {
         Zoo::getService("hook")->trigger("Node", "Form", $this, $target);
     } catch (Zoo_Exception_Service $e) {
         // Hook service not available - log? Better not, some people may live happily without a hook service
     }
     if ($type->has_publishdate_select) {
         // Add publish date and approval settings
         $status = new Zend_Form_Element_Radio('status', array('class' => 'content_status'));
         $status->setLabel('Status');
         $status->addMultiOption(0, Zoo::_('Unpublished'));
         $status->addMultiOption(1, Zoo::_('Published'));
         //$status->addMultiOption(2, Zoo::_('Ready for review'));
         $publishdate = new ZendX_JQuery_Form_Element_DatePicker('published');
         $publishdate->setLabel('Publish date');
         $this->addElements(array($status, $publishdate));
         $this->addDisplayGroup(array('status', 'published'), 'content_publish', array('legend' => Zoo::_("Publish settings")));
         //Workaround for JQuery Theme
         /**
          * @todo replace with unified jquery UI theme selector
          */
         $view = Zend_Controller_Action_HelperBroker::getStaticHelper('viewRenderer')->view;
         $view->headLink()->appendStylesheet('http://ajax.googleapis.com/ajax/libs/jqueryui/1.7.2/themes/smoothness/jquery-ui.css');
     }
     $submit = new Zend_Form_Element_Submit('save');
     $submit->setLabel('Save');
     $this->addElement($submit);
     if ($target->id > 0) {
         $id_ele = new Zend_Form_Element_Hidden('id');
         $id_ele->setValue(intval($target->id));
         $this->addElement($id_ele);
     } else {
         $target->status = 0;
     }
     $this->addElement(new Zend_Form_Element_Hidden('type', array('value' => $target->type)));
     $this->addElement(new Zend_Form_Element_Hidden('pid', array('value' => $target->pid)));
     $populate = $target->toArray();
     $populate['published'] = date("d M y", $target->published ? $target->published : time());
     $this->populate($populate);
 }
예제 #15
0
 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');
     $field4 = new Zend_Form_Element_Text('field4');
     $field4->setAttrib('class', 'txt_put');
     $field4->setRequired(true);
     $submit = new Zend_Form_Element_Submit('Search');
     $pdf = new Zend_Form_Element_Submit('PDF');
     $this->addElements(array($field1, $field2, $field3, $field4, $submit, $pdf));
 }
예제 #16
0
 public function __construct($path)
 {
     parent::__construct();
     //$fieldtype,$fieldname,$table,$columnname,$cssname,$labelname,$required,$validationtype,$min,$max,$decorator,$value
     $formfield = new App_Form_Field($path);
     //$vtype=array('Alpha');
     $hierarchy = $formfield->field('Select', 'hierarchy', '', '', 'mand', '', true, '', '', '', '', '', 0, '');
     $hierarchy->setAttrib('onchange', 'getlevels(this.value,"' . $path . '")');
     $hierarchy->setRegisterInArrayValidator(false);
     $hierarchy->setAttribs(array('style' => 'width: 160px;'));
     $branch = $formfield->field('Select', 'branch', '', '', 'mand', 'Branch', true, '', '', '', '', '', 0, '');
     $branch->setAttrib('onchange', 'getgroups(this.value,"' . $path . '")');
     $branch->setRegisterInArrayValidator(false);
     $branch->setAttribs(array('style' => 'width: 160px;'));
     //         		$group = $formfield->field('Select','group','','','mand','Group',false,'','','','','',0,'');
     // 				$group->setRegisterInArrayValidator(false);
     $datefrom = $formfield->field('Text', 'date1', '', '', 'mand', 'From date', true, '', '', '', '', '', 0, '');
     $datefrom->setAttrib('autocomplete', 'off');
     $this->addElements(array($hierarchy, $branch, $datefrom));
 }
예제 #17
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));
 }
예제 #18
0
파일: Form.php 프로젝트: abdala/la
 /**
  *
  * @param array|Zend_Config $options 
  */
 public function __construct($options = null)
 {
     $this->addPrefixPath('La_Form_Decorator', 'La/Form/Decorator', 'decorator')->addPrefixPath('La_Form_Element', 'La/Form/Element', 'element')->addElementPrefixPath('La_Form_Decorator', 'La/Form/Decorator', 'decorator')->addDisplayGroupPrefixPath('La_Form_Decorator', 'La/Form/Decorator')->addPrefixPath('ZendX_JQuery_Form_Decorator', 'ZendX/JQuery/Form/Decorator', 'decorator')->addPrefixPath('ZendX_JQuery_Form_Element', 'ZendX/JQuery/Form/Element', 'element')->addElementPrefixPath('ZendX_JQuery_Form_Decorator', 'ZendX/JQuery/Form/Decorator', 'decorator')->addDisplayGroupPrefixPath('ZendX_JQuery_Form_Decorator', 'ZendX/JQuery/Form/Decorator');
     $this->addElementPrefixPath('La_Filter', 'La/Filter', 'FILTER');
     $this->addElementPrefixPath('La_Validate', 'La/Validate', 'VALIDATE');
     $this->addElementPrefixPath('Zebra_Validate', 'Zebra/Validate', 'VALIDATE');
     if (is_array($options)) {
         $this->setOptions($options);
     } elseif ($options instanceof Zend_Config) {
         $this->setConfig($options);
     }
     $this->setDecorators(array('FormElements', array('HtmlTag', array('tag' => 'div', 'class' => 'zend_form')), 'Form', 'Validator'));
     if ($this->_table) {
         $this->_setDefaultElements();
     }
     parent::__construct($options);
     if ($this->_table) {
         $this->setFilters($this->_table->getFilters());
         $this->setValidators($this->_table->getValidators());
     }
 }
예제 #19
0
 public function __construct($path)
 {
     Zend_Dojo::enableForm($this);
     parent::__construct($path);
     $fromdate = new ZendX_JQuery_Form_Element_DatePicker('fromdate');
     $fromdate->setAttrib('class', 'txt_put');
     $todate = new ZendX_JQuery_Form_Element_DatePicker('todate');
     $todate->setAttrib('class', 'txt_put');
     $branch = new Zend_Form_Element_Select('branch');
     $branch->addMultiOption('', 'Select');
     $branch->setAttrib('onchange', 'getOfficer(this.value,"' . $path . '")');
     $branch->setAttrib('class', 'txt_put');
     $branch->setAttrib('id', 'branchID');
     $officer = new Zend_Form_Element_Select('officer');
     $officer->addMultiOption('', 'Select');
     $officer->setAttrib('class', 'txt_put');
     $officer->setRegisterInArrayValidator(false);
     $submit = new Zend_Form_Element_Submit('Search');
     $pdf = new Zend_Form_Element_Submit('PDF');
     $this->addElements(array($fromdate, $todate, $branch, $officer, $submit, $pdf));
 }
예제 #20
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));
 }
예제 #21
0
 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));
 }
예제 #22
0
 public function __construct($options = null)
 {
     Zend_Dojo::enableForm($this);
     parent::__construct($options);
     $this->setName('article_form')->setAction(URL . '/admin/article/save')->setMethod('post')->addPrefixPath('MF_Form_Element', 'MF/Form/Element/', 'element')->setAttrib('enctype', 'multipart/form-data')->setAttrib('id', 'article-form');
     $product_id = new Zend_Form_Element_Select('product_id');
     $product_id->addMultiOption('', 'Select...');
     $product_id->setAttrib('class', 'txt_put');
     $product_id->setRequired(true)->addValidators(array(array('NotEmpty')));
     $offerproductname = new Zend_Form_Element_Text('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_Form_Element_Text('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_Form_Element_Textarea('offerproduct_description', array('rows' => 3, 'cols' => 20));
     $offerproduct_description->setAttrib('class', '');
     $offerproduct_description->setRequired(true)->addValidators(array(array('NotEmpty')));
     $begindate = new Zend_Form_Element_Text('begindate');
     $begindate->setAttrib('class', 'txt_put');
     $begindate->setRequired(true)->addValidator(new Zend_Validate_Date('YYYY-MM-DD'), true);
     $closedate = new Zend_Form_Element_Text('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_Form_Element_Select('applicableto');
     $applicableto->addMultiOption('', 'Select...');
     $applicableto->setAttrib('class', 'txt_put');
     $applicableto->setRequired(true)->addValidators(array(array('NotEmpty')));
     $capital_glsubcode_id = new Zend_Form_Element_Select('capital_glsubcode_id');
     $capital_glsubcode_id->addMultiOption('', 'Select...');
     $capital_glsubcode_id->setAttrib('class', 'txt_put');
     $capital_glsubcode_id->setRequired(true)->addValidators(array(array('NotEmpty')));
     $Interest_glsubcode_id = new Zend_Form_Element_Select('Interest_glsubcode_id');
     $Interest_glsubcode_id->addMultiOption('', 'Select...');
     $Interest_glsubcode_id->setAttrib('class', 'txt_put');
     $Interest_glsubcode_id->setRequired(true)->addValidators(array(array('NotEmpty')));
     $minmumloanamount = new Zend_Form_Element_Text('minmumloanamount');
     $minmumloanamount->setAttrib('class', 'txt_put');
     $minmumloanamount->setRequired(true)->addValidators(array(array('NotEmpty')));
     $maximunloanamount = new Zend_Form_Element_Text('maximunloanamount');
     $maximunloanamount->setAttrib('class', 'txt_put');
     $maximunloanamount->setRequired(true);
     $validator = new Zend_Validate_Digits();
     $maximunloanamount->addValidator($validator, true);
     $minimumfrequency = new Zend_Form_Element_Text('minimumfrequency');
     $minimumfrequency->setAttrib('class', 'txt_put');
     $minimumfrequency->setRequired(true)->addValidators(array(array('NotEmpty')));
     $maximumfrequency = new Zend_Form_Element_Text('maximumfrequency');
     $maximumfrequency->setAttrib('class', 'txt_put');
     $maximumfrequency->setRequired(true)->addValidators(array(array('NotEmpty')));
     $graceperiodnumber = new Zend_Form_Element_Text('graceperiodnumber');
     $graceperiodnumber->setAttrib('class', 'txt_put');
     $graceperiodnumber->setRequired(true)->addValidators(array(array('NotEmpty')));
     $fee_glsubcode_id = new Zend_Form_Element_Select('fee_glsubcode_id');
     $fee_glsubcode_id->addMultiOption('', 'Select...');
     $fee_glsubcode_id->setAttrib('class', 'txt_put');
     $fee_glsubcode_id->setRequired(true)->addValidators(array(array('NotEmpty')));
     $fee_id = new Zend_Form_Element_MultiCheckbox('fee_id');
     $fund_id = new Zend_Form_Element_MultiCheckbox('fund_id');
     $submit = new Zend_Form_Element_Submit('Submit');
     $submit = new Zend_Form_Element_Submit('Submit');
     $this->addElements(array($offerproductname, $offerproductshortname, $offerproduct_description, $begindate, $closedate, $applicableto, $capital_glsubcode_id, $Interest_glsubcode_id, $minmumloanamount, $maximunloanamount, $minimumfrequency, $maximumfrequency, $graceperiodnumber, $fee_glsubcode_id, $fee_id, $fund_id, $product_id, $submit));
 }
예제 #23
0
 public function __construct($options = null)
 {
     Zmz_Form_Initialize::init($this);
     parent::__construct($options);
 }
예제 #24
0
 public function __construct($haveToPay, $currentdate, $fromDate)
 {
     parent::__construct($haveToPay, $currentdate, $fromDate);
     $accountId = new Zend_Form_Element_Hidden('accountcode');
     $installment_status = new Zend_Form_Element_Hidden('installment_status');
     $memberId = new Zend_Form_Element_Hidden('membercode');
     $amount = new Zend_Form_Element_Text('amount');
     $amount->setRequired(true)->addValidators(array(array('Float')));
     $amount->setAttrib('class', 'txt_put');
     $amount->setAttrib('id', 'amount');
     $loanInterestAmountPaied = new Zend_Form_Element_Text('loanInterestAmountPaied');
     $loanInterestAmountPaied->setAttrib('class', 'textfieldreadonly');
     $loanInterestAmountPaied->setAttrib('readonly', 'true');
     $loanInterestAmountPaied->setAttrib('id', 'loanInterestAmountPaied');
     $installmentprinciple = new Zend_Form_Element_Text('installmentprinciple');
     $installmentprinciple->setAttrib('class', 'textfieldreadonly');
     $installmentprinciple->setAttrib('readonly', 'true');
     $installmentprinciple->setAttrib('id', 'installmentprinciple');
     $loanRepaymentDate = new ZendX_JQuery_Form_Element_DatePicker('loanRepaymentDate');
     $loanRepaymentDate->setAttrib('id', 'loanRepaymentDate');
     $loanRepaymentDate->setAttrib('class', 'txt_put');
     $loanRepaymentDate->setRequired(true)->addValidators(array(array('Date', true), array('Between', false, array($fromDate, $currentdate, 'messages' => array('notBetween' => 'date should be between ' . $fromDate . ' to (today date) ' . $currentdate)))));
     $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);
     $transactionremarks = new Zend_Form_Element_Textarea('transactionremarks');
     $transactionremarks->setAttrib('class', 'textfield');
     $transactionremarks->setAttrib('id', 'transactionremarks');
     $transactionremarks->setAttrib('rows', '2');
     $transactionremarks->setAttrib('cols', '23');
     $transactionremarks->setRequired(true);
     $pay = new Zend_Form_Element_Submit('pay');
     $pay->setAttrib('class', 'officesubmit');
     $pay->setAttrib('onclick', 'getState(this.value)');
     $pay->setLabel('pay');
     $back = new Zend_Form_Element_Submit('back');
     $back->setAttrib('class', 'officesubmit');
     $confirm = new Zend_Form_Element_Submit('confirm');
     $confirm->setAttrib('class', 'officesubmit');
     $confirm->setAttrib('onclick', 'getState(this.value)');
     $confirm->setLabel('confirm');
     $categoryId = new Zend_Form_Element_Hidden('categoryId');
     $categoryId->setAttrib('class', 'txt_put');
     $amount1 = new Zend_Form_Element_Hidden('repayableamounts1');
     $loanRepaymentDate1 = new Zend_Form_Element_Hidden('loanRepaymentDate1');
     $transactionMode1 = new Zend_Form_Element_Hidden('transactionMode1');
     $paymenttype_details1 = new Zend_Form_Element_Hidden('paymenttype_details1');
     $fine1 = new Zend_Form_Element_Hidden('fine1');
     $transactionremarks1 = new Zend_Form_Element_Hidden('transactionremarks1');
     $this->addElements(array($accountId, $amount, $loanRepaymentDate, $pay, $memberId, $loanInterestAmountPaied, $transactionMode, $transactionModeDetails, $categoryId, $installment_status, $confirm, $amount1, $loanRepaymentDate1, $transactionMode1, $paymenttype_details1, $fine1, $back, $transactionremarks, $transactionremarks1, $installmentprinciple));
 }
예제 #25
0
 /**
  * Constructor
  *
  * @param  array|Zend_Config|null $options
  * @return void
  */
 public function __construct($options = null)
 {
     $this->addPrefixPath('Dkplus_JQuery_Form_Decorator', 'Dkplus/JQuery/Form/Decorator', Zend_Form::DECORATOR)->addPrefixPath('Dkplus_JQuery_Form_Element', 'Dkplus/JQuery/Form/Element', Zend_Form::ELEMENT)->addElementPrefixPath('Dkplus_JQuery_Form_Decorator', 'Dkplus/JQuery/Form/Decorator', Zend_Form::DECORATOR)->addDisplayGroupPrefixPath('Dkplus_JQuery_Form_Decorator', 'Dkplus/JQuery/Form/Decorator');
     parent::__construct($options);
 }
예제 #26
0
 public function __construct($begindate, $closedate, $minimum_deposit_amount, $maximum_deposit_amount, $app)
 {
     parent::__construct($begindate, $closedate, $minimum_deposit_amount, $maximum_deposit_amount, $app);
     $startdate = new ZendX_JQuery_Form_Element_DatePicker('startdate');
     $startdate->setAttrib('class', '');
     $startdate->setAttrib('size', '10');
     $startdate->setJQueryParam('dateFormat', 'yy-mm-dd');
     $startdate->setRequired(true)->addValidators(array(array('Date', true), array('Between', false, array($begindate, $closedate, 'messages' => array('notBetween' => 'date should be between ' . $begindate . ' to (Closed date) ' . $closedate)))));
     $recurringamount = new Zend_Form_Element_Text('recurringamount');
     $recurringamount->setAttrib('id', 'recurringamount');
     $recurringamount->setAttrib('size', '10');
     $recurringamount->setRequired(true)->addValidators(array(array('GreaterThan', false, array($minimum_deposit_amount)), array('LessThan', false, array($maximum_deposit_amount)), array('NotEmpty')));
     $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', '8');
     $recurringindex = new Zend_Form_Element_Text('recurringinterest');
     $recurringindex->setAttrib('id', 'recurringinterest');
     $recurringindex->setAttrib('size', '8');
     $recurringindex->setAttrib('class', 'NormalBtn');
     $recurringindex->setAttrib('readonly', 'true');
     $totalamount = new Zend_Form_Element_Text('totalamount');
     $totalamount->setAttrib('class', 'NormalBtn');
     $totalamount->setAttrib('id', 'totalamount');
     $totalamount->setAttrib('size', '11');
     $totalamount->setRequired(true);
     $totalamount->setAttrib('readonly', 'true');
     $totalamount->setAttrib('onclick', 'AutoFill()');
     $accountId = new Zend_Form_Element_Hidden('accountId');
     $productId = new Zend_Form_Element_Hidden('productId');
     $memberId = new Zend_Form_Element_Hidden('memberId');
     $feeTotal = new Zend_Form_Element_Hidden('feeTotal');
     $capitalamount = new Zend_Form_Element_Hidden('capitalamount');
     $maturedinterestamount = new Zend_Form_Element_Hidden('maturedintrestamount');
     $paymenttype = new Zend_Form_Element_Select('paymenttype');
     $paymenttype->addMultiOption('', 'select..');
     $paymenttype->setAttrib('class', 'NormalBtn');
     $paymenttype->setAttrib('id', 'paymenttype');
     $paymenttype->setAttrib('onchange', 'toggleField();');
     $paymenttype->setRequired(true);
     $description = new Zend_Form_Element_Textarea('transactiondescription');
     $description->setAttrib('class', 'textfield');
     $description->setAttrib('rows', '2');
     $description->setAttrib('cols', '20');
     $no = new Zend_Form_Element_Textarea('paymenttype_details');
     $no->setAttrib('class', 'textfield');
     $no->setAttrib('rows', '1');
     $no->setAttrib('cols', '20');
     $no->setAttrib('id', 'paymenttype_details');
     $no->setAttrib('style', 'display:none;');
     $no->setRequired(true);
     $payableamount = new Zend_Form_Element_Text('payableamount');
     $payableamount->setAttrib('class', 'textfield');
     $payableamount->setAttrib('size', '11');
     $payableamount->setAttrib('readonly', 'true');
     $payableamount->setAttrib('onclick', 'AutoFill()');
     $startdate1 = new Zend_Form_Element_Hidden('startdate1');
     $perioddescription1 = new Zend_Form_Element_Hidden('perioddescription1');
     $interest1 = new Zend_Form_Element_Hidden('interest1');
     $recurringamount1 = new Zend_Form_Element_Hidden('recurringamount1');
     $paymenttype1 = new Zend_Form_Element_Hidden('paymenttype1');
     $paymenttype_details1 = new Zend_Form_Element_Hidden('paymenttype_details1');
     $transactiondescription1 = new Zend_Form_Element_Hidden('transactiondescription1');
     $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', 'Submit');
     $this->addElements(array($recurringindex, $recurringamount, $startdate, $perioddescription, $periodinterest, $accountId, $productId, $memberId, $submit, $maturedinterestamount, $capitalamount, $totalamount, $paymenttype, $description, $no, $feeTotal, $payableamount, $Confirm, $startdate1, $perioddescription1, $interest1, $recurringamount1, $paymenttype1, $paymenttype_details1, $transactiondescription1));
 }