<!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 is-required">剧集ID：</label>
            <div class="col-sm-8">
                <input name="itemId" th:field="*{itemId}" class="form-control" type="text" required>
            </div>
        </div>
        <div class="form-group">
            <label class="col-sm-3 control-label is-required">任务ID：</label>
            <div class="col-sm-8">
                <input name="taskId" th:field="*{taskId}" 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">
                <select name="producerType" class="form-control m-b" th:with="type=${@dict.getType('playlet_producer_type')}">
                    <option th:each="dict : ${type}" th:text="${dict.dictLabel}" th:value="${dict.dictValue}"></option>
                </select>
            </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">短剧类型：</label>
            <div class="col-sm-8">
                <input name="videoType" th:field="*{videoType}" class="form-control" type="text">
            </div>
        </div>
        <div class="form-group">
            <label class="col-sm-3 control-label">标签：</label>
            <div class="col-sm-8">
                <input name="labelType" th:field="*{labelType}" 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">
                <select name="completeNot" class="form-control m-b" th:with="type=${@dict.getType('playlet_complete_type')}">
                    <option th:each="dict : ${type}" th:text="${dict.dictLabel}" th:value="${dict.dictValue}" th:field="*{completeNot}"></option>
                </select>
            </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="actorName" th:field="*{actorName}" 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="tags" th:field="*{tags}" 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="producer" th:field="*{producer}" 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="forUser" th:field="*{forUser}" 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">前端集数：</label>
            <div class="col-sm-8">
                <input name="numberCost" th:field="*{numberCost}" 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="upTime" th:value="${#dates.format(playletItem.upTime, 'yyyy-MM-dd hh:mm')}" 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>
        <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>
    </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 hh:mm",
    //     minView: "month",
    //     autoclose: true
    // });

    $("input[name='upTime']").datetimepicker({
        format: 'yyyy-mm-dd hh:ii',
        todayBtn:  true,
        dateFormat: 'yyyy-mm-dd',//日期显示格式
        timeFormat: 'HH:mm:ss',//时间显示格式
        autoclose: true,
    });
</script>
</body>
</html>