'sorter ASC'); protected $_reorderTitleColumn = 'name'; protected function _bindListColumns(Qs_Sys_ViewController_List $list) { $list->addColumn('text', 'id', array('ID')); $list->addColumn( 'image', 'image', array('attribs' => array('width' => 100)) ); $list->addColumn( 'text', 'name', array( 'attribs' => array('width' => 150), 'orderBy' => 'name' ) ); $list->addColumn( 'text', 'jobTitle', array( 'attribs' => array('width' => 150), 'orderBy' => 'jobTitle' ) ); $list->addColumn( 'text', 'shortBio', array( 'truncateLength' => 250, 'attribs' => array('align' => 'left') ) ); $list->addColumn( 'options', 'options', array ( 'attribs' => array('width' => 100, 'align' => 'center')) ); return $this; } protected function _bindFormFields(Qs_Form $form) { $form->addElement( 'extendedImage', 'image', array( 'label' => 'Image', 'resize' => self::IMAGE_WIDTH . 'x' . self::IMAGE_HEIGHT ) ); $form->addElement( 'text', 'name', array( 'label' => 'Name', 'required' => true ) ); $form->addElement( 'text', 'jobTitle', array( 'label' => 'Job Title', 'required' => true ) ); $form->addElement( 'text', 'email', array('label' => 'Email') ); $form->email->addValidator('EmailAddress'); $emailValidator = new Qs_Validate_Unique($this->dataObj->table, 'email', $this->dataObj->getPrimaryKey()); $emailValidator->setMessage('Email must be unique', Qs_Validate_Unique::NOT_UNIQUE); $form->email->addValidator($emailValidator); $form->addElement('phone', 'phone', array('label' => 'Phone Number')); $form->addElement('phone', 'fax', array('label' => 'Fax Number')); $form->addElement( 'textarea', 'shortBio', array( 'label' => 'Short Bio', 'rows' => 5, 'description' => 'Space available is limited to 250 characters.') ); $form->shortBio->addValidator( 'StringLength', false, array('max' => 250) ); $form->shortBio->getValidator('StringLength')->setMessage( 'Short Bio is more than 250 characters long.', Zend_Validate_StringLength::TOO_LONG ); $form->addElement( 'htmlEditor', 'fullBio', array( 'label' => 'Full Bio' ) ); $form->image->addValidator('File_IsImage'); $form->addElement( 'text', 'url', array( 'label' => 'Profile Url', 'class' => 'text', 'filters' => array('StringTrim'), 'validators' => array('Url'), 'description' => 'Example: http://www.linkedin.com/in/username') ); return $this; } }