class_config_edit.html
1.59 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
{echo:JS::import('form');}
{echo:JS::import('editor');}
{echo:JS::import('dialog?skin=brief');}
{echo:JS::import('dialogtools');}
<h1 class="page_title">{$name}</h1>
<form class="mt10" action="{url:/admin/class_config_save}" method="post" callback="check_invalid" >
{if:isset($class_name)}
<input type="hidden" name="class_name" value="{$class_name}">
{/if}
<div class="form2">
{set:$config_from = call_user_func(array("$class_name","config"));}
{list:items=$config_from}
<dl class="lineD">
<dt><b class="red">*</b>{$item['caption']}:</dt>
<dd>
<input class="normal" name="{$item['field']}" pattern="required" type="text" value="" />
</dd>
</dl>
{/list}
<dl class="lineD">
<dt><b class="red">*</b>是否开启:</dt>
<dd>
<label class='attr'><input name="status" type="radio" value="1" checked="checked" />开启</label>
<label class='attr'><input name="status" type="radio" value="0" />关闭</label>
<label></label>
</dd>
</dl>
<div style="text-align:center;margin-top:20px;">
<input type="submit" class="focus_button" value="提交">
<input type="reset" value="重置" class="button"></div>
</div>
</form>
<script language="javascript">
//DOM加载完毕
$(function(){
var form = new Form();
{if:$config}
{list:items=unserialize($config)}
form.setValue("{$key}","{$item}");
{/list}
{/if}
form.setValue("status","{$status}");
});
</script>