<!DOCTYPE html>
<html xmlns:th="http://www.thymeleaf.org">
<head th:replace="/common/template :: header(~{::title},~{::link},~{::style})"></head>
<body>
<div class="layui-form timo-compile">
    <form th:action="@{/api/rbac/user}">
        <div class="layui-form-item">
            <label class="layui-form-label required">登录名</label>
            <div class="layui-input-inline">
                <input class="layui-input" type="text" name="username"  placeholder="请输入登录名">
            </div>
        </div>
        <div class="layui-form-item">
            <label class="layui-form-label required">用户名</label>
            <div class="layui-input-inline">
                <input class="layui-input" type="text" name="nickname" placeholder="请输入用户名">
            </div>
        </div>
        <div class="layui-form-item">
            <label class="layui-form-label required">用户密码</label>
            <div class="layui-input-inline">
                <input class="layui-input" type="password" name="password" placeholder="请输入用户密码">
            </div>
        </div>
        <div class="layui-form-item">
            <label class="layui-form-label">手机号码</label>
            <div class="layui-input-inline">
                <input class="layui-input" type="text" name="mobilePhone" placeholder="请输入手机号码">
            </div>
        </div>
        <div class="layui-form-item">
            <label class="layui-form-label">邮箱</label>
            <div class="layui-input-inline">
                <input class="layui-input" type="text" name="email" placeholder="请输入邮箱">
            </div>
        </div>
        <div class="layui-form-item">
            <label class="layui-form-label">选择性别</label>
            <div class="layui-input-inline">
                <input type="radio" name="gender" value="1" title="男" checked>
                <div class="layui-unselect layui-form-radio layui-form-radioed">
                    <i class="layui-anim layui-icon"></i>
                    <div>男</div>
                </div>
                <input type="radio" name="gender" value="2" title="女">
                <div class="layui-unselect layui-form-radio">
                    <i class="layui-anim layui-icon"></i>
                    <div>女</div>
                </div>
                <input type="radio" name="gender" value="3" title="未知">
                <div class="layui-unselect layui-form-radio">
                    <i class="layui-anim layui-icon"></i>
                    <div>未知</div>
                </div>
            </div>
        </div>
        <div class="layui-form-item">
            <label class="layui-form-label required">用户角色</label>
            <div class="layui-input-block">
                <input th:each="item:${allRoles}" type="checkbox" name="roles" th:title="${item.name}"
                       th:value="${item.id}" th:checked="${#sets.contains(userRoles, item)}" lay-skin="primary">
            </div>
        </div>
        <div class="layui-form-item timo-finally">
            <button class="layui-btn ajax-submit"><i class="fa fa-check-circle"></i> 保存</button>
            <button class="layui-btn btn-secondary close-popup"><i class="fa fa-times-circle"></i> 关闭</button>
        </div>
    </form>
</div>
<script th:replace="/common/template :: script"></script>
</body>
</html>