1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29
|
<%namespace name="tw" module="tw.core.mako_util"/>\
<table ${tw.attrs(
[('class', css_class),
('id', context.get('id'))],
attrs=list_attrs
)}>
<tbody>
% for i,row in enumerate(options_rows):
<tr>
% for value, desc, attrs in row:
<td>
<% id_c = str(id_counter.next()) %>
<input ${tw.attrs(
[('type', field_type),
('name', name),
('id', (context.get('id') or '') + '_' + id_c),
('value', value)],
attrs=attrs
)} />\
<label for="${(context.get('id') or '')}_${id_c}">${tw.content(desc)}</label>
</td>
% endfor
% for j in xrange(num_cols - len(row)):
<td></td>
% endfor
</tr>
% endfor
</tbody>
</table>\
|