<!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-datamsg-edit" th:object="${dataMsg}">
            <input name="id" th:field="*{id}" type="hidden">
            <div class="col-xs-12">
                <div class="form-group">
                    <label class="col-sm-3 control-label is-required">站点描述：</label>
                    <div class="col-sm-8">
                        <input name="sitename" th:field="*{sitename}" class="form-control" type="text" required>
                    </div>
                </div>
            </div>
            <div class="col-xs-12">
                <div class="form-group">
                    <label class="col-sm-3 control-label is-required">扫描链接：</label>
                    <div class="col-sm-8">
                        <input name="url" th:field="*{url}" class="form-control" type="text" required>
                    </div>
                </div>
            </div>
            <div class="col-xs-12">
                <div class="form-group">
                    <label class="col-sm-3 control-label is-required">muffet扫描命令：</label>
                    <div class="col-sm-8">
                        <textarea name="command" class="form-control" required>[[*{command}]]</textarea>
                    </div>
                </div>
            </div>
            <div class="col-xs-12">
                <div class="form-group">
                    <label class="col-sm-3 control-label is-required">json文件存放路径：</label>
                    <div class="col-sm-8">
                        <input name="jsonpath" th:field="*{jsonpath}" class="form-control" type="text" required>
                    </div>
                </div>
            </div>
            <div class="col-xs-12">
                <div class="form-group">
                    <label class="col-sm-3 control-label is-required">操作系统类型：</label>
                    <div class="col-sm-8">
                        <select name="ostype" class="form-control" th:with="type=${@dict.getType('sys_os')}" required>
                            <option th:each="dict : ${type}" th:text="${dict.dictLabel}" th:value="${dict.dictValue}" th:field="*{ostype}"></option>
                        </select>
                    </div>
                </div>
            </div>
        </form>
    </div>
    <th:block th:include="include :: footer" />
    <script th:inline="javascript">
        var prefix = ctx + "system/datamsg";
        $("#form-datamsg-edit").validate({
            focusCleanup: true
        });

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