示例#1
0
文件: forms.php 项目: uwitec/mgoa
 public function output()
 {
     import('system/share/web/forms/fields');
     $fields_html = array();
     foreach ($this->fields as $field_name => $property) {
         $fields_html['content'][$field_name] = BaseFields::get($field_name, $property, $this->data);
         $label = $this->fields[$field_name]['label'] ? $this->fields[$field_name]['label'] : $field_name;
         $fields_html['label'][$field_name] = _($label);
     }
     $fields_html['fields'] = $this->fields;
     if ($this->is_bound) {
         $fields_html['messages'] = $this->messages;
         $fields_html['data'] = $this->data;
     }
     return $fields_html;
 }