Skip to content
This repository has been archived by the owner on Mar 14, 2023. It is now read-only.

Commit

Permalink
updated template
Browse files Browse the repository at this point in the history
  • Loading branch information
dg committed Dec 18, 2013
1 parent 27a2776 commit b741677
Showing 1 changed file with 4 additions and 6 deletions.
10 changes: 4 additions & 6 deletions app/templates/components/form.latte
Original file line number Diff line number Diff line change
@@ -1,14 +1,12 @@
{form $form}
<ul class=error n:if="$form->errors">
<li n:foreach="$form->errors as $error">{$error}</li>
<ul class=error n:if="$form->ownErrors">
<li n:foreach="$form->ownErrors as $error">{$error}</li>
</ul>

<table>
<tr n:foreach="$form->controls as $input" n:class="$input->required ? required">
<th>{if $input->controlPrototype->type !== checkbox}{label $input /}{/if}</th>
<td>{input $input} {if $input->controlPrototype->type === checkbox}{label $input /}{/if}
<span class=error n:if="$input->error">{$input->error}</span>
</td>
<th>{label $input /}</th>
<td>{input $input} <span class=error n:ifcontent>{$input->error}</span></td>
</tr>
</table>
{/form}

0 comments on commit b741677

Please sign in to comment.