<!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-model-add">
            <div class="form-group">
                <label class="col-sm-3 control-label">型号分类：</label>
                <div class="col-sm-8">
                    <select name="mkId" id="mkId" class="form-control" th:with="kinds=${modelKindList}" required>
                        <option value="">请选择</option>
                        <option th:each="kind : ${kinds}" th:text="${kind.kindName}"
                                th:value="${kind.id}"></option>
                    </select>
                </div>
            </div>
            <div class="form-group">
                <label class="col-sm-3 control-label">型号名称：</label>
                <div class="col-sm-8">
                    <input name="modelName" class="form-control" type="text" required>
                </div>
            </div>
        </form>
    </div>
    <th:block th:include="include :: footer" />
    <script th:inline="javascript">
        var prefix = ctx + "master/model";
        $("#form-model-add").validate({
            focusCleanup: true
        });

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