Changeset 1097 for plugins/apostropheBlogPlugin/trunk/lib/form/doctrine/PluginaBlogItemForm.class.php
- Timestamp:
- 04/29/10 16:21:26 (2 years ago)
- Files:
-
- 1 modified
Legend:
- Unmodified
- Added
- Removed
-
plugins/apostropheBlogPlugin/trunk/lib/form/doctrine/PluginaBlogItemForm.class.php
r1062 r1097 32 32 } 33 33 34 35 34 $this->setWidget('categories_list_add', 36 35 new sfWidgetFormInputHidden()); … … 39 38 new sfValidatorPass()); 40 39 41 42 40 $this->setWidget('editors_list', 43 41 new sfWidgetFormDoctrineChoice(array('multiple' => true, 'model' => 'sfGuardUser', 'query' => $q))); 44 42 $this->setValidator('editors_list', 45 43 new sfValidatorDoctrineChoice(array('multiple' => true, 'model' => 'sfGuardUser', 'query' => $q, 'required' => false))); 46 47 $this->setWidget('template', 44 45 $this->setWidget('template', 48 46 new sfWidgetFormChoice(array('multiple' => false, 'choices' => sfConfig::get('app_aBlog_templates')))); 49 47 $this->setValidator('template', 50 48 new sfValidatorChoice(array('required' => true, 'multiple' => false, 'choices' => array_flip(sfConfig::get('app_aBlog_templates'))))); 51 49 50 if(count(sfConfig::get('app_aBlog_templates')) <= 1) 51 { 52 unset($this['template']); 53 } 54 55 if(!sfConfig::get('app_aBlog_comments', false)) 56 { 57 unset($this['allow_comments']); 58 } 59 52 60 $this->widgetSchema['tags'] = new sfWidgetFormInput(array('default' => implode(', ', $this->getObject()->getTags())), array('class' => 'tag-input', 'autocomplete' => 'off')); 53 61 $this->validatorSchema['tags'] = new sfValidatorString(array('required' => false));

