tpl.html
3.2 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
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
<script>
var typelist = {$typeList|json_encode};
var contentlist = {$row.content??'[]'};
</script>
<style>
.iteminner {margin-bottom:15px;border-bottom:1px solid #ddd;background:#fff;}
</style>
<script id="itemtpl" type="text/html">
<div class="col-xs-6 iteminner">
<div class="form-group">
<div class="control-label col-xs-4"><span class="text-danger">*</span> 类型</div>
<div class="col-xs-8">
<select name="row[content][<%=i%>][type]" <%=readonly?'readonly':''%> class="form-control">
<%for(var m in typelist){%>
<option value="<%=m%>" <%=m==type?'selected':''%>><%=typelist[m]%></option>
<%}%>
</select>
</div>
</div>
<div class="form-group">
<div class="control-label col-xs-4"><span class="text-danger">*</span> 变量名</div>
<div class="col-xs-8">
<input type="text" name="row[content][<%=i%>][name]" <%=readonly?'readonly':''%> class="form-control" value="<%=name%>" />
</div>
</div>
<div class="form-group">
<div class="control-label col-xs-4"><span class="text-danger">*</span> 标题</div>
<div class="col-xs-8">
<input type="text" name="row[content][<%=i%>][title]" <%=readonly?'readonly':''%> class="form-control" value="<%=title%>" />
</div>
</div>
<div class="form-group">
<div class="control-label col-xs-4">默认值</div>
<div class="col-xs-8">
<input type="text" name="row[content][<%=i%>][value]" class="form-control" value="<%=value%>" />
</div>
</div>
<div class="form-group">
<div class="control-label col-xs-4">校验规则</div>
<div class="col-xs-8">
<input type="text" name="row[content][<%=i%>][rule]" <%=readonly?'readonly':''%> class="form-control" value="<%=rule%>" />
</div>
</div>
<div class="form-group multiple">
<div class="control-label col-xs-4">数据列表</div>
<div class="col-xs-8">
<textarea name="row[content][<%=i%>][content]" <%=['select','selects','checkbox','radio'].indexOf(type)>-1?'':'readonly'%> cols="30" rows="3" class="form-control" data-rule="required"><%=content%></textarea>
</div>
</div>
<div class="form-group">
<div class="control-label col-xs-4">扩展属性</div>
<div class="col-xs-8">
<textarea name="row[content][<%=i%>][extend]" id="extend" cols="30" rows="3" class="form-control"><%=extend%></textarea>
</div>
</div>
<div class="form-group">
<div class="control-label col-xs-4"></div>
<div class="col-xs-8">
<a href="javascript:;" class="btn btn-primary btn-dragsort btn-xs"><i class="fa fa-arrows"></i></a>
<%if(['mobile', 'name', 'gender', 'ethnic'].indexOf(name)==-1){%>
<a href="javascript:;" class="btn btn-danger btn-delone btn-xs"><i class="fa fa-trash"></i></a>
<%}%>
</div>
</div>
</div>
</script>