<%@ Control Language="C#" Inherits="System.Web.Mvc.ViewUserControl<Domain.SysRole>" %>
<form class="easyui-form" method="post" data-options="novalidate:true">
<input type="hidden" name="ID" value="<%: Model.ID %>" />
<table style="margin: 5px auto;" cellpadding="3">
    <tr>
        <th>
            <label for="txtName">
                <%: Html.Language("RoleName")%>：</label>
        </th>
        <td>
            <input id="txtName" name="Name" class="easyui-validatebox textbox text" data-options="required:true,validType:'length[1,20]'"
                value="<%: Model.Name %>" />
        </td>
    </tr>
    <tr>
        <th>
            <label for="selGroup">
                <%: Html.Language("Group")%>：</label>
        </th>
        <td>
            <select id="selGroup" name="SysHotelGroupID" class="easyui-combotree" style="width: 180px;"
                data-options="
						lines:true,
						editable:false,
						bodyCls:'easyui-tree-no-icon',
						url:'/SysHotel/LoadGroupTree2/',
						panelHeight: '350px',
						required: true,
						value: <%: Model.SysHotelGroup != null ? Model.SysHotelGroup.ID.ToString() : "''" %>
					">
            </select>
        </td>
    </tr>
    <tr>
        <th>
            <label for="treeAuthority">
                <%: Html.Language("OwnAuthority")%>：</label>
        </th>
        <td>
            <div class="easyui-panel" style="height: 300px; overflow: auto;">
                <%--<ul id="treeAuthority" class="authorities easyui-tree easyui-tree-no-icon" data-options="
							url: '/SysRole/LoadRoleAuthorities<%: Model.ID != 0 ? "?roleId=" + Model.ID : "/" %>',
							cascadeCheck: false,
							checkbox: true,
							animate: true,
							lines: true">
                </ul>--%>
                <ul id="treeAuthority" class="easyui-tree" data-options="cascadeCheck: true,checkbox:true,animate:true,lines:true,url:'/SysRole/LoadRoleAuthorities?roleId=<%:Model.ID != 0 ? Model.ID : 0 %>'">
                </ul>
            </div>
        </td>
    </tr>
    <tr>
        <th>
            <label for="txtSort">
                <%: Html.Language("Sort")%>：</label>
        </th>
        <td>
            <input id="txtSort" name="Sort" class="easyui-numberspinner text" value="1" style="width: 60px;"
                data-options="required:true,min:1,value:<%: Model.Sort %>" />
        </td>
    </tr>
</table>
</form>
