add.html
7.3 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
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
<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">{:__('Course_sign_id')}:</label>
<div class="col-xs-12 col-sm-8">
<input id="c-course_sign_id" data-rule="required" data-source="course/sign/index" class="form-control selectpage" name="row[course_sign_id]" type="text" value="">
</div>
</div>-->
<div class="form-group">
<label class="control-label col-xs-12 col-sm-2">{:__('Course_star')}:</label>
<div class="col-xs-12 col-sm-8">
<input id="c-course_star" class="form-control" step="0.1" name="row[course_star]" type="number">
</div>
</div>
<div class="form-group">
<label class="control-label col-xs-12 col-sm-2">{:__('Teacher_star')}:</label>
<div class="col-xs-12 col-sm-8">
<input id="c-teacher_star" class="form-control" step="0.1" name="row[teacher_star]" type="number">
</div>
</div>
<div class="form-group">
<label class="control-label col-xs-12 col-sm-2">{:__('Service_star')}:</label>
<div class="col-xs-12 col-sm-8">
<input id="c-service_star" class="form-control" step="0.1" name="row[service_star]" type="number">
</div>
</div>
<div class="form-group">
<label class="control-label col-xs-12 col-sm-2">{:__('Content')}:</label>
<div class="col-xs-12 col-sm-8">
<input id="c-content" class="form-control" name="row[content]" type="text">
</div>
</div>
<div class="form-group">
<label class="control-label col-xs-12 col-sm-2">{:__('Pic')}:</label>
<div class="col-xs-12 col-sm-8">
<div class="input-group">
<input id="c-pic" class="form-control" size="50" name="row[pic]" type="text">
<div class="input-group-addon no-border no-padding">
<span><button type="button" id="plupload-files" class="btn btn-danger plupload" data-input-id="c-pic" data-mimetype="*" data-multiple="true" data-preview-id="p-files"><i class="fa fa-upload"></i> {:__('Upload')}</button></span>
<span><button type="button" id="fachoose-files" class="btn btn-primary fachoose" data-input-id="c-pic" data-mimetype="*" data-multiple="true"><i class="fa fa-list"></i> {:__('Choose')}</button></span>
</div>
<span class="msg-box n-right" for="c-pic"></span>
</div>
<!--ul需要添加 data-template和data-name属性,并一一对应且唯一 -->
<ul class="row list-inline plupload-preview" id="p-files" data-template="introtpl" data-name="row[intro]"></ul>
<!--请注意 ul和textarea间不能存在其它任何元素,实际开发中textarea应该添加个hidden进行隐藏-->
<!--这里自定义图片预览的模板 开始-->
<script type="text/html" id="introtpl">
<li class="col-xs-3">
<a href="<%=fullurl%>" data-url="<%=url%>" target="_blank" class="thumbnail">
<img src="<%=fullurl%>" class="img-responsive">
</a>
<a href="javascript:;" class="btn btn-danger btn-xs btn-trash"><i class="fa fa-trash"></i></a>
</li>
</script>
<!--这里自定义图片预览的模板 结束-->
</div>
</div>
<div class="form-group">
<label class="control-label col-xs-12 col-sm-2">{:__('Course_id')}:</label>
<div class="col-xs-12 col-sm-8">
<input id="c-course_id" data-source="course/index" class="form-control selectpage" name="row[course_id]" type="text" value="">
</div>
</div>
<div class="form-group">
<label class="control-label col-xs-12 col-sm-2">{:__('Store_id')}:</label>
<div class="col-xs-12 col-sm-8">
<input id="c-store_id" data-source="store/index" class="form-control selectpage" name="row[store_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">
<input id="c-username" class="form-control" name="row[username]" 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">
<div class="input-group">
<input id="c-cover" data-rule="required" class="form-control" size="1" name="row[weChat_pic]"
type="text" value="">
<div class="input-group-addon no-border no-padding">
<span><button type="button" id="plupload-files-cover" class="btn btn-danger plupload"
data-input-id="c-cover" data-mimetype="*" data-multiple="false"
data-preview-id="p-files-cover"><i class="fa fa-upload"></i> {:__('Upload')}</button></span>
<span><button type="button" id="fachoose-files-cover" class="btn btn-primary fachoose"
data-input-id="c-cover" data-mimetype="*" data-multiple="false"><i
class="fa fa-list"></i> {:__('Choose')}</button></span>
</div>
<span class="msg-box n-right" for="c-cover"></span>
</div>
<!--ul需要添加 data-template和data-name属性,并一一对应且唯一 -->
<ul class="row list-inline plupload-preview" id="p-files-cover" data-template="introtpl-cover"
data-name="row[intro]"></ul>
<!--这里自定义图片预览的模板 开始-->
<script type="text/html" id="introtpl-cover">
<li class="col-xs-3">
<a href="<%=fullurl%>" data-url="<%=url%>" target="_blank" class="thumbnail">
<img src="<%=fullurl%>" class="img-responsive">
</a>
<a href="javascript:;" class="btn btn-danger btn-xs btn-trash"><i class="fa fa-trash"></i></a>
</li>
</script>
<!--这里自定义图片预览的模板 结束-->
</div>
</div>
<div class="form-group">
<label class="control-label col-xs-12 col-sm-2">{:__('Create_time')}:</label>
<div class="col-xs-12 col-sm-8">
<input id="c-create_time" data-rule="required" class="form-control datetimepicker" data-date-format="YYYY-MM-DD HH:mm:ss" data-use-current="true" name="row[create_time]" type="text" value="{:date('Y-m-d H:i:s')}">
</div>
</div>
<div class="form-group" style="display: none">
<label class="control-label col-xs-12 col-sm-2">{:__('Status')}:</label>
<div class="col-xs-12 col-sm-8">
<input id="c-status" data-rule="required" class="form-control" name="row[status]" type="text" value="false">
</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>