add.html
2.4 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
<include file="public@header" />
</head>
<body>
<div class="wrap">
<ul class="nav nav-tabs">
<li><a href="{:url('focus/index')}">所有关注我们</a></li>
<li class="active"><a href="{:url('focus/add')}">添加关注我们</a></li>
</ul>
<form method="post" class="form-horizontal js-ajax-form margin-top-20" action="{:url('focus/addPost')}">
<div class="form-group">
<label for="input-name" class="col-sm-2 control-label">名称<span class="form-required">*</span></label>
<div class="col-md-6 col-sm-10">
<input type="text" required class="form-control" id="input-name" name="name">
</div>
</div>
<div class="form-group">
<label for="thumbnail" class="col-sm-2 control-label">图片<span class="form-required">*</span></label>
<div class="col-md-6 col-sm-10">
<input type="text" class="form-control" id="thumbnail" name="image">
<a href="javascript:uploadOneImage('图片上传','#thumbnail');">
<img src="__TMPL__/public/assets/images/default-thumbnail.png"
id="thumbnail-preview"
width="54" height="54" style="cursor: pointer"/>
</a>
<input type="button" class="btn btn-sm btn-cancel-thumbnail" value="取消图片">
<a href="javascript:uploadOneImage('图片上传','#thumbnail');">上传图片</a>
</div>
</div>
<div class="form-group">
<label for="thumbnail" class="col-sm-2 control-label"></label>
<div class="col-md-6 col-sm-10">
<span class="form-required">图片参考尺寸:54*54</span>
</div>
</div>
<div class="form-group">
<label for="input-weigh" class="col-sm-2 control-label">权重</label>
<div class="col-md-6 col-sm-10">
<input type="number" class="form-control" id="input-weigh" name="weigh" value="0">
</div>
</div>
<div class="form-group">
<div class="col-sm-offset-2 col-sm-10">
<button type="submit" class="btn btn-primary js-ajax-submit">{:lang('ADD')}</button>
<a class="btn btn-default" href="javascript:history.back(-1);">{:lang('BACK')}</a>
</div>
</div>
</form>
</div>
<script src="__STATIC__/js/admin.js"></script>
</body>
</html>
<script type="text/javascript">
$(function () {
$('.btn-cancel-thumbnail').click(function () {
$('#thumbnail-preview').attr('src', '__TMPL__/public/assets/images/default-thumbnail.png');
$('#thumbnail').val('');
});
});
</script>