Skip to content

Commit

Permalink
Dont show labels for hidden fields, added examples/forum.yml
Browse files Browse the repository at this point in the history
  • Loading branch information
beberlei committed May 26, 2010
1 parent 81ab291 commit e4217b9
Show file tree
Hide file tree
Showing 2 changed files with 51 additions and 1 deletion.
48 changes: 48 additions & 0 deletions examples/forum.yml
@@ -0,0 +1,48 @@
---
Forum_Model_Category:
columns:
name: string(50)
description: string(99999)

Forum_Model_Board:
columns:
category_id: integer(10)
name: string(100)
description: string(5000)
relations:
Category:
class: Forum_Model_Category
local: category_id
foreign: id
Threads:
class: Forum_Model_Thread
local: id
foreign: board_id

Forum_Model_Entry:
columns:
author: string(100)
message: string(99999)
thread_id: integer(10)
date: integer(10)
relations:
Thread:
class: Forum_Model_Thread
local: thread_id
foreign: id

Forum_Model_Thread:
columns:
topic: string(100)
board_id: integer(10)
updated: integer(10)
closed: integer(1)
relations:
Board:
class: Forum_Model_Board
local: board_id
foreign: id
Entries:
class: Forum_Model_Entry
local: id
foreign: thread_id
4 changes: 3 additions & 1 deletion library/ZFDoctrine/Form/Model.php
Expand Up @@ -292,7 +292,9 @@ protected function _columnsToFields()
$field->setRequired(true);
}

$field->setLabel($label);
if ($type != 'hidden') {
$field->setLabel($label);
}

if($type == 'select' && $definition['type'] == 'enum') {
foreach($definition['values'] as $text) {
Expand Down

0 comments on commit e4217b9

Please sign in to comment.