role-perm-input.jsp 2.4 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485
  1. <%@page contentType="text/html;charset=UTF-8"%>
  2. <%@include file="/taglibs.jsp"%>
  3. <%pageContext.setAttribute("currentHeader", "auth");%>
  4. <%pageContext.setAttribute("currentMenu", "auth");%>
  5. <%
  6. String sId = request.getParameter("id");
  7. if(sId!=null){
  8. pageContext.setAttribute("currentTitle", "user-process-6");
  9. }
  10. else{
  11. pageContext.setAttribute("currentTitle", "user-process-2");
  12. }
  13. %>
  14. <!doctype html>
  15. <html>
  16. <head>
  17. <%@include file="/common/meta.jsp"%>
  18. <title>编辑</title>
  19. <%@include file="/common/s3.jsp"%>
  20. <script type="text/javascript">
  21. $(function() {
  22. $("#role-permForm").validate({
  23. submitHandler: function(form) {
  24. bootbox.animate(false);
  25. var box = bootbox.dialog('<div class="progress progress-striped active" style="margin:0px;"><div class="bar" style="width: 100%;"></div></div>');
  26. form.submit();
  27. },
  28. errorClass: 'validate-error'
  29. });
  30. })
  31. </script>
  32. </head>
  33. <body>
  34. <%@include file="/header/_pim3.jsp"%>
  35. <div class="row-fluid">
  36. <%@include file="/menu/user.jsp"%>
  37. <!-- start of main -->
  38. <section id="m-main" class="col-md-10" style=" ">
  39. <div class="panel panel-default">
  40. <div class="panel-heading">
  41. <i class="glyphicon glyphicon-list"></i>
  42. 编辑
  43. </div>
  44. <div class="panel-body">
  45. <form id="roleForm" method="post" action="role-perm-save.do" class="form-horizontal">
  46. <input type="hidden" name="id" value="${id}">
  47. <c:forEach items="${permTypes}" var="permType">
  48. <div class="form-group">
  49. <label class="control-label col-md-1"><strong>${permType.name}:</strong></label>
  50. <div class="col-sm-5">
  51. <c:forEach items="${permType.perms}" var="item">
  52. <input id="selectedItem-${item.id}" type="checkbox" name="selectedItem" value="${item.id}" <tags:contains items="${selectedItem}" item="${item.id}">checked</tags:contains>>
  53. <label for="selectedItem-${item.id}" style="display:inline;">${item.name}</label>
  54. &nbsp;
  55. </c:forEach>
  56. </div>
  57. </div>
  58. </c:forEach>
  59. <div class="form-group">
  60. <div class="col-sm-5">
  61. <button id="submitButton" class="btn btn-primary a-submit"><spring:message code='core.input.save' text='保存'/></button>
  62. &nbsp;
  63. <button type="button" onclick="history.back();" class="btn btn-link a-cancel"><spring:message code='core.input.back' text='返回'/></button>
  64. </div>
  65. </div>
  66. </form>
  67. </div>
  68. </div>
  69. </section>
  70. <!-- end of main -->
  71. </div>
  72. </body>
  73. </html>