Exemplo n.º 1
0
 public function indexAction()
 {
     $form = new ZendX_JQuery_Form();
     $date1 = new ZendX_JQuery_Form_Element_DatePicker('date1', array('label' => 'Date:'));
     $form->addElement($date1);
     $elem = new ZendX_JQuery_Form_Element_Spinner('spinner1', array('label' => 'Spinner:'));
     $elem->setJQueryParams(array('min' => 0, 'max' => 1000, 'start' => 100));
     $form->addElement($elem);
     $this->view->form = $form;
 }
Exemplo n.º 2
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));
 }
Exemplo n.º 3
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')));
 }
Exemplo n.º 4
0
 public function addElement($element, $name = null, $options = null, $bAddEmpty = true)
 {
     if (!$options) {
         $options = array();
     }
     if (!isset($options['class'])) {
         $options['class'] = self::DEFAULT_INPUT_CLS;
     }
     if ($element == 'select' and $bAddEmpty) {
         if (!isset($options['multiOptions'])) {
             $options['multiOptions'] = array();
         }
         $options['multiOptions'] = array('' => 'wybierz') + $options['multiOptions'];
     }
     if (isset($this->_option['readonly'])) {
         if ($element == 'select') {
             $options['disabled'] = 'disabled';
         } else {
             if ($element == 'button') {
                 if ($name == 'submit') {
                     $options['class'] = 'hideFormHidden';
                 }
                 if ($name == 'cancel') {
                     $options['label'] = str_replace($options['label'], "Anuluj", "Powrót");
                 }
             } else {
                 $options['class'] = self::DEFAULT_INPUT_CLS;
                 $options['readonly'] = true;
             }
         }
     }
     return parent::addElement($element, $name, $options);
 }
Exemplo n.º 5
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));
 }
Exemplo n.º 6
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));
 }
Exemplo n.º 7
0
 /**
  * Set the view object
  *
  * Ensures that the view object has the jQuery view helper path set.
  *
  * @param  Zend_View_Interface $view
  * @return Dkplus_JQuery_Form
  */
 public function setView(Zend_View_Interface $view = null)
 {
     if (null !== $view) {
         if (false === $view->getPluginLoader('helper')->getPaths('Dkplus_JQuery_View_Helper')) {
             $view->addHelperPath('Dkplus/JQuery/View/Helper', 'Dkplus_JQuery_View_Helper');
         }
     }
     return parent::setView($view);
 }
Exemplo n.º 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));
 }
Exemplo n.º 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));
 }
Exemplo n.º 10
0
 /**
  * Render form
  *
  * @param  Zend_View_Interface $view
  * @return string
  */
 public function render(Zend_View_Interface $view = null)
 {
     if ($this->isEnableRenderJqueryValidator()) {
         $this->_jquery->addJavascriptFile($this->_jqueryValidatePlugin);
         $this->_jquery->addJavascriptFile($this->_jqueryValidateExtendedPlugin);
         $js = '' . $this->getJqueryValidatorVar() . ' = $("#' . $this->getId() . '").validate(' . $this->renderJqueryValidatorOptions() . ');';
         $this->_jquery->addOnLoad(@$js);
     }
     $content = parent::render($view);
     return $content;
 }
Exemplo n.º 11
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));
 }
Exemplo n.º 12
0
 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);
 }
Exemplo n.º 13
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));
 }
Exemplo n.º 14
0
 public function getSubForm($name)
 {
     $subFormName = array_search($name, $this->_aMapAction);
     $subForm = parent::getSubForm($subFormName);
     //$aParams = $this->_controller->getRequest()->getParam($subForm->getName());
     //echo $name . '-' . $aParams['form'];
     //print_r($aParams); exit;
     if ($this->_controller->getRequest()->isPost() and $subForm->isValid($this->_controller->getRequest()->getPost())) {
         $this->setStorage($subForm);
         $redirector = Zend_Controller_Action_HelperBroker::getStaticHelper('Redirector');
         $redirector->setGotoRoute(array(), $this->getNextAction($subForm));
         //$redirector->gotoRoute(array('action' => $this->getNextAction($subForm)));
     }
     $subForm->populate($this->getStorage());
     return $subForm;
 }
Exemplo n.º 15
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));
 }
Exemplo n.º 16
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);
 }
Exemplo n.º 17
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));
 }
Exemplo n.º 18
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));
 }
Exemplo n.º 19
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));
 }
Exemplo n.º 20
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));
 }
Exemplo n.º 21
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));
 }
Exemplo n.º 22
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));
 }
Exemplo n.º 23
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));
 }
Exemplo n.º 24
0
 public function testJQueryFormShouldAutomaticallyEnableView()
 {
     $form = new ZendX_JQuery_Form();
     $view = new Zend_View();
     $this->assertFalse(false !== $view->getPluginLoader('helper')->getPaths('ZendX_JQuery_View_Helper'));
     $form->setView($view);
     $this->assertTrue(false !== $form->getView()->getPluginLoader('helper')->getPaths('ZendX_JQuery_View_Helper'));
 }
Exemplo n.º 25
0
 public function __construct($options = null)
 {
     Zmz_Form_Initialize::init($this);
     parent::__construct($options);
 }
Exemplo n.º 26
0
 /**
  * @group ZF-5043
  */
 public function testFormWithoutIdButSubformsProducesArrayNotationWhichWontWork()
 {
     $view = new Zend_View();
     $form = new ZendX_JQuery_Form();
     $datePicker = new ZendX_JQuery_Form_Element_DatePicker("dp1");
     $subform = new Zend_Form_SubForm();
     $subform->addElement($datePicker);
     $form->addSubForm($subform, "sf1");
     $form->setIsArray(true);
     $form = $form->render($view);
     $jquery = $view->jQuery()->__toString();
     $this->assertContains('sf1[dp1]', $form);
     $this->assertNotContains('$("#sf1[dp1]")', $jquery);
 }
 /**
  * @group ZF-8055
  */
 public function testUiWidgetDialogContainerRenderBug()
 {
     $view = new Zend_View();
     ZendX_JQuery::enableView($view);
     // Create new jQuery Form
     $form = new ZendX_JQuery_Form();
     $form->setView($view);
     $form->setAction('formdemo.php');
     $form->setAttrib('id', 'mainForm');
     // Use a TabContainer for your form:
     $form->setDecorators(array('FormElements', 'Form', array('DialogContainer', array('id' => 'tabContainer', 'style' => 'width: 600px;', 'jQueryParams' => array('tabPosition' => 'top')))));
     $subForm1 = new ZendX_JQuery_Form('subform1');
     $subForm1->setView($view);
     // Add Element Spinner
     $elem = new ZendX_JQuery_Form_Element_Spinner("spinner1", array('label' => 'Spinner:', 'attribs' => array('class' => 'flora')));
     $elem->setJQueryParams(array('min' => 0, 'max' => 1000, 'start' => 100));
     $subForm1->addElement($elem);
     $subForm1->setDecorators(array('FormElements', array('HtmlTag', array('tag' => 'dl'))));
     $form->addSubForm($subForm1, "form1");
     $output = $form->render($view);
     $this->assertContains('<div id="tabContainer" style="width: 600px;"><form', $output);
 }
Exemplo n.º 28
0
 public function populate(array $array)
 {
     foreach ($array as $ar => $v) {
         preg_match('/\\[\\d+\\]/', $ar, $matches);
         if ($matches) {
             $string = preg_replace('/\\[\\d+\\]/', '', $ar);
             $array[$string][] = $v;
         }
     }
     parent::populate($array);
 }
Exemplo n.º 29
0
 /**
  * Adiciona um agrupador de campos
  * 
  * @param array $elements
  * @param type $name
  * @param array $options 
  */
 public function addDisplayGroup(array $elements, $name, $options = null)
 {
     $options['displayGroupClass'] = 'ZendT_Form_DisplayGroup';
     parent::addDisplayGroup($elements, $name, $options);
     if ($options['legend']) {
         $this->_displayGroups[$name]->setLegend($options['legend']);
     }
     if ($options['id']) {
         $this->_displayGroups[$name]->setAttrib('id', $options['id']);
     }
 }
Exemplo n.º 30
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));
 }