* @version SVN: $Id: sfDoctrineFormTemplate.php 23810 2009-11-12 11:07:44Z Kris.Wallsmith $ */ class AdminDemandJobForm extends JobForm { public function configure() { parent::configure(); unset($this['city']); unset($this['street']); unset($this['zip']); $this->widgetSchema['type_id'] = new sfWidgetFormInputHidden(); $this->widgetSchema['regions_list']->setLabel(__('Kraje o které se zajímám')); $this->widgetSchema['profile_id']->setOption('query', Doctrine::getTable('Profile')->getOrderByNameQuery()->addWhere('type_id = ?', ProfileType::PERSON)); $this->setDefault('type_id', JobType::DEMAND); } public function bind(array $taintedValues = null, array $taintedFiles = null) { $taintedValues['type_id'] = JobType::DEMAND; parent::bind($taintedValues, $taintedFiles); } }