00001 <?php
00010 class OneColumnTableLayout extends BaseLayout
00011 {
00015 public function drawBeginning()
00016 {
00017 echo '<table class="BaseForm">';
00018 }
00019
00023 public function drawEnd()
00024 {
00025 $this->drawHiddenFields();
00026
00027 echo '</table>';
00028 }
00029
00034 public function drawField($field)
00035 {
00036 if($field instanceof HiddenField)
00037 {
00038 $this->hiddenFields[] = $field;
00039 return;
00040 }
00041
00042
00043 if (!($field instanceOf ButtonField) && !($field instanceOf StaticField))
00044 {
00045 $title = $field->getTitle();
00046 if ($title)
00047 echo "<tr><th>$title</th></tr>";
00048 }
00049
00050 echo "<tr><td>";
00051 if($js = $field->getJs())
00052 echo "<script type='text/javascript'>$js</script>";
00053
00054 $field->drawInput();
00055
00056 echo "</td></tr>";
00057 try
00058 {
00059 if($field->hasError())
00060 echo "<tr><td><span class='FormError'>$field->errorMessage</span></td></tr>";
00061 }
00062 catch (NotValidatedException $e){};
00063 }
00064 }
00065 ?>