videoedit.php 2.72 KB
<?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>