role-update.jsp 2.9 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990
  1. [#ftl]
  2. <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
  3. <html xmlns="http://www.w3.org/1999/xhtml">
  4. <head>
  5. <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
  6. <title>修改角色信息</title>
  7. <!--框架必需start-->
  8. <script type="text/javascript" src="${ctx}/qui/libs/js/jquery.js"></script>
  9. <script type="text/javascript" src="${ctx}/qui/libs/js/framework.js"></script>
  10. <link href="${ctx}/qui/libs/css/import_basic.css" rel="stylesheet" type="text/css"/>
  11. <link rel="stylesheet" type="text/css" id="skin" prePath="${ctx}/qui/"/>
  12. <link rel="stylesheet" type="text/css" id="customSkin"/>
  13. <!--框架必需end-->
  14. <!-- 表单验证start -->
  15. <link rel="stylesheet" href="${ctx}/qui/libs/js/form/validform/css/style.css" type="text/css" media="all" />
  16. <script src="${ctx}/qui/libs/js/form/validform/validform.js" type="text/javascript"></script>
  17. <!-- 表单验证end -->
  18. <!--表单异步提交start-->
  19. <script src="${ctx}/qui/libs/js/form/form.js" type="text/javascript"></script>
  20. <!--表单异步提交end-->
  21. </head>
  22. <body>
  23. <form id="myFormId" action="${ctx}/role/updateData.do" method="post" target="frmright">
  24. <div class="box1" id="formContent" whiteBg="true">
  25. <input type="hidden" name="roleId" value="${role.roleId}"/>
  26. <table class="tableStyle" formMode="transparent">
  27. <tr>
  28. <td width="150"><span class="star">*</span>角色名称:</td>
  29. <td><input type="text" name="roleName" value="${role.roleName}" watermark="请输入角色名称" datatype="*" ajaxurl="validateRoleName.do?rid=${role.roleId}" /></td>
  30. </tr>
  31. <tr>
  32. <td> 角色描述:</td>
  33. <td><textarea name="roleDesc">${role.roleDesc}</textarea></td>
  34. </tr>
  35. <tr>
  36. <td>状态:</td>
  37. <td>
  38. <input type="radio" id="radio-1" name="state" value="1" [#if role.state==1] checked="checked" [/#if] /><label for="radio-1" class="hand">启用</label>
  39. <input type="radio" id="radio-2" name="state" value="0" [#if role.state==0] checked="checked" [/#if] /><label for="radio-2" class="hand">禁用</label>
  40. </td>
  41. </tr>
  42. <tr>
  43. <td colspan="2">
  44. <input type="submit" value="提交"/>
  45. <input type="button" value="取消" onclick="top.Dialog.close()"/>
  46. </td>
  47. </tr>
  48. </table>
  49. </div>
  50. </form>
  51. <!-- 异步提交start -->
  52. <script type="text/javascript">
  53. function initComplete(){
  54. //表单提交
  55. $("#myFormId").Validform({
  56. tiptype:3,//表示在右边显示
  57. ajaxPost:true,
  58. showAllError:true,
  59. callback:function(responseText){
  60. $.Hidemsg();
  61. if(responseText.status=="y"){
  62. top.Dialog.alert(responseText.info,function(){
  63. closeWin();
  64. });
  65. }else{
  66. top.Dialog.alert(responseText.info,function(){
  67. return false;
  68. });
  69. }
  70. }
  71. });
  72. }
  73. //重置
  74. function closeWin(){
  75. //刷新数据
  76. top.frmright.resetSearch();
  77. //关闭窗口
  78. top.Dialog.close();
  79. }
  80. </script>
  81. <!-- 异步提交end -->
  82. </body>
  83. </html>