sysRoleEdit.jsp 5.3 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149
  1. <%--
  2. time:2011-11-28 11:31:14
  3. desc:edit the 系统角色表
  4. --%>
  5. <%@page language="java" pageEncoding="UTF-8"%>
  6. <%@include file="/commons/include/html_doctype.html"%>
  7. <html>
  8. <head>
  9. <title>编辑 系统角色表</title>
  10. <%@include file="/commons/include/form.jsp" %>
  11. <%-- <link href="${ctx}/styles/ligerUI/ligerui-all.css" rel="stylesheet" type="text/css" /> --%>
  12. <f:link href="Aqua/css/ligerui-all.css"></f:link>
  13. <script type="text/javascript" src="${ctx}/js/calendar/My97DatePicker/WdatePicker.js"></script>
  14. <script type="text/javascript" src="${ctx}/js/hotent/platform/system/Share.js"></script>
  15. <script type="text/javascript" src="${ctx}/servlet/ValidJs?form=sysRole"></script>
  16. <script type="text/javascript">
  17. $(function() {
  18. function showRequest(formData, jqForm, options) {
  19. return true;
  20. }
  21. if(${sysRole.roleId==null}){
  22. valid(showRequest,showResponse,1);
  23. $("#roleName").blur(function(){
  24. var obj=$(this);
  25. autoPingin(obj);
  26. });
  27. }else{
  28. valid(showRequest,showResponse);
  29. }
  30. $("a.save").click(function() {
  31. $('#sysRoleForm').submit();
  32. });
  33. });
  34. function autoPingin(obj){
  35. var value=obj.val();
  36. Share.getPingyin({
  37. input:value,
  38. postCallback:function(data){
  39. $("#alias").val(data.output);
  40. }
  41. });
  42. }
  43. function selectCategory(obj) {
  44. var selObj = $(obj);
  45. $("#category").val(selObj.val());
  46. }
  47. </script>
  48. </head>
  49. <body>
  50. <div class="panel">
  51. <div class="hide-panel">
  52. <div class="panel-top">
  53. <div class="tbar-title">
  54. <span class="tbar-label">
  55. <c:if test="${sysRole.roleId==null }">添加系统角色</c:if>
  56. <c:if test="${sysRole.roleId!=null }">编辑系统角色</c:if>
  57. </span>
  58. </div>
  59. <div class="panel-toolbar">
  60. <div class="toolBar">
  61. <div class="group"><a class="link save" id="dataFormSave" href="javascript:;"><span></span>保存</a></div>
  62. <div class="l-bar-separator"></div>
  63. <div class="group"><a class="link back" href="list.ht"><span></span>返回</a></div>
  64. </div>
  65. </div>
  66. </div>
  67. </div>
  68. <div class="panel-body">
  69. <form id="sysRoleForm" method="post" action="save.ht">
  70. <table class="table-detail" cellpadding="0" cellspacing="0" border="0">
  71. <tr>
  72. <th width="20%">角色名称: </th>
  73. <td><input type="text" id="roleName" name="roleName" value="${sysRole.roleName}" class="inputText"/></td>
  74. </tr>
  75. <tr>
  76. <th width="20%">角色别名: </th>
  77. <td><input type="text" id="alias" name="alias" value="${sysRole.alias}" class="inputText"/></td>
  78. </tr>
  79. <tr>
  80. <th><span>角色分类:</span></th>
  81. <td>
  82. <input id="category" name="category" value="${sysRole.category}" class="inputText"/>
  83. <select onchange="selectCategory(this)" class="inputText">
  84. <option value="">请选择</option>
  85. <c:forEach items="${categoryList}" var="catName">
  86. <option value="${catName}" <c:if test="${sysRole.category==catName}">selected</c:if>>${catName}</option>
  87. </c:forEach>
  88. </select>
  89. </td>
  90. </tr>
  91. <tr>
  92. <th width="20%">子系统名称: </th>
  93. <td>
  94. <c:choose>
  95. <c:when test="${sysRole.roleId==null }">
  96. <select name="systemId" id="systemId" class="select" style="width:18%;">
  97. <option value="0">--请选择--</option>
  98. <c:forEach var="subsystem" items="${subsystemList }">
  99. <option value="${subsystem.systemId}" >${subsystem.sysName}</option>
  100. </c:forEach>
  101. </select>
  102. </c:when>
  103. <c:otherwise>
  104. <input type="hidden" name="systemId" value="${sysRole.systemId }" />
  105. <c:forEach var="subsystem" items="${subsystemList }">
  106. <c:if test="${sysRole.systemId==subsystem.systemId }">${subsystem.sysName }</c:if>
  107. </c:forEach>
  108. </c:otherwise>
  109. </c:choose>
  110. </td>
  111. </tr>
  112. <tr>
  113. <th width="20%">备注: </th>
  114. <td>
  115. <textarea rows="3" cols="50" id="memo" name="memo">${sysRole.memo}</textarea>
  116. </tr>
  117. <tr>
  118. <th width="20%">允许删除: </th>
  119. <td>
  120. <input type="radio" id="allowDel" name="allowDel" value="1" checked="checked" <c:if test="${sysRole.allowDel==1}"> checked="checked" </c:if> />允许
  121. <input type="radio" id="allowDel" name="allowDel" value="0" <c:if test="${sysRole.allowDel==0}"> checked="checked" </c:if> >不允许
  122. </td>
  123. </tr>
  124. <tr>
  125. <th width="20%">允许编辑: </th>
  126. <td>
  127. <input type="radio" id="allowEdit" name="allowEdit" value="1" checked="checked" <c:if test="${sysRole.allowEdit==1}"> checked="checked" </c:if> />允许
  128. <input type="radio" id="allowEdit" name="allowEdit" value="0" <c:if test="${sysRole.allowEdit==0}"> checked="checked" </c:if> >不允许
  129. </td>
  130. </tr>
  131. <tr>
  132. <th width="20%">是否启用: </th>
  133. <td>
  134. <input type="radio" id="enabled" name="enabled" value="1" checked="checked" <c:if test="${sysRole.enabled==1}"> checked="checked" </c:if> />启用
  135. <input type="radio" id="enabled" name="enabled" value="0" <c:if test="${sysRole.enabled==0}"> checked="checked" </c:if> >禁用
  136. </td>
  137. </tr>
  138. </table>
  139. <input type="hidden" name="roleId" value="${sysRole.roleId}" />
  140. </form>
  141. </div>
  142. </div>
  143. </body>
  144. </html>