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

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

<script type="text/javascript" src="admin/widget/wysiwyg/jquery.rte.js"></script>
<script type="text/javascript" src="admin/widget/wysiwyg/jquery.rte.tb.js"></script>
<script type="text/javascript" src="admin/widget/wysiwyg/jquery.ocupload-1.1.4.js"></script>
<script type="text/javascript">
    /*$(document).ready(function() {
        $('.wysiwyg').rte({
            base_url: '<?php echo $request->base(); ?>',
            width: 800,
            height: 800,
            controls_rte: rte_toolbar,
            controls_html: html_toolbar
        });
    });*/
    
    $('#page_add_form input[name=name]').bind('keyup', function() {
        $('#page_add_form input[name=path]').val($(this).val().replace(/^[\s]+/,'').replace(/[\s]+$/,'').replace(/[\s]/g, '-').toLowerCase());
    });
</script>

<script type="text/javascript" src="admin/widget/ckeditor/ckeditor.js"></script>
<script src="admin/widget/ckeditor/_samples/sample.js" type="text/javascript"></script>
<script type="text/javascript">
//<![CDATA[

        // This call can be placed at any point after the
        // <textarea>, or inside a <head><script> in a
        // window.onload event handler.

        // Replace the <textarea id="editor"> with an CKEditor
        // instance, using default configurations.
        CKEDITOR.replace( 'editor1' );

//]]>
</script>