root/trunk/modules/forge/views/forge_template.php

Revision 2593, 0.9 kB (checked in by Geert, 2 weeks ago)

CodingStyle maintenance!

  • Property svn:eol-style set to LF
  • Property copyright set to Copyright (c) 2007 Kohana Team
  • Property svn:keywords set to Id
Line 
1 <?php echo $open; ?>
2 <table class="<?php echo $class ?>">
3 <?php if ($title != ''): ?>
4 <caption><?php echo $title ?></caption>
5 <?php endif ?>
6 <?php
7 foreach ($inputs as $input):
8
9 $sub_inputs = array();
10 if ($input->type == 'group'):
11     $sub_inputs = $input->inputs;
12
13 ?>
14 <tr>
15 <th colspan="2"><?php echo $input->label() ?></th>
16 </tr>
17 <?php
18
19     if ($message = $input->message()):
20
21 ?>
22 <tr>
23 <td colspan="2"><p class="group_message"><?php echo $message ?></p></td>
24 </tr>
25 <?php
26
27     endif;
28
29 else:
30     $sub_inputs = array($input);   
31 endif;
32
33 foreach ($sub_inputs as $input):
34
35 ?>
36 <tr>
37 <th><?php echo $input->label() ?></th>
38 <td>
39 <?php
40
41 echo $input->render();
42
43 if ($message = $input->message()):
44
45 ?>
46 <p class="message"><?php echo $message ?></p>
47 <?php
48
49 endif;
50
51 foreach ($input->error_messages() as $error):
52
53 ?>
54 <p class="error"><?php echo $error ?></p>
55 <?php
56
57 endforeach;
58
59 ?>
60 </td>
61 </tr>
62 <?php
63
64 endforeach;
65
66 endforeach;
67 ?>
68 </table>
69 <?php echo $close ?>
Note: See TracBrowser for help on using the browser.