<%@ page import="com.lightinit.hsdataplatformresdir.dictionary.DicResourceCatelogType" %>
<%@ page import="com.lightinit.hsdataplatformresdir.dictionary.DicResourceState" %>
<%@ page import="com.lightinit.hsdataplatformresdir.dictionary.DicResourceAuditResult" %>
<%@ page language="java" pageEncoding="UTF-8" contentType="text/html; charset=UTF-8"%>
<%@ page isELIgnored="false" %>
<%@ taglib uri="http://java.sun.com/jsp/jstl/core" prefix="c" %>
<%@ taglib uri="http://java.sun.com/jsp/jstl/fmt" prefix="fmt" %>
<%
    String basePath = request.getContextPath();
%>
<jsp:include page="../../../common/admin/modal_content_pre.jsp"><jsp:param name="modal_title" value="编辑"/></jsp:include>
<form id="formAddRole" action="<%=basePath%>/admin/user/add_role.action" method="post" class="form-horizontal">
    <input type="hidden" name="id" value="${busiModel.id}" />
    <input type="hidden" name="auditResult" />
    <div class="form-group">
        <label class="col-md-3 col-sm-3 control-label">用户名：</label>
        <div class="col-md-7 col-sm-7">
            <p class="form-control-static">${busiModel.username}</p>
        </div>
    </div>
    <div class="form-group">
        <label class="col-md-3 col-sm-3 control-label">姓名：</label>
        <div class="col-md-7 col-sm-7">
            <p class="form-control-static">${busiModel.showname}</p>
        </div>
    </div>
    <div class="form-group">
        <label for="roleId" class="col-md-3 col-sm-3 control-label">角色：</label>
        <div class="col-md-7 col-sm-7">
            <input type="hidden" id="roleId" name="roleId" />
            <button type="button" class="btn btn-default dropdown-toggle" style="min-width: 120px; text-align: right;">
                <span class="caret" style="margin-left: 10px;"></span>
            </button>
            <div id="divRole"></div>
            <span class="help-block"></span>
        </div>
    </div>
</form>
<jsp:include page="../../../common/admin/modal_content_post.jsp"></jsp:include>
<jsp:include page="../../../common/admin/modal_footer_pre.jsp"></jsp:include>
<button type="button" id="btnCancel" class="btn btn-default" data-dismiss="modal"><i class="fa fa-close"></i>取消</button>
<button type="button" id="btnSave" class="btn btn-success"><i class="fa fa-check"></i>保存</button>
<jsp:include page="../../../common/admin/modal_footer_post.jsp"></jsp:include>
<script type="text/javascript">
    $("#btnSave").click(function() {
        $('#formAddRole').ajaxSubmitClose();
    });

    $("#divRole").selectTree({url: "<%=basePath%>/admin/common/role_tree_data.action${adminRole == null ? "" : "?selectedId="}${adminRole.roleid}"});
</script>