searching includes groups for and/or

This commit is contained in:
naomiaro 2011-01-04 19:18:44 -05:00
parent f6a56c01a9
commit 101b6fafa6
16 changed files with 244 additions and 102 deletions

View file

@ -0,0 +1,29 @@
<?php
class Application_Form_AdvancedSearchGroup extends Zend_Form_SubForm
{
public function init()
{
// Add the add button
$this->addElement('button', 'search_add_row', array(
'ignore' => true,
'label' => 'Add',
'order' => '-2'
));
$this->getElement('search_add_row')->removeDecorator('DtDdWrapper');
}
public function addRow($row_id, $data=null) {
$this->addSubForm(new Application_Form_AdvancedSearchRow(), 'row_'.$row_id, $row_id);
$row = $this->getSubForm('row_'.$row_id);
$row->removeDecorator('DtDdWrapper');
if(!is_null($data)) {
$row->setDefaults($data);
}
}
}