'sorter ASC'); protected $_reorderTitleColumn = 'jobTitle'; protected $_formDefaults = array('enabled' => 'y'); protected function _bindListColumns(Qs_Sys_ViewController_List $list) { $list->addColumn('no', 'no'); $list->addColumn( 'date', 'expirationDate', array( 'attribs' => array('width' => 100), 'orderBy' => 'expirationDate' ) ); $list->addColumn( 'text', 'jobLocation', array( 'attribs' => array('width' => 150), 'orderBy' => 'jobLocation' ) ); $list->addColumn( 'text', 'jobTitle', array( 'attribs' => array('width' => 150), 'orderBy' => 'jobTitle' ) ); $list->addColumn( 'text', 'introduction', array( 'truncateLength' => 250, 'attribs' => array('align' => 'left') ) ); $list->addColumn( 'link_enum', 'enabled', array( 'title' => 'Show', 'orderBy' => 'enabled', 'attribs' => array('width' => 60), 'values' => array('y' => 'Yes', 'n' => 'No'), ) ); $list->addColumn( 'options', 'options', array ( 'attribs' => array('width' => 100, 'align' => 'center')) ); return $this; } protected function _bindFormFields(Qs_Form $form) { $form->addElement( 'text', 'jobLocation', array( 'label' => 'Job Location', 'required' => true ) ); $form->addElement( 'text', 'jobTitle', array( 'label' => 'Job Title', 'required' => true ) ); $form->addElement( 'date', 'expirationDate', array( 'label' => 'Expiration Date', 'required' => true ) ); $form->addElement( 'textarea', 'introduction', array( 'label' => 'Introduction', 'rows' => 5, 'required' => true, 'description' => 'Space available is limited to 250 characters.') ); $form->introduction->addValidator('StringLength', false, array('max' => 250)); $form->introduction->getValidator('StringLength')->setMessage( 'Introduction is more than 250 characters long.', Zend_Validate_StringLength::TOO_LONG ); $form->addElement( 'htmlEditor', 'content', array( 'label' => 'Job Description', 'required' => true ) ); $form->addElement( 'checkbox', 'enabled', array( 'label' => 'Show on user end', 'checkedValue' => 'y', 'uncheckedValue' => 'n', 'decoration' => 'simple', ) ); return $this; } }