% if 'csrf_token' in c.form.errors:
<div class="grid_16 drow">
	<div class="grid_15 formglobalerror">${_('Form validation failed due to: %s') % c.form.errors.pop('csrf_token')[0]}</div>
</div>
% endif
% for field in c.form:
% if field.type == 'HiddenField' or field.type == 'CSRFTokenField':
	${h.HTML.div(field, style="display: none;")}
% else:
<div class="grid_16 drow">
    <div class="grid_5">${field.label}</div>
    <div class="grid_5">
	% if (field.type == 'TextField' and field.name != 'message_size') or field.type == 'PasswordField':
		${field(size=50, readonly='readonly')}\
	% elif field.type == 'IntegerField' or field.name == 'message_size':
		${field(size=5, readonly='readonly')}\
	% elif field.type == 'SelectField':
	    ${field}\
	% elif field.type == 'TextAreaField':
	    ${h.highlight_errors(field, style='height: 53px; width: 326px;', readonly='readonly')}\
	% else:
		${field(readonly='readonly')}\
	% endif
	</div>
	<div class="grid_5">
		% if field.errors:
		${u', '.join([unicode(ferr) for ferr in field.errors])}
		% endif
	</div>
</div>
% endif
% endfor