<commit_before><script src="/addon/file/static/jquery.uploadify.min.js"></script>
<link rel="stylesheet" href="/addon/file/static/uploadify.css">

<form action="{:url()}" method="post" class="form_single">
    <div class="box">
      <div class="box-body">
        <div class="row">
          <div class="col-md-6">
            <div class="form-group">
              <label>标题</label>
              <span class="">（文章标题名称）</span>
              <input class="form-control" name="name" placeholder="请输入文章标题名称" value="{$info['name']|default=''}" type="text">
            </div>
          </div>
            
          <div class="col-md-6">
            <div class="form-group">
              <label>分类</label>
              <span class="">（文章分类）</span>
                <select name="category_id" class="form-control">
                    {volist name='article_category_list' id='vo'}
                        <option value="{$vo['id']}">{$vo['name']}</option>
                    {/volist}
                </select>
            </div>
          </div>
            
          <div class="col-md-6">
            <div class="form-group">
                <label>描述</label>
                <span class="">（文章描述信息/简介）</span>
                <textarea class="form-control" name="describe" rows="3" placeholder="请输入文章描述信息/简介">{$info['describe']|default=''}</textarea>
            </div>
          </div>
            
            
            
          <div class="col-md-6">
            <div class="form-group">
                <label>封面图片</label>
                <span class="">（请上传单张封面图片）</span>
                <br/>
                
                {empty name="info"}
                    {assign name="cover_id_var" value="0" /}
                {else /}
                    {assign name="cover_id_var" value="$info.cover_id" /}
                {/empty}
                
                {:hook('File', ['name' => 'cover_id', 'value' => $cover_id_var, 'type' => 'img'])}
            </div>
          </div>
            
          <div class="col-md-6">
            <div class="form-group">
                <label>多图片</label>
                <span class="">（请上传多图片）</span>
                <br/>
                
                {empty name="info"}
                    {assign name="img_ids_var" value="" /}
                {else /}
                    {assign name="img_ids_var" value="$info.img_ids" /}
                {/empty}
                
                {:hook('Imgs', ['name' => 'img_ids', 'value' => $img_ids_var])}
            </div>
          </div>
            
            
          <div class="col-md-6">
            <div class="form-group">
                <label>附件</label>
                <span class="">（文章可下载附件）</span>
                <br/>
                
                {empty name="info"}
                    {assign name="file_id_var" value="0" /}
                {else /}
                    {assign name="file_id_var" value="$info.file_id" /}
                {/empty}
                
                {:hook('File', ['name' => 'file_id', 'value' => $file_id_var, 'type' => 'file'])}
            </div>
          </div>
            
          </div>
        <div class="row">
           
            
          <div class="col-md-12">
            <div class="form-group">
                <label>文章内容</label>
                <textarea class="form-control textarea_editor" name="content" placeholder="请输入文章内容">{$info['content']|default=''}</textarea>
                {:hook('ArticleEditor', array('name'=> 'content','value'=> ''))}
            </div>
          </div>
            
        </div>
        
      <div class="box-footer">
          
        <input type="hidden" name="id" value="{$info['id']|default='0'}"/>
        
        <button  type="submit" class="btn  ladda-button ajax-post" data-style="slide-up" target-form="form_single">
            <span class="ladda-label">确 定</span>
        </button>
         
        <a class="btn " onclick="javascript:history.back(-1);return false;"> 返 回</a>
      </div>
        
      </div>
      </div>
</form><commit_msg>修复文章编辑分类默认为第一个问题<commit_after><script src="/addon/file/static/jquery.uploadify.min.js"></script>
<link rel="stylesheet" href="/addon/file/static/uploadify.css">

<form action="{:url()}" method="post" class="form_single">
    <div class="box">
      <div class="box-body">
        <div class="row">
          <div class="col-md-6">
            <div class="form-group">
              <label>标题</label>
              <span class="">（文章标题名称）</span>
              <input class="form-control" name="name" placeholder="请输入文章标题名称" value="{$info['name']|default=''}" type="text">
            </div>
          </div>
            
          <div class="col-md-6">
            <div class="form-group">
              <label>分类</label>
              <span class="">（文章分类）</span>
                <select name="category_id" class="form-control">
                    {volist name='article_category_list' id='vo'}
                        <option value="{$vo['id']}">{$vo['name']}</option>
                    {/volist}
                </select>
            </div>
          </div>
            
          <div class="col-md-6">
            <div class="form-group">
                <label>描述</label>
                <span class="">（文章描述信息/简介）</span>
                <textarea class="form-control" name="describe" rows="3" placeholder="请输入文章描述信息/简介">{$info['describe']|default=''}</textarea>
            </div>
          </div>
            
            
            
          <div class="col-md-6">
            <div class="form-group">
                <label>封面图片</label>
                <span class="">（请上传单张封面图片）</span>
                <br/>
                
                {empty name="info"}
                    {assign name="cover_id_var" value="0" /}
                {else /}
                    {assign name="cover_id_var" value="$info.cover_id" /}
                {/empty}
                
                {:hook('File', ['name' => 'cover_id', 'value' => $cover_id_var, 'type' => 'img'])}
            </div>
          </div>
            
          <div class="col-md-6">
            <div class="form-group">
                <label>多图片</label>
                <span class="">（请上传多图片）</span>
                <br/>
                
                {empty name="info"}
                    {assign name="img_ids_var" value="" /}
                {else /}
                    {assign name="img_ids_var" value="$info.img_ids" /}
                {/empty}
                
                {:hook('Imgs', ['name' => 'img_ids', 'value' => $img_ids_var])}
            </div>
          </div>
            
            
          <div class="col-md-6">
            <div class="form-group">
                <label>附件</label>
                <span class="">（文章可下载附件）</span>
                <br/>
                
                {empty name="info"}
                    {assign name="file_id_var" value="0" /}
                {else /}
                    {assign name="file_id_var" value="$info.file_id" /}
                {/empty}
                
                {:hook('File', ['name' => 'file_id', 'value' => $file_id_var, 'type' => 'file'])}
            </div>
          </div>
            
          </div>
        <div class="row">
           
            
          <div class="col-md-12">
            <div class="form-group">
                <label>文章内容</label>
                <textarea class="form-control textarea_editor" name="content" placeholder="请输入文章内容">{$info['content']|default=''}</textarea>
                {:hook('ArticleEditor', array('name'=> 'content','value'=> ''))}
            </div>
          </div>
            
        </div>
        
      <div class="box-footer">
          
        <input type="hidden" name="id" value="{$info['id']|default='0'}"/>
        
        <button  type="submit" class="btn  ladda-button ajax-post" data-style="slide-up" target-form="form_single">
            <span class="ladda-label">确 定</span>
        </button>
         
        <a class="btn " onclick="javascript:history.back(-1);return false;"> 返 回</a>
      </div>
        
      </div>
      </div>
</form>


<script type="text/javascript">
    ob.setValue("category_id", {$info['category_id']|default=0});
</script>
{'fraction_non_alphanumeric': 0.17362250879249708, 'fraction_numerical': 0.0031652989449003515, 'mean_word_length': 1.2628647214854112, 'pattern_counts': {'":': 0, '<': 181, '<?xml version=': 0, '>': 201, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '6599997', 'n_tokens_mistral': 2675, 'n_tokens_neox': 2573, 'n_words': 380}