help_edit.html
1.81 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
{echo:JS::import('form');}
{echo:JS::import('editor');}
<script>
var editor;
KindEditor.ready(function(K) {
editor = K.create('textarea[name="content"]', {
uploadJson : '{url:/admin/upload_image}',
extraFileUploadParams: {PHPSESSID: "{echo:$_COOKIE['PHPSESSID']}"}
});
});
</script>
<h1 class="page_title">帮助编辑</h1>
<div id="obj_form" class="form2">
<form action="{url:/content/help_save}" method="post" >
{if:isset($id)}<input type="hidden" name="id" value="{$id}">{/if}
<dl class="lineD">
<dt>标题:</dt>
<dd>
<input name="title" type="text" pattern="required" value="{$title}">
<label>帮助标题</label>
</dd>
</dl><dl class="lineD">
<dt>分类:</dt>
<dd>
<select id="category_id" name="category_id" pattern="int">
{query:name=help_category order=path /}
{set:$help_category = Common::treeArray($items);}
{list:items=$help_category}
{set:$num = count(explode(',',$item['path']))-3;}
<option value="{$item['id']}">{if:$num>0}├{/if}{echo:str_repeat('──',$num)}{$item['name']}</option>
{/list}
</select>
<label></label>
</dd>
</dl><dl class="lineD">
<dt>内容:</dt>
<dd>
<textarea id="content" pattern="required" name="content" style="width:700px;height:360px;visibility:hidden;">{$content}</textarea>
<label></label>
</dd>
</dl>
<div style="text-align:center"><input type="submit" value="提交" class="button"> <input type="reset" value="重置" class="button"></div>
</form>
</div>
<script type="text/javascript">
var form = new Form();
form.setValue('category_id','{$category_id}');
</script>