<!DOCTYPE html>
<html lang="zh" xmlns:th="http://www.thymeleaf.org" >
<head>
    <th:block th:include="include :: header('修改联系人')" />
<!--    <link th:href="@{/css/use/css1.css}" rel="stylesheet"/>-->
    <link th:href="@{/ruoyi/css/address.css}" rel="stylesheet"/>
    <th:block th:include="include :: bootstrap-duallistbox-css" />
</head>
<body class="white-bg">
<div  style="height: 50px;width: 100%"></div>
    <form class="form-horizontal" id="form-addressbook-edit" th:object="${rwkAddressBook}">
        <input name="id" th:field="*{id}" type="hidden">
        <div class="col-md-12" >
        <div class="form-group" >
            <div class="address-from-left">
                <span style="color: red">*</span>姓名：
            </div>
            <div class="address-from-right">
                <input type="text" id="bookName" name="bookName" th:field="*{bookName}" class="form-control" placeholder="请输入姓名">
            </div>
        </div>

        <div class="form-group" style="margin-top: 30px">
            <div class="address-from-left">
                电话：
            </div>
            <div class="address-from-right">
                <input type="text" name="information" class="form-control" th:field="*{information}" placeholder="请输入电话">
            </div>
        </div>

        <div class="form-group" style="margin-top: 30px">
            <div class="address-from-left">
                Email：
            </div>
            <div class="address-from-right">
                <input type="text" name="email" class="form-control" th:field="*{email}" placeholder="请输入Email">
            </div>
        </div>

            <div class="form-group" style="margin-top: 30px">
                <div class="address-from-left">
                    其他联系方式：
                </div>
                <div class="address-from-right">
                    <input type="text" name="othersInf" class="form-control" th:field="*{othersInf}" placeholder="请输入其他联系方式">
                </div>
            </div>
    </div>
    </form>
<th:block th:include="include :: footer" />
<script th:inline="javascript">
    var prefix = ctx + "system/addressbook";
    $("#form-addressbook-edit").validate({
        focusCleanup: true
    });

    function submitHandler() {
        let bookname=$('#bookName').val();
        if (bookname == '') {
            $.modal.alertWarning("请填写姓名再提交！");
            return;
        }else {
            $.operate.save(prefix + "/address/edit", $('#form-addressbook-edit').serialize());
        }
    }

</script>
</body>
</html>