<a class="awesome orange left" href="<?php echo WWW_ROOT; ?>modules/positions.html" title="retour aux positions">retour
    aux positions</a>

<?php if (v('error')) { ?>
<div class="text-error"><?php echo v('error'); ?></div>
<?php } ?>

<form method="POST" action="<?php echo php_self(); ?>">
    <table class="table-css table-css-400px table-css-noborder">
        <tr>
            <td class="g">Module</td>
            <td class="d">
                <select name="module">
                    <?php
                    foreach ((array)v('groupes') as $groupe) {
                        if (sizeof((array)$groupe->modules) > 0) {
                            ?>
                            <optgroup label="<?php echo $groupe->nom; ?>"></optgroup><?php
                            foreach ($groupe->modules as $module) {
                                ?>
                                <option value="<?php echo $module->id; ?>"><?php echo $module->nom; ?></option><?php
                            }
                        }
                    }
                    ?>
                </select>
            </td>
        </tr>
        <tr>
            <td class="g">Point d'accroche</td>
            <td class="d">
                <select name="hook">
                    <?php
                    foreach ((array)v('hooks') as $Hook) {
                        ?>
                        <option value="<?php echo $Hook->id; ?>"><?php echo $Hook->nom; ?></option><?php
                    }
                    ?>
                </select>
            </td>
        </tr>
        <tr>
            <td colspan="2">
                <input type="submit" name="submit" value="Ajouter"/>
            </td>
        </tr>
    </table>
</form>
