<!DOCTYPE html>
<html lang="zh" xmlns:th="http://www.thymeleaf.org" >
<head>
    <th:block th:include="include :: header('修改短剧基础')" />
    <th:block th:include="include :: datetimepicker-css" />
</head>
<body class="white-bg">
<div class="wrapper wrapper-content animated fadeInRight ibox-content">
    <form class="form-horizontal m" id="form-item-edit" th:object="${playletItem}">
        <input name="id" th:field="*{id}" type="hidden">
        <div class="form-group">
            <label class="col-sm-3 control-label">备注信息：</label>
            <div class="col-sm-8">
                <input name="remark" th:field="*{remark}" class="form-control" type="text">
            </div>
        </div>
        <div class="form-group">
            <label class="col-sm-3 control-label is-required">视频名称：</label>
            <div class="col-sm-8">
                <input name="videoName" th:field="*{videoName}" class="form-control" type="text" required>
            </div>
        </div>
        <div class="form-group">
            <label class="col-sm-3 control-label is-required">视频是否完结 0 未完结 1 完结 ：</label>
            <div class="col-sm-8">
                <input name="completeNot" th:field="*{completeNot}" class="form-control" type="text" required>
            </div>
        </div>
        <div class="form-group">
            <label class="col-sm-3 control-label">视频封面图：</label>
            <div class="col-sm-8">
                <input name="coverPic" th:field="*{coverPic}" class="form-control" type="text">
            </div>
        </div>
        <div class="form-group">
            <label class="col-sm-3 control-label is-required">连接地址：</label>
            <div class="col-sm-8">
                <input name="connectSite" th:field="*{connectSite}" class="form-control" type="text" required>
            </div>
        </div>
        <div class="form-group">
            <label class="col-sm-3 control-label is-required">上映年份：</label>
            <div class="col-sm-8">
                <input name="releaseDate" th:field="*{releaseDate}" class="form-control" type="text" required>
            </div>
        </div>
        <div class="form-group">
            <label class="col-sm-3 control-label is-required">地区：</label>
            <div class="col-sm-8">
                <input name="region" th:field="*{region}" class="form-control" type="text" required>
            </div>
        </div>
        <div class="form-group">
            <label class="col-sm-3 control-label is-required">评分：</label>
            <div class="col-sm-8">
                <input name="score" th:field="*{score}" class="form-control" type="text" required>
            </div>
        </div>
        <div class="form-group">
            <label class="col-sm-3 control-label is-required">集数：</label>
            <div class="col-sm-8">
                <input name="numberEpisode" th:field="*{numberEpisode}" class="form-control" type="text" required>
            </div>
        </div>
        <div class="form-group">
            <label class="col-sm-3 control-label is-required">是否删除 1 正常 0 删除：</label>
            <div class="col-sm-8">
                <input name="isDelete" th:field="*{isDelete}" class="form-control" type="text" required>
            </div>
        </div>
        <div class="form-group">
            <label class="col-sm-3 control-label is-required">上映时间：</label>
            <div class="col-sm-8">
                <div class="input-group date">
                    <input name="releaseTime" th:value="${#dates.format(playletItem.releaseTime, 'yyyy-MM-dd')}" class="form-control" placeholder="yyyy-MM-dd" type="text" required>
                    <span class="input-group-addon"><i class="fa fa-calendar"></i></span>
                </div>
            </div>
        </div>
    </form>
</div>
<th:block th:include="include :: footer" />
<th:block th:include="include :: datetimepicker-js" />
<script th:inline="javascript">
    var prefix = ctx + "system/playlet/item";
    $("#form-item-edit").validate({
        focusCleanup: true
    });

    function submitHandler() {
        if ($.validate.form()) {
            $.operate.save(prefix + "/edit", $('#form-item-edit').serialize());
        }
    }

    $("input[name='releaseTime']").datetimepicker({
        format: "yyyy-mm-dd",
        minView: "month",
        autoclose: true
    });
</script>
</body>
</html>