Changeset 11 in text-formbuilder for trunk/lib/Text/FormBuilder.pm
- Timestamp:
- 10/22/04 10:10:54 (20 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/lib/Text/FormBuilder.pm
r7 r11 92 92 TYPE => 'STRING', 93 93 SOURCE => $self->_template, 94 DELIM ETERS => [ qw(<% %>) ],94 DELIMITERS => [ qw(<% %>) ], 95 95 }, 96 96 data => { 97 author => $self->{form_spec}{author}, 97 headings => $self->{form_spec}{headings}, 98 author => $self->{form_spec}{author}, 98 99 }, 99 100 }, … … 125 126 <style type="text/css"> 126 127 #author, #footer { font-style: italic; } 127 th { font-weight: normal; text-align: right; vertical-align: top; } 128 th { text-align: left; } 129 th h2 { padding: .125em .5em; background: #eee; } 130 th.label { font-weight: normal; text-align: right; vertical-align: top; } 128 131 </style> 129 132 </head> … … 135 138 <% $start %> 136 139 <table> 137 <% foreach (@fields) { 140 <% my $i; foreach(@fields) { 141 $OUT .= qq[ <tr><th colspan="2"><h2>$headings[$i]</h2></th></tr>\n] if $headings[$i]; 138 142 $OUT .= qq[ <tr>]; 139 $OUT .= '<th>' . ($$_{required} ? qq[<strong class="required">$$_{label}:</strong>] : "$$_{label}:") . '</th>'; 140 $OUT .= qq[<td>$$_{field} $$_{comment}</td></tr>\n] 143 $OUT .= '<th class="label">' . ($$_{required} ? qq[<strong class="required">$$_{label}:</strong>] : "$$_{label}:") . '</th>'; 144 $OUT .= qq[<td>$$_{field} $$_{comment}</td></tr>\n]; 145 $i++; 141 146 } %> 142 147 <tr><th></th><td style="padding-top: 1em;"><% $submit %></td></tr>
Note: See TracChangeset
for help on using the changeset viewer.