Changeset 1097
- Timestamp:
- 04/29/10 16:21:26 (22 months ago)
- Location:
- plugins/apostropheBlogPlugin/trunk
- Files:
-
- 2 modified
-
lib/form/doctrine/PluginaBlogItemForm.class.php (modified) (2 diffs)
-
modules/aBlogAdmin/templates/_form.php (modified) (2 diffs)
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)); -
plugins/apostropheBlogPlugin/trunk/modules/aBlogAdmin/templates/_form.php
r1096 r1097 131 131 132 132 133 <?php // Blog Comments Enabled?Disabled Toggle?>133 <?php if(isset($form['allow_comments'])): ?> 134 134 <hr /> 135 135 <div class="comments section"> … … 141 141 142 142 </div> 143 <?php endif ?> 143 144 144 145 <script type="text/javascript" charset="utf-8">

