Repository navigation
Expand file tree
/
Copy pathrebates.php
More file actions
40 lines (32 loc) · 1.68 KB
/
Copy pathrebates.php
File metadata and controls
40 lines (32 loc) · 1.68 KB
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
<?php
class page_rebates extends page_base {
function init(){
parent::init();
$this->js(true)->_load('wizard/page_wizard');
$props = array('allow_add' => false, 'allow_edit' => false, 'allow_del' => true);
$fields = array('productNumbers', 'redeemCode', 'firstName', 'lastName');
$c=$this->add("CRUD", $props);
$c->setClass('template-master-details-grid template-master-details-grid-rows');
$c->setModel("Rebates");//, $fields);
if ($c->grid){
$c->grid->addPaginator(30);
//$c->grid->sortby = '0';
foreach ($c->grid->columns as $name => $column) {
if ('delete' != $name) {
$c->grid->getColumn($name)->makeSortable();
}
}
$quick_search = $c->grid->addQuickSearch(array('productNumbers', 'redeemCode'))->addClass('small-form-search');
$quick_search->search_field->setAttr('placeholder', 'Product, Redeem Code');
$quick_search = $c->grid->addQuickSearch(array('firstName', 'lastName', 'email', 'phone'))->addClass('small-form-search');
$quick_search->search_field->setAttr('placeholder', 'Name, Email, Phone');
$quick_search = $c->grid->addQuickSearch(array('address', 'city', 'state', 'zip'))->addClass('small-form-search');
$quick_search->search_field->setAttr('placeholder', 'Address, City, Zip, State');
//$quick_search = $c->grid->addQuickSearch(array('phone'))->addClass('small-form');
//$quick_search->search_field->setAttr('placeholder', 'Phone');
$quick_filter = $c->grid->add('QuickFilter', null, 'quick_search')->useWith($c->grid)->useFields(array('formName'));
$quick_filter = $c->grid->add('QuickFilter', null, 'quick_search')->useWith($c->grid)->useFields(array('status'));
}
$export = $c->add("RebatesExport");
}
}