Пример #1
0
 public function __construct($currencysymbol)
 {
     Zend_Dojo::enableForm($this);
     parent::__construct($options);
     $feename = new Zend_Form_Element_Text('feename');
     $feename->addValidator(new Zend_Validate_Db_NoRecordExists('ourbank_feedetails', 'feename'));
     $feename->setAttrib('class', 'txt_put')->setLabel('Fee Name');
     $feename->setRequired(true)->addValidators(array(array('NotEmpty')))->setDecorators(array('ViewHelper', array('Description', array('tag' => '', 'escape' => false)), 'Errors', array(array('data' => 'HtmlTag'), array('tag' => 'td', "'..'")), array('Label', array('tag' => 'td')), array(array('row' => 'HtmlTag'), array('tag' => 'tr'))));
     $feedescription = new Zend_Form_Element_Textarea('feedescription', array('rows' => 3, 'cols' => 20));
     $feedescription->setAttrib('class', '')->setLabel('Description');
     $feedescription->setRequired(true)->addValidators(array(array('NotEmpty')))->setDecorators(array('ViewHelper', array('Description', array('tag' => '', 'escape' => false)), 'Errors', array(array('data' => 'HtmlTag'), array('tag' => 'td')), array('Label', array('tag' => 'td')), array(array('row' => 'HtmlTag'), array('tag' => 'tr'))));
     $feeappliesto_id = new Zend_Form_Element_Select('feeappliesto_id');
     $feeappliesto_id->addMultiOption('', 'Select...');
     $feeappliesto_id->setAttrib('class', 'txt_put')->setLabel('Member Type');
     $feeappliesto_id->setRequired(true)->addValidators(array(array('NotEmpty')))->setDecorators(array('ViewHelper', array('Description', array('tag' => '', 'escape' => false)), 'Errors', array(array('data' => 'HtmlTag'), array('tag' => 'td')), array('Label', array('tag' => 'td')), array(array('row' => 'HtmlTag'), array('tag' => 'tr'))));
     $feefrequency_id = new Zend_Form_Element_Select('feefrequency_id');
     $feefrequency_id->addMultiOption('', 'Select...');
     $feefrequency_id->setAttrib('class', 'txt_put')->setLabel('Fee for');
     $feefrequency_id->setRequired(true)->addValidators(array(array('NotEmpty')))->setDecorators(array('ViewHelper', array('Description', array('tag' => '', 'escape' => false)), 'Errors', array(array('data' => 'HtmlTag'), array('tag' => 'td')), array('Label', array('tag' => 'td')), array(array('row' => 'HtmlTag'), array('tag' => 'tr'))));
     $feevalue = new Zend_Form_Element_Text('feevalue');
     $feevalue->setAttrib('class', 'txt_put')->setLabel('Fee Amount');
     $feevalue->setRequired(true)->addValidators(array(array('NotEmpty')))->setDecorators(array('ViewHelper', array('Description', array('tag' => '', 'escape' => false)), 'Errors', array(array('data' => 'HtmlTag'), array('tag' => 'td')), array('Label', array('tag' => 'td')), array(array('row' => 'HtmlTag'), array('tag' => 'tr'))));
     $fee_id = new Zend_Form_Element_Hidden('fee_id');
     $fee_id->setAttrib('class', 'txt_put');
     $submit = new Zend_Form_Element_Submit('Submit');
     $submit->setAttrib('id', 'Submit')->setDecorators(array('ViewHelper', array('Description', array('tag' => '', 'escape' => false)), 'Errors', array(array('data' => 'HtmlTag'), array('colspan' => '8 ')), array(array('data' => 'HtmlTag'), array('tag' => 'td ', 'colspan' => '8')), array(array('row' => 'HtmlTag'), array('tag' => 'tr'))));
     $this->addElements(array($fee_id, $feename, $feevalue, $feedescription, $feeappliesto_id, $feefrequency_id, $product_id, $submit));
     $this->setDecorators(array('FormElements', array(array('data' => 'HtmlTag'), array('tag' => 'table', 'id' => 'hor-minimalist-b')), 'Form'));
 }
Пример #2
0
 public function __construct($currencysymbol)
 {
     Zend_Dojo::enableForm($this);
     parent::__construct($options);
     $finename = new Zend_Form_Element_Text('finename');
     $finename->setRequired(true)->addValidators(array(array('NotEmpty')));
     $finename->setAttrib('class', 'txt_put');
     $finename->setAttrib('id', 'finename');
     $membertype = new Zend_Form_Element_Select('membertype');
     $membertype->setAttrib('class', 'selectbutton');
     $membertype->setAttrib('id', 'membertype');
     $membertype->setRequired(true)->addValidators(array(array('NotEmpty')));
     $finedescription = new Zend_Form_Element_Text('finedescription');
     $finedescription->setAttrib('class', 'txt_put');
     $finedescription->setAttrib('id', 'finedescription');
     $finedescription->setRequired(true)->addValidators(array(array('NotEmpty')));
     $finevalue = new Zend_Form_Element_Text('finevalue');
     $finevalue->setAttrib('class', 'txt_put');
     $finevalue->setAttrib('id', 'finevalue');
     $finevalue->setAttrib('size', '6');
     $finevalue->setRequired(true)->addValidators(array(array('NotEmpty')));
     $submit = new Zend_Form_Element_Submit('Save');
     $submit->setAttrib('id', 'save');
     $this->addElements(array($finename, $finedescription, $membertype, $finevalue));
     $fineId = new Zend_Form_Element_Hidden('fineId');
     $submit = new Zend_Form_Element_Submit('Submit');
     $submit->setAttrib('class', 'finesubmit');
     $submit->setLabel('submit');
     $this->addElements(array($submit, $fineId));
 }
Пример #3
0
 public function __construct($app, $value)
 {
     Zend_Dojo::enableForm($this);
     parent::__construct($app);
     parent::__construct($value);
     $membertitle = new Zend_Form_Element_Select('membertitle');
     $membertitle->setAttrib('class', 'txt_put');
     $membertitle->setAttrib('id', 'membertitle');
     $membertitle->setAttrib('tabindex', '3');
     $membertitle->setAttrib($value, 'true');
     $memberfirstname = new Zend_Form_Element_Text('memberfirstname');
     $memberfirstname->setAttrib('class', '');
     $memberfirstname->setAttrib('size', '10');
     $memberfirstname->setAttrib('id', 'memberfirstname');
     $memberaddressline1 = new Zend_Form_Element_Text('memberaddressline1');
     $memberaddressline1->setAttrib('class', 'txt_put');
     $memberaddressline1->setAttrib('id', 'memberaddressline1');
     $memberaddressline1->setAttrib('tabindex', '13');
     $memberaddressline1->setAttrib($value, 'true');
     $memberaddressline2 = new Zend_Form_Element_Text('memberaddressline2');
     $memberaddressline2->setAttrib('class', 'txt_put');
     $memberaddressline2->setAttrib('id', 'memberaddressline2');
     $memberaddressline2->setAttrib('tabindex', '14');
     $memberaddressline2->setAttrib($value, 'true');
     $memberaddressline3 = new Zend_Form_Element_Text('memberaddressline3');
     $memberaddressline3->setAttrib('class', 'txt_put');
     $memberaddressline3->setAttrib('id', 'memberaddressline3');
     $memberaddressline3->setAttrib('tabindex', '15');
     $memberaddressline3->setAttrib($value, 'true');
     $membercity = new Zend_Form_Element_Text('membercity');
     $membercity->setAttrib('class', 'txt_put');
     $membercity->setAttrib('id', 'membercity');
     $membercity->setAttrib('tabindex', '16');
     $membercity->setAttrib($value, 'true');
     $familymembername = new Zend_Form_Element_Text('familymembername');
     $familymembername->setAttrib('class', 'txt_put');
     $familymembername->setAttrib('size', '10');
     $familymembername->setAttrib('id', 'familymembername');
     $memberId = new Zend_Form_Element_Text('member_id');
     $memberId->setAttrib('class', 'txt_put');
     $memberId->setAttrib('readonly', 'true');
     $memberId->setAttrib('size', '10');
     $OFFICE_TYPE = new Zend_Form_Element_Select('officeType');
     $OFFICE_TYPE->addMultiOption('', 'Select');
     $OFFICE_TYPE->setAttrib('class', 'txt_put');
     $OFFICE_TYPE->setAttrib('onchange', 'getBranch(this.value,"' . $app . '")');
     $OFFICE_TYPE->setAttrib('tabindex', '1');
     $OFFICE_TYPE->setAttrib($value, 'true');
     $SUB_OFFICE = new Zend_Form_Element_Select('subOffice');
     $SUB_OFFICE->setAttrib('class', 'txt_put');
     $SUB_OFFICE->setAttrib('tabindex', '2');
     $SUB_OFFICE->setAttrib($value, 'true');
     $submit = new Zend_Form_Element_Submit('Save');
     $submit->setAttrib('id', 'save');
     $this->addElements(array($OFFICE_TYPE, $SUB_OFFICE, $memberfirstname, $familymembername, $membertitle, $memberaddressline1, $memberaddressline2, $memberaddressline3, $membercity, $submit, $memberId));
     $memberId = new Zend_Form_Element_Hidden('memberId');
     $submit = new Zend_Form_Element_Submit('Submit');
     $submit->setAttrib('class', 'officesubmit');
     $this->addElements(array($submit, $memberId));
 }
Пример #4
0
 /**
  * Setup the view
  */
 protected function _initViewSettings()
 {
     $this->bootstrap('view');
     $this->_view = $this->getResource('view');
     // add global helpers
     $this->_view->addHelperPath(APPLICATION_PATH . '/views/helpers', 'Zend_View_Helper');
     Zend_Dojo::enableView($this->_view);
     //$this->_view->addHelperPath('Zend/Dojo/View/Helper/', 'Zend_Dojo_View_Helper');
     // set encoding and doctype
     $this->_view->setEncoding('koi8-r');
     $this->_view->doctype('XHTML1_STRICT');
     $config = $this->getResource('config');
     $prefix = $config["urlprefix"];
     // set css links and a special import for the accessibility styles
     //        $this->_view->headStyle()->setStyle('@import "/css/access.css";');
     //        $this->_view->headLink()->appendStylesheet('/reg2/css/reset.css');
     $this->_view->headLink()->appendStylesheet($prefix . '/css/form.css');
     $this->_view->headLink()->appendStylesheet($prefix . '/css/reg2.css');
     // setting the site in the title
     $this->_view->headTitle('ιώβ-10');
     // setting a separator string for segments:
     $this->_view->headTitle()->setSeparator(' - ');
     $viewRenderer = Zend_Controller_Action_HelperBroker::getStaticHelper('ViewRenderer');
     $viewRenderer->setView($this->_view);
     return $this->_view;
 }
Пример #5
0
 public function __construct($options = null)
 {
     Zend_Dojo::enableForm($this);
     parent::__construct($options);
     $category_id = new Zend_Form_Element_Select('category_id');
     $category_id->addMultiOption('', 'Select...');
     $category_id->setAttrib('class', 'txt_put')->setLabel('Category  Name');
     $category_id->setRequired(true)->addValidators(array(array('NotEmpty')))->setDecorators(array('ViewHelper', array('Description', array('tag' => '', 'escape' => false)), 'Errors', array(array('data' => 'HtmlTag'), array('tag' => 'td')), array('Label', array('tag' => 'td')), array(array('row' => 'HtmlTag'), array('tag' => 'tr'))));
     $productname = new Zend_Form_Element_Text('productname');
     $productname->addValidator(new Zend_Validate_Db_NoRecordExists('ourbank_productdetails', 'productname'));
     $productname->setAttrib('class', 'txt_put')->setLabel('Product Name');
     $productname->setRequired(true)->addValidators(array(array('NotEmpty')))->setDecorators(array('ViewHelper', array('Description', array('tag' => '', 'escape' => false)), 'Errors', array(array('data' => 'HtmlTag'), array('tag' => 'td')), array('Label', array('tag' => 'td')), array(array('row' => 'HtmlTag'), array('tag' => 'tr'))));
     $product_id = new Zend_Form_Element_Hidden('product_id');
     $product_id->setAttrib('class', 'txt_put');
     $productshortname = new Zend_Form_Element_Text('productshortname');
     $productshortname->setAttrib('class', 'txt_put')->setLabel('Product Short Name');
     $productshortname->setRequired(true)->addValidators(array(array('NotEmpty')))->setDecorators(array('ViewHelper', array('Description', array('tag' => '', 'escape' => false)), 'Errors', array(array('data' => 'HtmlTag'), array('tag' => 'td')), array('Label', array('tag' => 'td')), array(array('row' => 'HtmlTag'), array('tag' => 'tr'))));
     $product_description = new Zend_Form_Element_Textarea('product_description', array('rows' => 3, 'cols' => 20));
     $product_description->setAttrib('class', '')->setLabel('Productdescription');
     $product_description->setRequired(true)->addValidators(array(array('NotEmpty')))->setDecorators(array('ViewHelper', array('Description', array('tag' => '', 'escape' => false)), 'Errors', array(array('data' => 'HtmlTag'), array('tag' => 'td')), array('Label', array('tag' => 'td')), array(array('row' => 'HtmlTag'), array('tag' => 'tr'))));
     $submit = new Zend_Form_Element_Submit('Submit');
     $submit->setAttrib('id', 'save')->setDecorators(array('ViewHelper', array('Description', array('tag' => '', 'escape' => false)), 'Errors', array(array('data' => 'HtmlTag'), array('colspan' => '8 ')), array(array('data' => 'HtmlTag'), array('tag' => 'td ', 'colspan' => '8')), array(array('row' => 'HtmlTag'), array('tag' => 'tr'))));
     $this->addElements(array($category_id, $productname, $productshortname, $product_description, $product_id, $submit));
     $this->setDecorators(array('FormElements', array(array('data' => 'HtmlTag'), array('tag' => 'table', 'id' => 'hor-minimalist-b')), 'Form'));
 }
Пример #6
0
 public function __construct($options = null)
 {
     Zend_Dojo::enableForm($this);
     parent::__construct($options);
     $app = APPLICATION_PATH;
     $accountHeader = new Zend_Form_Element_Text('accountHeader');
     $accountHeader->setAttrib('class', 'txt_put');
     $accountHeader->setAttrib('id', 'accountHeader');
     $accountHeader->setRequired(true)->addValidators(array(array('NotEmpty')));
     $glcodeDescription = new Zend_Form_Element_Textarea('glcodeDescription', array('rows' => 3, 'cols' => 25));
     $glcodeDescription->setAttrib('id', 'glcodeDescription');
     $glcodeDescription->setRequired(true)->addValidators(array(array('NotEmpty')));
     $product = new Zend_Form_Element_Select('product');
     $product->setAttrib('select', '-----');
     $product->setAttrib('class', 'txt_put');
     $product->setRequired(true)->addValidators(array(array('NotEmpty')));
     $offerproduct = new Zend_Form_Element_Select('offerproduct');
     $offerproduct->setAttrib('select', '-----');
     $offerproduct->setAttrib('class', 'txt_put');
     $subheader = new Zend_Form_Element_Text('subheader');
     $subheader->setAttrib('class', 'txt_put');
     $subheader->setAttrib('id', 'subheader');
     $glsubaccountdescription = new Zend_Form_Element_Textarea('glsubaccountdescription', array('rows' => 3, 'cols' => 25));
     $glsubaccountdescription->setAttrib('id', 'glsubaccountdescription');
     $submit = new Zend_Form_Element_Submit('Save');
     $submit->setAttrib('id', 'Save');
     $submit->setAttrib('class', 'holiday1');
     $this->addElements(array($submit, $accountHeader, $glcodeDescription, $subheader, $glsubaccountdescription, $product, $offerproduct));
     $glcodeUpdateId = new Zend_Form_Element_Hidden('glcodeUpdateId');
     $glsubcodeupdate_id = new Zend_Form_Element_Hidden('glsubcodeupdate_id');
     $submit = new Zend_Form_Element_Submit('Submit');
     $submit->setAttrib('class', 'holiday');
     $this->addElements(array($submit, $glcodeUpdateId, $glsubcodeupdate_id));
 }
Пример #7
0
 protected function _initView()
 {
     $this->bootstrap(array('request'));
     // Initialize view
     $view = new Zend_View();
     $view->setEncoding('UTF-8');
     $view->doctype('XHTML1_STRICT');
     $view->headTitle()->setSeparator(' » ');
     // Save the base URL
     $view->baseUrl = $this->getResource('request')->getBaseUrl();
     // Add it to the ViewRenderer
     $viewRenderer = Zend_Controller_Action_HelperBroker::getStaticHelper('ViewRenderer');
     $viewRenderer->setView($view);
     // Add some stylesheet
     $view->headLink()->appendStylesheet($view->baseUrl . '/css/default.css');
     // Set user info
     /*
     $session = $this->getResource('session');
     $view->userLoggedIn = $session->logged_in;
     $view->userInfo = $session->user;
     */
     $view->addHelperPath(APPLICATION_PATH . '/views/helpers', 'SimpleCal_View_Helper_');
     Zend_Dojo::enableView($view);
     // Return it, so that it can be stored by the bootstrap
     return $view;
 }
Пример #8
0
 public function __construct($options = null)
 {
     Zend_Dojo::enableForm($this);
     parent::__construct($options);
     $holidayname = new Zend_Form_Element_Text('holidayname');
     $holidayname->setAttrib('class', 'txt_put');
     $holidayname->setRequired(true)->addValidators(array(array('NotEmpty')));
     $office_id = new Zend_Form_Element_Select('office_id');
     $holidayname->setAttrib('class', 'txt_put');
     $holidayname->setRequired(true)->addValidators(array(array('NotEmpty')));
     $holiday_id = new Zend_Form_Element_Hidden('holiday_id');
     $holidayname->setAttrib('class', 'txt_put');
     $holidayname->setRequired(true)->addValidators(array(array('NotEmpty')));
     $holidayfrom = new ZendX_JQuery_Form_Element_DatePicker('holidayfrom');
     $holidayname->setAttrib('class', 'txt_put');
     $holidayname->setRequired(true)->addValidators(array(array('NotEmpty')));
     $holidayupto = new ZendX_JQuery_Form_Element_DatePicker('holidayupto');
     $holidayname->setAttrib('class', 'txt_put');
     $holidayname->setRequired(true)->addValidators(array(array('NotEmpty')));
     $holidayrepayment_id = new ZendX_JQuery_Form_Element_DatePicker('holidayrepayment_id');
     $holidayname->setAttrib('class', 'txt_put');
     $holidayname->setRequired(true)->addValidators(array(array('NotEmpty')));
     $submit = new Zend_Form_Element_Submit('Submit');
     $this->addElements(array($holidayname, $office_id, $holidayfrom, $holidayupto, $holiday_id, $holidayrepayment_id, $submit));
 }
Пример #9
0
 public function __construct($loanamount)
 {
     Zend_Dojo::enableForm($this);
     parent::__construct($loanamount);
     //$fieldtype,$fieldname,$table,$columnname,$cssname,$labelname,$required,$validationtype,$min,$max,$rows,$cols,$decorator,$value
     $formfield = new App_Form_Field();
     $date = new ZendX_JQuery_Form_Element_DatePicker('date');
     $date->setAttrib('class', 'txt_put');
     $date->setJQueryParam('dateFormat', 'yy-mm-dd');
     $date->setRequired(true);
     $Amount = new Zend_Form_Element_Text('Amount');
     $Amount->setAttrib('class', 'textfield');
     $lessthan = new Zend_Validate_LessThan(array('max' => $loanamount + 1, 'inclusive' => false));
     $Amount->setRequired(true)->addValidators(array(array('NotEmpty'), array('Float'), array($lessthan, true)));
     $transactionMode = $formfield->field('Select', 'transactionMode', '', '', 'tmode', '', true, '', '', '', '', '', 0, '');
     $etransfer = $formfield->field('Select', 'etransfer', '', '', 'etran', '', false, '', '', '', '', '', 0, '');
     $etransfer->setRegisterInArrayValidator(false);
     $memberid = $formfield->field('Hidden', 'memberid', '', '', 'memberclass', '', false, '', '', '', '', '', 0, '');
     $membertypeid = $formfield->field('Hidden', 'membertypeid', '', '', 'membertypeclass', '', false, '', '', '', '', '', 0, '');
     $pathhidden = $formfield->field('Hidden', 'pathhidden', '', '', 'pathclass', '', false, '', '', '', '', '', 0, '');
     $othrtext = new Zend_Form_Element_Text('othertext');
     $othrtext->setAttrib('size', 12);
     $description = new Zend_Form_Element_Textarea('description');
     $description->setAttrib('rows', '2');
     $description->setAttrib('cols', '20');
     $description->setRequired(true);
     $sms = new Zend_Form_Element_Checkbox('sms');
     $back = new Zend_Form_Element_Submit('Back');
     $back->setAttrib('id', 'button2');
     $submit = new Zend_Form_Element_Submit('Submit');
     $submit->setAttrib('id', 'button');
     $this->addElements(array($date, $Amount, $transactionMode, $etransfer, $othrtext, $description, $sms, $memberid, $pathhidden, $membertypeid, $submit, $back));
 }
Пример #10
0
 public function __construct($options = null)
 {
     Zend_Dojo::enableForm($this);
     parent::__construct($options);
     $submit = new Zend_Form_Element_Submit('Submit');
     $submit->setAttrib('id', 'save');
     $this->addElements(array($submit));
 }
Пример #11
0
 protected function _initView()
 {
     $view = new Zend_View();
     Zend_Dojo::enableView($view);
     $viewRenderer = Zend_Controller_Action_HelperBroker::getStaticHelper('viewRenderer');
     $viewRenderer->setView($view);
     $view->addHelperPath('Zend/Dojo/View/Helper/', 'Zend_Dojo_View_Helper');
     return $view;
 }
Пример #12
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));
 }
Пример #13
0
 /**
  * I think this is needed for something. can't remember
  *
  */
 public function init()
 {
     Zend_Dojo::enableView($this->view);
     $this->view->url = Zend_Registry::get('config')->site->url;
     $this->view->action = $this->getRequest()->getActionName();
     header('Content-Type: text/html; charset=ISO-8859-1');
     $this->_db = Zend_Registry::get('db');
     Bvb_Grid_Deploy_Ofc::$url = Zend_Registry::get('config')->site->url;
 }
Пример #14
0
 /**
  * Sets up the fixture, for example, open a network connection.
  * This method is called before a test is executed.
  *
  * @return void
  */
 public function setUp()
 {
     $registry = Zend_Registry::getInstance();
     if (isset($registry['Zend_Dojo_View_Helper_Dojo'])) {
         unset($registry['Zend_Dojo_View_Helper_Dojo']);
     }
     $this->view = new Zend_View();
     Zend_Dojo::enableView($this->view);
 }
Пример #15
0
 public function __construct($options = null)
 {
     Zend_Dojo::enableForm($this);
     parent::__construct($options);
     $creditline_id = new Zend_Form_Element_Text('creditline_id');
     $institution_id = new Zend_Form_Element_Text('institution_id');
     $institutionName = new Zend_Form_Element_Select('institutionname');
     $institutionName->setAttrib('class', 'txt_put');
     $institutionName->setAttrib('id', 'institutionname');
     $institutionName->setLabel('institutionname')->setRequired(true);
     $institutionName->addMultiOption('', 'Select...');
     $institutionName->setAttrib('onchange', 'getState(this.value)');
     $institutionNames = new Zend_Form_Element_Text('institutionnames');
     $institutionNames->setAttrib('class', 'txt_put');
     $institutionNames->setAttrib('readonly', 'true');
     $instituteamount = new Zend_Form_Element_Text('instituteamount');
     $instituteamount->setAttrib('class', 'txt_put');
     $instituteamount->setAttrib('readonly', 'true');
     $institutionamount = new Zend_Form_Element_Text('institutionamount');
     $institutionamount->setAttrib('class', 'txt_put');
     $institutionamount->setAttrib('readonly', 'true');
     $maxcreditlinelimit = new Zend_Form_Element_Text('maxcreditlinelimit');
     $maxcreditlinelimit->setAttrib('class', 'txt_put');
     $maxcreditlinelimit->setAttrib('readonly', 'true');
     $creditlinename = new Zend_Form_Element_Text('creditlinename');
     $creditlinename->addValidator(new Zend_Validate_Db_NoRecordExists('ourbank_creditlineinformation', 'creditlinename'));
     $creditlinename->setAttrib('class', 'txt_put');
     $creditlinename->setAttrib('id', 'creditlinename');
     $creditlinename->setLabel('creditlinename')->setRequired(true)->addValidators(array(array('NotEmpty')));
     $creditlineshortname = new Zend_Form_Element_Text('creditline_shortname');
     $creditlineshortname->setAttrib('class', 'txt_put');
     $creditlineshortname->setAttrib('id', 'creditline_shortname');
     $creditlineshortname->setLabel('creditline_shortname')->setRequired(true)->addValidators(array('NotEmpty'));
     $creditlineamount = new Zend_Form_Element_Text('creditlineamount');
     $creditlineamount->setAttrib('class', 'txt_put');
     $creditlineamount->setAttrib('id', 'creditlineamount');
     $creditlineamount->setRequired(true)->addValidators(array(array('NotEmpty'), array('Float')));
     $creditlineinterest = new Zend_Form_Element_Text('creditlineinterest');
     $creditlineinterest->setAttrib('class', 'txt_put');
     $creditlineinterest->setAttrib('id', 'creditlineinterest');
     $creditlineinterest->setRequired(true)->addValidators(array(array('NotEmpty'), array('stringLength', false, array(1, 3)), array('Digits')));
     $creditlinefrom = new ZendX_JQuery_Form_Element_DatePicker('creditline_beginingdate');
     $creditlinefrom->setJQueryParam('dateFormat', 'yy-mm-dd');
     $creditlinefrom->setRequired(true)->addValidators(array(array('Date')));
     $creditlinefrom->setAttrib('class', 'txt_put');
     $creditlinefrom->setAttrib('id', 'creditline_beginingdate');
     $creditlineto = new ZendX_JQuery_Form_Element_DatePicker('creditline_closingdate');
     $creditlineto->setJQueryParam('dateFormat', 'yy-mm-dd');
     $creditlineto->setRequired(true)->addValidators(array(array('Date')));
     $creditlineto->setAttrib('class', 'txt_put');
     $creditlineto->setAttrib('id', 'creditline_closingdate');
     $submit = new Zend_Form_Element_Submit('Submit');
     $submit->setAttrib('class', 'officesubmit');
     $submit->setlabel('Submit');
     $this->addElements(array($creditline_id, $institutionName, $creditlinename, $creditlineshortname, $creditlineamount, $creditlineinterest, $creditlinefrom, $creditlineto, $submit, $institutionamount, $instituteamount, $institutionNames, $institution_id, $maxcreditlinelimit));
 }
Пример #16
0
 public function __construct($options = null)
 {
     Zend_Dojo::enableForm($this);
     parent::__construct($options);
     $member_id = new Zend_Form_Element_Text('member_id');
     $member_id->setAttrib('class', 'txt_put');
     $submit = new Zend_Form_Element_Submit('Search');
     $submit->setAttrib('id', 'save');
     $this->addElements(array($member_id, $submit));
 }
Пример #17
0
 /**
  * @see library/Bvb/Grid/Filters/Render/Bvb_Grid_Filters_Render_RenderInterface::render()
  */
 public function render()
 {
     Zend_Dojo::enableView($this->getView());
     $this->getView()->dojo()->enable()->setDjConfigOption('parseOnLoad', true)->requireModule('dijit.form.Select');
     $this->setAttribute('dojoType', 'dijit.form.Select');
     if (!$this->hasAttribute('style')) {
         $this->setAttribute('style', 'width:120px !important;');
     }
     return $this->getView()->formSelect($this->getFieldName(), $this->getDefaultValue(), $this->getAttributes(), $this->getValues());
 }
Пример #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');
     $submit = new Zend_Form_Element_Submit('Search');
     $pdf = new Zend_Form_Element_Submit('PDF');
     $this->addElements(array($field1, $submit, $pdf));
 }
Пример #19
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));
 }
Пример #20
0
 public function init()
 {
     parent::init();
     $this->_flash = $this->_helper->getHelper('FlashMessenger');
     $this->_redirector = $this->_helper->getHelper('Redirector');
     $this->checkAuth();
     $this->_identity = Zend_Auth::getInstance()->getIdentity();
     Zend_Dojo::enableView($this->view);
     //TODO there's gotta be a better way to do this
     $this->_config = Zend_Registry::get('Config');
 }
Пример #21
0
 /**
  * Retrieve Dojo View Helper
  *
  * @return Zend_Dojo_View_Dojo_Container
  */
 public function getDojo()
 {
     if (null === $this->_dojo) {
         $this->getBootstrap()->bootstrap('view');
         $view = $this->getBootstrap()->view;
         Zend_Dojo::enableView($view);
         $view->dojo()->setOptions($this->getOptions());
         $this->_dojo = $view->dojo();
     }
     return $this->_dojo;
 }
Пример #22
0
 /**
  * Sets up the fixture, for example, open a network connection.
  * This method is called before a test is executed.
  *
  * @return void
  */
 public function setUp()
 {
     $registry = Zend_Registry::getInstance();
     if (isset($registry['Zend_Dojo_View_Helper_Dojo'])) {
         unset($registry['Zend_Dojo_View_Helper_Dojo']);
     }
     Zend_Dojo_View_Helper_Dojo::setUseProgrammatic(true);
     $view = new Zend_View();
     Zend_Dojo::enableView($view);
     $this->helper = new My_View_Helper_SimpleTextarea();
     $this->helper->setView($view);
 }
Пример #23
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));
 }
Пример #24
0
 public function __construct($app, $value)
 {
     Zend_Dojo::enableForm($this);
     parent::__construct($app);
     parent::__construct($value);
     $memberfirstname = new Zend_Form_Element_Text('memberfirstname');
     $memberfirstname->setAttrib('class', '');
     $memberfirstname->setAttrib('size', '10');
     $memberfirstname->setAttrib('id', 'memberfirstname');
     $memberfirstname->setAttrib($value, 'true');
     $submit = new Zend_Form_Element_Submit('Submit');
     $this->addElements(array($submit, $memberfirstname));
 }
Пример #25
0
 protected function _initViewHelpers()
 {
     $view = new Zend_View();
     $view->doctype('XHTML1_STRICT');
     $view->headMeta()->appendHttpEquiv('content-type', 'text/html:charset=utf-8')->appendName('description', 'ISKCON Congregation Database-Mumbai Chowpatty');
     $view->headTitle('Radha Gopinath Mandir');
     // Create new view object if not already instantiated
     //$view = new Zend_View();
     Zend_Dojo::enableView($view);
     $view->dojo()->addStyleSheetModule('dijit.themes.tundra')->setDjConfigOption('usePlainJson', true)->disable();
     $viewRenderer = Zend_Controller_Action_HelperBroker::getStaticHelper('ViewRenderer');
     $viewRenderer->setView($view);
 }
Пример #26
0
 /**
  * Sets up the fixture, for example, open a network connection.
  * This method is called before a test is executed.
  *
  * @return void
  */
 public function setUp()
 {
     $registry = Zend_Registry::getInstance();
     if (isset($registry['Zend_Dojo_View_Helper_Dojo'])) {
         unset($registry['Zend_Dojo_View_Helper_Dojo']);
     }
     Zend_Dojo_View_Helper_Dojo::setUseProgrammatic(true);
     $this->view = new Zend_View();
     Zend_Dojo::enableView($this->view);
     $this->view->addHelperPath('My/View/Helper/', 'My_View_Helper');
     $this->element = new My_Form_Element_SimpleTextarea('foo');
     $this->element->setView($this->view);
 }
Пример #27
0
 /**
  * @see library/Bvb/Grid/Filters/Render/Bvb_Grid_Filters_Render_RenderInterface::render()
  */
 public function render()
 {
     $this->removeAttribute('id');
     $this->setDefaultValue(preg_replace('/\\D/', '', $this->getDefaultValue('to')), 'to');
     $this->setDefaultValue(preg_replace('/\\D/', '', $this->getDefaultValue('from')), 'from');
     $this->setAttribute('dojoType', 'dijit.form.NumberTextBox');
     Zend_Dojo::enableView($this->getView());
     $this->getView()->dojo()->enable()->setDjConfigOption('parseOnLoad', true)->requireModule('dijit.form.NumberTextBox');
     if (!$this->hasAttribute('style')) {
         $this->setAttribute('style', 'width:50px !important;');
     }
     return '<span>' . $this->__('From:') . "</span>" . $this->getView()->formText($this->getFieldName() . '[from]', $this->getDefaultValue('from'), array_merge($this->getAttributes(), array('id' => 'filter_' . $this->getFieldName() . '_from'))) . "<br><span>" . $this->__('To:') . "</span>" . $this->getView()->formText($this->getFieldName() . '[to]', $this->getDefaultValue('to'), array_merge($this->getAttributes(), array('id' => 'filter_' . $this->getFieldName() . '_to')));
 }
Пример #28
0
 /**
  * Set Dojo
  *
  * @return void
  */
 public function setDojo()
 {
     Zend_Dojo::enableView($this->_view);
     $options = array_change_key_case($this->getOptions(), CASE_LOWER);
     foreach ($options as $key => $value) {
         switch ($key) {
             case 'cdnbase':
                 $this->_view->dojo()->setCdnBase($value);
                 break;
             case 'cdndojopath':
                 $this->_view->dojo()->setCdnDojoPath($value);
                 break;
             case 'cdnversion':
                 $this->_view->dojo()->setCdnVersion($value);
                 break;
             case 'djconfig':
                 $this->_view->dojo()->setDjConfig($value);
                 break;
             case 'layers':
                 foreach ($value as $path) {
                     $this->_view->dojo()->addLayer($path);
                 }
                 break;
             case 'localpath':
                 $this->_view->dojo()->setLocalPath($value);
                 break;
             case 'modules':
                 foreach ($value as $module) {
                     $this->_view->dojo()->requireModule($module);
                 }
                 break;
             case 'stylesheets':
                 foreach ($value as $path) {
                     $this->_view->dojo()->addStylesheet($path);
                 }
                 break;
             case 'stylesheetmodules':
                 foreach ($value as $module) {
                     $this->_view->dojo()->addStylesheetModule($module);
                 }
                 break;
             default:
                 break;
         }
     }
     if (array_key_exists('enable', $options) && $options['enable']) {
         $this->_view->dojo()->enable();
     } else {
         $this->_view->dojo()->disable();
     }
 }
Пример #29
0
 protected function _initView()
 {
     // Initialize view
     $view = new Zend_View();
     $view->doctype('XHTML1_STRICT');
     $view->headTitle('My First Zend Framework Application');
     // Add it to the ViewRenderer
     $viewRenderer = Zend_Controller_Action_HelperBroker::getStaticHelper('ViewRenderer');
     $view->addHelperPath('Zend/Dojo/View/Helper/', 'Zend_Dojo_View_Helper');
     $viewRenderer->setView($view);
     Zend_Dojo::enableView($view);
     // Return it, so that it can be stored by the bootstrap
     return $view;
 }
Пример #30
0
 public function init()
 {
     Zend_Dojo::enableForm($this);
     $this->setOptions(array('method' => 'post'));
     $timezone = new Zend_Dojo_Form_Element_FilteringSelect(array('name' => 'timezone', 'label' => 'Timezone', 'autocomplete' => false));
     $timezone->addMultiOptions(array_combine(DateTimeZone::listIdentifiers(), DateTimeZone::listIdentifiers()));
     $submit = new Zend_Form_Element_Submit(array('name' => 'set', 'label' => 'Set Timezone'));
     $this->addElements(array($timezone, $submit));
     /**
      * Set decorators
      */
     $this->clearDecorators();
     $this->setDecorators(array('FormElements', array('HtmlTag', array('tag' => 'dl', 'class' => 'form-container')), 'Form'));
 }