ここの情報は古いです。ご理解頂いた上でお取り扱いください。

Changeset 9472


Ignore:
Timestamp:
Dec 4, 2008, 9:32:40 PM (13 years ago)
Author:
ShogoKawahara
Message:

#3182:fixed OpenPNEFormAutoGenerate

File:
1 edited

Legend:

Unmodified
Added
Removed
  • OpenPNE3/trunk/lib/form/OpenPNEFormAutoGenerate.class.php

    r9395 r9472  
    4949  protected function generateValidator($field, $choices = array())
    5050  {
     51    $option = array('required' => $field['IsRequired']);
     52
    5153    if ($field['FormType'] === 'checkbox')
    5254    {
    53       $obj = new sfValidatorChoiceMany(array('choices' => $choices));
     55      $option['choices'] = $choices;
     56      $obj = new sfValidatorChoiceMany($option);
    5457      return $obj;
    5558    }
     
    5861      return $obj;
    5962    }
    60 
    61     $option = array('required' => $field['IsRequired']);
    6263
    6364    if ($field['ValueType'] === 'datetime' || $field['ValueType'] === 'integer')
Note: See TracChangeset for help on using the changeset viewer.