<?php $url = str_replace('admin.', '', $request->base()); ?>

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

<div>
    <a href="menu">Cancel</a>
</div>

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