<div class="panel">
    <div class="title">
        Add Page
    </div>
    <div class="content clear">
        <div>
            <?php echo $form->render(array('method' => 'post', 'id' => 'menu_item_add_form')); ?>
        </div>
        <div>
        </div>
    </div>
</div>

<div>
    <a href="menu_item/index/<?php echo htmlspecialchars($form->menu_id); ?>">Cancel</a>
</div>

<script type="text/javascript">
    $('#menu_item_add_form input[name=name]').bind('keyup', function() {
        $('#menu_item_add_form input[name=alias]').val($(this).val().replace(/^[\s]+/,'').replace(/[\s]+$/,'').replace(/[\s\\\/]/g, '-').toLowerCase());
    });
</script>