<?= view('layout/header')->send(); ?>
<div id="cv_archive_panel_header">
    <div class="panel-title">
        <a class="cv-tool easyui-linkbutton" href="javascript:saveSinglePageForm();"> 保存</a>
    </div>
</div>

<div class="easyui-panel" header="#cv_archive_panel_header" style="width: 100%;height: 100%;overflow-x: hidden;padding-top: 15px;">
    <form method="post" id="cv_form_model_1" action="<?= url('index',['category_id'=>$item['category_id']]); ?>">

    <div class="cv-archive-new-center" style="width: 800px;">
        <div class="cv-input-box">
            <label for="cv_title" required>标题</label>
            <div class="controls">
                <input value="<?= $item['title']; ?>" class="cv-input-xlarge cv-input-rule" type="text" name="cv[title]" id="cv_title" />
            </div>
        </div>
        <div class="cv-input-box">
            <label for="cv_title" >SEO标题</label>
            <div class="controls">
                <input value="<?= $item['seo_title']; ?>" class="cv-input-xlarge" type="text" name="cv[seo_title]"/>
            </div>
        </div>
        <div class="cv-input-box">
            <label for="cv_title" >关键词</label>
            <div class="controls">
                <input value="<?= $item['keywords']; ?>" class="cv-input-xlarge" type="text" name="cv[keywords]"/>
            </div>
        </div>
        <div class="cv-input-box">
            <label for="cv_title" >SEO描述</label>
            <div class="controls">
                <textarea cols="3" class="cv-input-xlarge" name="cv[description]"><?= $item['description']; ?></textarea>
            </div>
        </div>
        <script type="text/javascript" src="<?= asset('share/libs/ckeditor/ckeditor.js'); ?>"></script>
        <div class="cv-input-box">
            <textarea id="cv_full_text" name="cv[full_text]"><?= $item['full_text']; ?></textarea>
        </div>
        <input type="hidden" name="id" value="<?= $item['id']; ?>" />
        <input type="hidden" name="category_id" value="<?= $item['category_id']; ?>" />
        <script type='text/javascript'>
            CKEDITOR.replace("cv_full_text")
        </script>
    </div>

    </form>
</div>


<!--js start-->
<script type="text/javascript">
    var mediaEntry = '<?= url('dash/media/new'); ?>';
    var videoEntry = '<?= url('dash/media/video'); ?>';
    var siteHost = 'http://localhost/cover/public/';
    var videoCloud = '<?= config('cloud.video'); ?>';
    var uploadedImages = [];
    var uploadedVideo;
    function saveSinglePageForm(){
        $("#cv_form_model_1").form('submit',{
            onSubmit: function(){
                return $(this).form('validate');
            },
            success: function(result){
                var response = JSON.parse(result);
                message(response.message);
            }
        });
    }



</script>
<!--js end-->
<?= view('layout/footer')->send(); ?>
