'sorter'); protected $_reorderTitleColumn = 'name'; protected $_hasFilter = true; protected $_filterFields = array('Name'); protected $_formDefaults = array('featured' => 'y'); protected function _bindListColumns(Qs_ViewController_List $list) { $list->addColumn('text', 'name', array('orderBy' => 'name', 'attribs' => array('align' => 'center'))) ->addColumn('text', 'productType', array('orderBy' => 'productType')) ->addColumn( 'link_enum', 'featured', array( 'title' => 'Featured', 'orderBy' => 'featured', 'values' => array('y' => 'Yes', 'n' => 'No'), ) ) ->addColumn('options', 'options'); return $this; } protected function _bindFormFields(Qs_Form $form) { $form->addElement('text', 'name', array('label' => 'Name', 'required' => true)); $form->addElement('select', 'idProductType', array('label' => 'Product Type', 'required' => true, 'multiOptions' => array('' => 'Select One') + (array) $this->dataObj->getProductType4Select())); $form->addElement( 'extendedImage', 'image', array( 'label' => 'Image', 'required' => false, 'resize' => self::IMAGE_WIDTH . 'x' . self::IMAGE_HEIGHT, ) ); $form->addElement('textarea', 'introduction', array('label' => 'Introduction', 'rows' => 5)); $form->addElement('HtmlEditor', 'description', array('label' => 'Description', 'required' => true)); $form->addElement('checkbox', 'featured', array('label' => 'Featured', 'decoration' => 'simple')); return $this; } protected function _bindFilterFields(Qs_Form $form) { parent::_bindFilterFields($form); $form->addElement('select', 'idProductType', array('label' => 'Product Type', 'multiOptions' => array('' => 'Select One') + (array) $this->dataObj->getProductType4Select(), 'onchange' => 'this.form.submit();')); return $this; } }