1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
|
<?php
class LoanForm extends ZendX_JQuery_Form {
public function init() {
}
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->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($closedate));
$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');
$minmumloanamount->setRequired(true);
$validator=new Zend_Validate_Digits();
$minmumloanamount->addValidator($validator,true);
$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);
$validator=new Zend_Validate_Digits();
$minimumfrequency->addValidator($validator,true);
$maximumfrequency = new Zend_Form_Element_Text('maximumfrequency');
$maximumfrequency->setAttrib('class', 'txt_put');
$maximumfrequency->setRequired(true);
$validator=new Zend_Validate_Digits();
$maximumfrequency->addValidator($validator,true);
$graceperiodnumber = new Zend_Form_Element_Text('graceperiodnumber');
$graceperiodnumber->setAttrib('class', 'txt_put');
$graceperiodnumber->setRequired(true);
$validator=new Zend_Validate_Digits();
$graceperiodnumber->addValidator($validator,true);
$fee_id = new Zend_Form_Element_MultiCheckbox('fee_id');
$submit = new Zend_Form_Element_Submit('Submit');
$this->addElements(array($offerproductname,
$offerproductshortname,
$offerproduct_description,
$begindate,
$closedate,
$applicableto,
$minmumloanamount,
$maximunloanamount,
$minimumfrequency,
$maximumfrequency,
$graceperiodnumber,
$fee_id,
$product_id,
$submit));
}
}
|