videoedit.php
2.72 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
<?php
use backend\widgets\YHGImage\Common\Images as CommonImages;
?>
<div class="col-md-6">
<form id="form" method="POST" action="">
<div class="panel panel-default">
<div class="panel-body">
<div class="row">
<div class="form-group">
<label class="col-sm-3 control-label">视频ID: </label>
<div class="col-sm-9">
<?php echo $video->id;?>
<input type="hidden" name="id" value="<?php echo $video->id;?>">
</div>
</div>
<div class="form-group">
<label class="col-sm-3 control-label">视频标题: <span class="asterisk">*</span></label>
<div class="col-sm-5">
<input type="text" name="title" class="form-control" required="required" value="<?php echo $video->title;?>">
</div>
</div>
<div class="form-group">
<label class="col-sm-3 control-label">头图: <span class="asterisk">*</span></label>
<div class="col-sm-5">
<div class="col-sm-9">
<?=$uploader?>
<div class="file-item thumbnail upload-state-done">
<img src="<?php echo CommonImages::getImageUrl($video->pic, 200, 200)?>">
<div class="info">当前图片</div>
</div>
</div>
</div>
</div>
<div class="form-group">
<label class="col-sm-3 control-label">腾讯链接 </label>
<div class="col-sm-8">
<input type="text" name="url" class="form-control" value="<?php echo $video->url;?>">
</div>
</div>
</div><!-- row -->
</div><!-- panel-body -->
<div class="panel-footer">
<div class="row">
<div class="col-sm-9 col-sm-offset-3">
<button class="btn btn-primary mr5" id="upload_button">保存</button>
<a href="/live/video" class="btn btn-dark">取消</a>
</div>
</div>
</div><!-- panel-footer -->
</div><!-- panel -->
</form>
</div>
<script>
$(function(){
$("#upload_button").on("click", function()
{
var pic = $("input[name=pic]").val();
if(pic == "")
{
alert("头图不能为空");
return false;
}
});
});
</script>