<!DOCTYPE html>
<html lang="zh" xmlns:th="http://www.thymeleaf.org">
<head>
    <th:block th:include="include :: header('修改用户评论')"/>
</head>
<body class="white-bg">
<div class="wrapper wrapper-content animated fadeInRight ibox-content">
    <form class="form-horizontal m" id="form-comment-edit" th:object="${cmsComment}">
        <input name="commentId" th:field="*{commentId}" type="hidden">
        <div class="form-group">
            <label class="col-sm-3 control-label"><span style="color: red; ">*</span>用户id：</label>
            <div  class="col-sm-8">
                <input disabled="disabled" name="userId" th:field="*{userId}" 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="commentContent" disabled="disabled" th:field="*{commentContent}" 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="commentReply" th:field="*{commentReply}" class="form-control" type="text">
            </div>
        </div>

        <div class="form-group">
            <label class="col-sm-3 control-label"><span style="color: red; ">*</span>评论状态：</label>
            <div class="col-sm-8">
                <div class="radio-box" th:each="dict : ${@dict.getType('cms_user_status')}">
                    <input type="radio" th:id="${'userStatus_' + dict.dictCode}" name="userStatus"
                           th:value="${dict.dictValue}" th:field="*{userStatus}" required>
                    <label th:for="${'userStatus_' + dict.dictCode}" th:text="${dict.dictLabel}"></label>
                </div>
                <span class="help-block m-b-none"><i
                        class="fa fa-info-circle"></i> 提示：设置为黑名单后该用户将不能评论，且该评论信息不会前端展示</span>
            </div>
        </div>
        <div class="form-group">
            <label class="col-sm-3 control-label"><span style="color: red; ">*</span>置顶标志：</label>
            <div class="col-sm-8">
                <div class="radio-box" th:each="dict : ${@dict.getType('cms_top_flag')}">
                    <input type="radio" th:id="${'topFlag_' + dict.dictCode}" name="topFlag"
                           th:value="${dict.dictValue}" th:field="*{topFlag}" required>
                    <label th:for="${'topFlag_' + dict.dictCode}" th:text="${dict.dictLabel}"></label>
                </div>
                <span class="help-block m-b-none"><i
                        class="fa fa-info-circle"></i> 提示：置顶评论将在列表首部展示</span>
            </div>
        </div>
    </form>
</div>
<th:block th:include="include :: footer"/>
<script type="text/javascript">
    var prefix = ctx + "bussiness_cms/comment";
    $("#form-comment-edit").validate({
        focusCleanup: true
    });

    function submitHandler() {
        if ($.validate.form()) {
            $.operate.save(prefix + "/edit", $('#form-comment-edit').serialize());
        }
    }
</script>
</body>
</html>