add.html
7.1 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
<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">{:__('Name')}:</label>
<div class="col-xs-12 col-sm-8">
<input id="c-name" data-rule="required" class="form-control" name="row[name]" type="text">
</div>
</div>
<div class="form-group">
<label class="control-label col-xs-12 col-sm-2">{:__('Description')}:</label>
<div class="col-xs-12 col-sm-8">
<textarea id="c-description" data-rule="required" class="form-control " rows="5" name="row[description]" cols="50"></textarea>
</div>
</div>
<div class="form-group">
<label class="control-label col-xs-12 col-sm-2">{:__('Map_info')}:</label>
<div class="col-xs-12 col-sm-8">
<button type="button" class="btn btn-success" data-toggle="addresspicker" data-input-id="c-address" data-lat-id="c-lat" data-lng-id="c-lng">选择地图</button>
<input id="c-map_info" data-rule="required" class="form-control" name="row[map_info]" type="text" style="display: none">
</div>
</div>
<div class="form-group">
<label class="control-label col-xs-12 col-sm-2">{:__('Address')}:</label>
<div class="col-xs-12 col-sm-8">
<input id="c-address" data-rule="required" class="form-control" name="row[address]" type="text">
</div>
</div>
<div class="form-group" style="display: none">
<label class="control-label col-xs-12 col-sm-2">{:__('Province')}:</label>
<div class="col-xs-12 col-sm-8">
<input id="c-province" data-rule="required" class="form-control" name="row[province]" type="text">
</div>
</div>
<div class="form-group" style="display: none">
<label class="control-label col-xs-12 col-sm-2">{:__('City')}:</label>
<div class="col-xs-12 col-sm-8">
<input id="c-city" data-rule="required" class="form-control" name="row[city]" type="text">
</div>
</div>
<div class="form-group" style="display: none">
<label class="control-label col-xs-12 col-sm-2">{:__('Area')}:</label>
<div class="col-xs-12 col-sm-8">
<input id="c-area" data-rule="required" class="form-control" name="row[area]" type="text">
</div>
</div>
<div class="form-group" style="display: none">
<label class="control-label col-xs-12 col-sm-2">{:__('Lng')}:</label>
<div class="col-xs-12 col-sm-8">
<input id="c-lng" data-rule="required" class="form-control" name="row[lng]" type="text">
</div>
</div>
<div class="form-group" style="display: none">
<label class="control-label col-xs-12 col-sm-2">{:__('Lat')}:</label>
<div class="col-xs-12 col-sm-8">
<input id="c-lat" data-rule="required" class="form-control" name="row[lat]" type="text">
</div>
</div>
<div class="form-group">
<label class="control-label col-xs-12 col-sm-2">{:__('Mobile')}:</label>
<div class="col-xs-12 col-sm-8">
<input id="c-mobile" data-rule="required" class="form-control" name="row[mobile]" type="text">
</div>
</div>
<div class="form-group">
<label class="control-label col-xs-12 col-sm-2">{:__('Cover')}:</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[cover]" 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">{:__('Banner')}:</label>
<div class="col-xs-12 col-sm-8">
<div class="input-group">
<input id="c-banner" data-rule="required" class="form-control" size="1" name="row[banner]" type="text" value="" >
<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-banner" 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-banner" data-mimetype="*" data-multiple="true"><i class="fa fa-list"></i> {:__('Choose')}</button></span>
</div>
<span class="msg-box n-right" for="c-banner"></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>
<!--这里自定义图片预览的模板 开始-->
<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 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>