<?php $settings = sfConfig::get('app_admin_' . $this->getModuleName()) ?>
<?php $form = $this->getFormObject() ?>
[?php $<?php echo $this->getSingularName() ?> = $form->getObject() ?]
<div class="content-add01">
	<div class="heading01"><h1>[?php echo $<?php echo $this->getSingularName() ?>->isNew() ? 'Ajout' : 'Modification' ?] d'un <?php echo $settings['singular'] ?></h1></div>
</div>

<form action="[?php echo url_for('<?php echo $this->getModuleName() ?>/<?php echo isset($this->params['non_atomic_actions']) && $this->params['non_atomic_actions'] ? 'edit' : 'update' ?>'.(!$<?php echo $this->getSingularName() ?>->isNew() ? '?<?php echo $this->getPrimaryKeyUrlParams() ?> : '')) ?]" method="post" [?php $form->isMultipart() and print 'enctype="multipart/form-data" ' ?]>
  <table>
    <tfoot>
      <tr>
        <td colspan="2">
          <br /><input type="submit" value="Sauver" /> ou <a href="[?php echo url_for('<?php echo $this->getModuleName() ?>/index') ?]">annuler</a>
        </td>
      </tr>
    </tfoot>
    <tbody>
<?php if (isset($this->params['non_verbose_templates']) && $this->params['non_verbose_templates']): ?>
      [?php echo $form ?]
<?php else: ?>
      [?php echo $form->renderGlobalErrors() ?]
<?php foreach ($form->getWidgetSchema()->getPositions() as $i => $name): ?>
<?php if ($form[$name]->isHidden() || in_array($name, !empty($settings['fields_not_editable'])?$settings['fields_not_editable']:array())) continue ?>
      <tr valign="top">
        <th align="left">[?php echo $form['<?php echo $name ?>']->renderLabel() ?]</th>
        <td>
          [?php echo $form['<?php echo $name ?>'] ?]
		  [?php echo $form['<?php echo $name ?>']->renderError() ?]
<?php $i == $this->getLastNonHiddenField() and print $this->getHiddenFieldsAsString() ?>
        </td>
      </tr>
<?php endforeach; ?>
<?php endif; ?>
    </tbody>
  </table>
</form>