<?php echo $form->start(); ?>

<div id="content">
    <div id="ctree">
        <div id="messages">
        <?php if ($error): ?>
        <div id="error"><?php echo $error; ?></div>
        <script type="text/javascript">new Effect.Pulsate("error");</script>
        <?php endif?>
        </div>
        <table border="0" cellpadding="5" cellspacing="0" width="100%">
        <?php foreach ($form->getElementsNames() as $element): ?>
        <tr>
            <td valign="top"><strong><?php echo $form->{$element}->label; ?></strong></td>
            <td>
                <?php if ($form->{$element}->getErrorMessage()): ?><div class="error_message"><?php echo $form->{$element}->getErrorMessage(); ?></div><?php endif; ?>
                <?php if (is_array($form->{$element}->input)) : ?>
                <?php foreach ($form->{$element}->input as $titulo => $input) : ?>
                <?php echo $input; ?>&nbsp;<?php echo $titulo; ?><br />
                <?php endforeach; ?>
                <?php else : ?>
                <?php echo $form->{$element}->input; ?>
                <?php endif; ?>

                <?php if ($form->{$element}->help) : ?>
                <br /><?php echo $form->{$element}->help; ?><br />
                <?php endif; ?>
            </td>
        </tr>
        <?php endforeach; ?>
        <tr>
            <td colspan="2">
                <table cellpadding="0" cellspacing="0" border="0" width="100%">
                    <tr>
                        <td align="left"><input type="button" class="component_voltar" value="<?php echo translateAdmin('Voltar');?>" onclick="history.back();" /></td>
                        <td align="right"><input type="submit" class="component_insert" value="<?php echo translateAdmin('Inserir');?>" /></td>
                    </tr>
                </table>
            </td>
        </tr>
        </table>
    </div>
</div>

<?php echo $form->end(); ?>
