add.html
4.7 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
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
<form id="add-form" class="form-horizontal" role="form" data-toggle="validator" method="POST" action="">
<div class="form-group">
<label class="control-label col-xs-12 col-sm-2">{:__('Study_id')}:</label>
<div class="col-xs-12 col-sm-8">
<input id="c-study_id" data-rule="required" data-source="study/index" data-field="examname" class="form-control selectpage" name="row[study_id]" type="text" value="">
</div>
</div>
<div class="form-group">
<label class="control-label col-xs-12 col-sm-2">{:__('题目')}:</label>
<div class="col-xs-12 col-sm-8">
<textarea id="c-content" class="form-control editor" rows="5" name="row[content]" cols="50"></textarea>
</div>
</div>
<div class="form-group">
<label class="control-label col-xs-12 col-sm-2">{:__('类型')}:</label>
<div class="col-xs-12 col-sm-8">
{:build_radios('row[type]', ['1'=>'文字', '2'=>'图片'])}
</div>
</div>
<div class="form-group world">
<label class="control-label col-xs-12 col-sm-2">选项</label>
<div class="col-xs-12 col-sm-8">
<dl class="fieldlist" data-template="wenzi" data-name="row[option]">
<dd>
<ins>名称</ins>
<ins>选项</ins>
</dd>
<dd>
<a href="javascript:;" class="btn btn-sm btn-success btn-append"><i class="fa fa-plus"></i> 追加</a>
</dd>
<textarea name="row[option]" class="form-control hide" cols="30" rows="5"></textarea>
</dl>
<!--定义模板-->
<script type="text/html" id="wenzi">
<dd class="form-inline">
<input type="text" name="row[<%=name%>][<%=index%>][name]" class="form-control" value="<%=row['name']%>" size="10">
<input type="text" name="row[<%=name%>][<%=index%>][gender]" class="form-control" value="<%=row['gender']%>" size="30">
<span class="btn btn-sm btn-danger btn-remove"><i class="fa fa-times"></i></span>
<span class="btn btn-sm btn-primary btn-dragsort"><i class="fa fa-arrows"></i></span>
</dd>
</script>
</div>
</div>
<div class="form-group pic">
<label class="control-label col-xs-12 col-sm-2">选项</label>
<div class="col-xs-12 col-sm-8">
<dl class="fieldlist" data-template="thumbnail" data-name="row[option1]">
<dd>
<ins>名称</ins>
<ins>选项</ins>
</dd>
<dd>
<a href="javascript:;" class="btn btn-sm btn-success btn-append"><i class="fa fa-plus"></i> 追加</a>
</dd>
<textarea name="row[option1]" class="form-control hide" cols="30" rows="5"></textarea>
</dl>
<!--定义模板-->
<script id="thumbnail" type="text/html">
<dd class="form-inline">
<ins><input type="text" name="row[<%=name%>][<%=index%>][name]" class="form-control" value="<%=row['name']%>" size="10"></ins>
<ins>
<a href="<%=fullurl%>" data-url="<%=url%>" target="_blank" class="thumbnail">
<img src="<%=fullurl%>" class="img-responsive">
</a>
<input type="hidden" id="c-avatar<%=index%>" class="image" name="row[desc][<%=index%>][gender]" value=""/>
<button id="plupload<%=index%>" class="btn btn-danger plupload" data-input-id="c-avatar<%=index%>"><i class="fa fa-upload"></i> {:__('Upload')}</button>
</ins>
<!--下面的两个按钮务必保留-->
<span class="btn btn-sm btn-danger btn-remove"><i class="fa fa-times"></i></span>
<span class="btn btn-sm btn-primary btn-dragsort"><i class="fa fa-arrows"></i></span>
</dd>
</script>
</div>
</div>
<div class="form-group">
<label class="control-label col-xs-12 col-sm-2">{:__('Answer')}:</label>
<div class="col-xs-12 col-sm-8">
<input id="c-answer" class="form-control" name="row[answer]" type="text">
</div>
</div>
<div class="form-group layer-footer">
<label class="control-label col-xs-12 col-sm-2"></label>
<div class="col-xs-12 col-sm-8">
<button type="submit" class="btn btn-success btn-embossed disabled">{:__('OK')}</button>
<button type="reset" class="btn btn-default btn-embossed">{:__('Reset')}</button>
</div>
</div>
</form>