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

<div class="panel">
    <div class="title">
        Edit Folder - <a target="_blank" href="<?php echo htmlspecialchars($url); ?>page/index/<?php echo htmlspecialchars($form->path); ?>">View</a>
    </div>
    <div class="content clear">
        <div>
            <?php echo $form->render(array('method' => 'post', 'id' => 'section_edit_form')); ?>
        </div>
        <div>
        </div>
    </div>
</div>

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

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