role-create.jsp 2.7 KB

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