<html xmlns:th="http://www.thymeleaf.org">
<head>
<title>私塾家</title>
<script th:include="sys/common/metaCSS" th:remove="tag"></script> 
<script th:include="sys/common/metaJS" th:remove="tag"></script> 
<script src="sys/js/My97DatePicker/WdatePicker.js" th:src="@{/static/sys/js/My97DatePicker/WdatePicker.js}"></script>
<link rel="stylesheet" href="https://www.17sucai.com/preview/1528155/2019-03-29/v/css/jsmodern.min.css">
<script src="https://www.17sucai.com/preview/1528155/2019-03-29/v/js/jsmodern.min.js"></script>

<script type="text/javascript" src="https://www.sharingschool.com/dcui/tools/ueditor/ueditor.config.js?version=1811271348"></script>
<script type="text/javascript" src="https://www.sharingschool.com/dcui/tools/ueditor/ueditor.all.min.js?version=1812061808"></script>
<script type="text/javascript" src="https://www.sharingschool.com/dcui/tools/ueditor/lang/zh-cn/zh-cn.js?version=1811271348"></script>

</head>
<style>
	.tablelink{margin-right:10px;}
	.stylecss{
	      color: red;
	}
	.select_width{
	     width: 220px;
	}
	.date_width{
	     width: 150px;
	}
	
	.tablelist th,td{
		white-space: nowrap;
		text-overflow: ellipsis;
		overflow: hidden;
	}
	.tablelist td a{
    	text-decoration: underline;
	}
	
</style>

<style>
#video {
	width: 400px;
	height: 250px;
	position: relative;
	margin-bottom: 20px;
	margin-left: 134px;
}

#video video {
	width: 100%;
	height: 100%;
	object-fit: fill;
}

.VideoBtn {
	position: absolute;
	left: 50%;
	top: 50%;
	display: block;
	width: 70px;
	height: 70px;
	margin-left: -35px;
	margin-top: -35px;
	cursor: pointer;
	z-index: 10;
}
</style>



<body>
<div class="place">
	<span>位置：</span>
	<ul class="placeul">
		<li><a href="#">视频培训系统</a></li>
		<li><a href="#">培训视频编辑</a></li>
	</ul>
</div>
<div class="formbody">
	<form id="submitFrom" method="post" class="form-horizontal form-validate">
		<input type="hidden" name="id" id="id"  th:value="${videoFile.id}"/>
		<ul class="forminfo">
			 <li class="clearfix" >
				<label>资料类型：<b>*</b></label>
				<select class="scinput select_width"  name="type"  style="width: 345px;"  >
					<option value="1"  th:selected="${videoFile.type==1 ? true : false}">压缩包</option>
					<option value="2"  th:selected="${videoFile.type==2 ? true : false}">资料文件</option>
				</select>
		    </li>
			 <li class="clearfix" >
				<label>学习内容：<b>*</b></label>
				<select class="scinput select_width"  name="roleType"  style="width: 345px;"  >
					<option value="1"  th:selected="${videoFile.roleType==1 ? true : false}">校长端</option>
					<option value="2"  th:selected="${videoFile.roleType==2 ? true : false}">老师端</option>
					<option value="3"  th:selected="${videoFile.roleType==3 ? true : false}">家长端</option>
					<option value="4"  th:selected="${videoFile.roleType==4 ? true : false}">学生端</option>
				</select>
		    </li>
			<li class="clearfix" >
				<label>资料模块：<b></b></label>
				<input type="text"  name="module" class="dfinput fl" th:value="${videoFile.module}"/>
			</li>
			<li class="clearfix" >
				<label>资料名称：<b>*</b></label>
				<input type="text" name="title" class="dfinput fl" id="title" th:value="${videoFile.title}"/>
			</li>
			<li class="clearfix" >
				<label>资料格式：<b>*</b></label>
				<input type="text" name="format" class="dfinput fl" id="format" th:value="${videoFile.format}"/>
			</li>
			<li class="clearfix" >
				<label>资料路径：<b>*</b></label>
				<input type="text" name="url" class="dfinput fl" id="url" th:value="${videoFile.url}"/>
			</li>
			<li class="clearfix" >
				<label>发布状态：<b>*</b></label>
				<select class="scinput select_width"  name="status"   style="width: 345px;" >
					<option value="1" th:selected="${videoFile.status==1 ? true : false}">发布</option>
					<option value="0" th:selected="${videoFile.status==0 ? true : false}">未发布</option>
					<option value="2" th:selected="${videoFile.status==2 ? true : false}">下架</option>
				</select>
		    </li>
		   
			<li>
				<label>&nbsp;</label>
				<button type="button" class="btn" onclick="saveFrom()">保存</button>
				<button type="button" class="btn" onclick="window.history.go(-1);">取消</button>
			</li>
		</ul>
	</form>
</div>
</body>





<script type="text/javascript">
$(function () {

})

function saveFrom(){
	var url="[[${sysUrl}]]/sys/train/file/save";
	var params = $("#submitFrom").serialize();
	$.post(url,params,function(data){
		if(data != null){
				if(data.meta.success){
					layer.msg("操作成功!",{icon:1});
			    	setTimeout(function(){
			    		window.location.href ='[[${sysUrl}]]/sys//train/file/list.html';
					},1000);
				}else{
					layer.msg(data.meta.message,{icon:11});
				}
		}
		
	});
}


</script>


</html>