systemConfig.jsp 4.4 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128
  1. <%@ page contentType="text/html;charset=UTF-8" %>
  2. <%@ include file="/webpage/include/taglib.jsp"%>
  3. <html>
  4. <head>
  5. <title>系统配置管理</title>
  6. <meta name="decorator" content="ani"/>
  7. <script type="text/javascript">
  8. $(document).ready(function(){
  9. $("#inputForm").validate({
  10. rules: {
  11. mailName: {
  12. required: true,
  13. email: true
  14. }}});
  15. });
  16. function modifyMail(){
  17. if($("#inputForm").valid() == false){
  18. return;
  19. }
  20. jp.post("${ctx}/sys/systemConfig/save",{"smtp":$("#smtp").val(),"port":$("#port").val(),"mailName":$("#mailName").val(),"mailPassword":$("#mailPassword").val()}, function (data) {
  21. if(data.success){
  22. top.layer.alert("更新成功!");
  23. }else{
  24. top.layer.alert("更新失败!");
  25. }
  26. });
  27. }
  28. function modifySms(){
  29. jp.post("${ctx}/sys/systemConfig/save",{"smsName":$("#smsName").val(),"smsPassword":$("#smsPassword").val()},function (data) {
  30. if(data.success){
  31. top.layer.alert("更新成功!");
  32. }else{
  33. top.layer.alert("更新失败!");
  34. }
  35. });
  36. }
  37. </script>
  38. </head>
  39. <body>
  40. <div class="wrapper wrapper-content">
  41. <div class="row animated fadeInRight">
  42. <div class="col-sm-5">
  43. <form:form id="inputForm" modelAttribute="systemConfig" action="${ctx}/sys/systemConfig/save" method="post" class="form-horizontal">
  44. <div class="panel panel-primary">
  45. <div class="panel-heading">
  46. <i class="fa fa-envelope"></i> 系统邮箱设置
  47. <div class="pull-right">
  48. <a href="#" onclick="modifyMail()" style="color:white">
  49. <i style="font-size: 20px" class="fa fa-save"></i>
  50. </a>
  51. </div>
  52. </div>
  53. <div class="panel-body">
  54. <table class="table">
  55. <tbody>
  56. <tr>
  57. <td class="width-15"><label class="pull-right">邮箱服务器地址:</label></td>
  58. <td class="width-35">
  59. <form:input path="smtp" htmlEscape="false" maxlength="64" class="form-control "/>
  60. </td>
  61. </tr>
  62. <tr>
  63. <td class="width-15"><label class="pull-right">邮箱服务器端口:</label></td>
  64. <td class="width-35">
  65. <form:input path="port" htmlEscape="false" maxlength="64" class="form-control "/>
  66. </td>
  67. </tr>
  68. <tr>
  69. <td class="width-15"><label class="pull-right">系统邮箱地址:</label></td>
  70. <td class="width-35">
  71. <form:input path="mailName" htmlEscape="false" maxlength="64" class="form-control "/>
  72. </td>
  73. </tr>
  74. <tr>
  75. <td class="width-15"><label class="pull-right">系统邮箱密码:</label></td>
  76. <td class="width-35">
  77. <form:password path="mailPassword" htmlEscape="false" maxlength="64" class="form-control required"/>
  78. </td>
  79. </tr>
  80. </tbody>
  81. </table>
  82. </div>
  83. </div>
  84. </form:form>
  85. </div>
  86. <div class="col-sm-5">
  87. <form:form id="inputForm1" modelAttribute="systemConfig" action="${ctx}/sys/systemConfig/save" method="post" class="form-horizontal">
  88. <div class="panel panel-primary">
  89. <div class="panel-heading">
  90. <i class="fa fa-comment"></i> 短信设置(<a href="http://www.cnsms.cn/" target="_blank"><font color="white">企信通</font></a>)
  91. <div class="pull-right">
  92. <a href="#" onclick="modifySms()" style="color:white">
  93. <i style="font-size: 20px" class="fa fa-save"></i>
  94. </a>
  95. </div>
  96. </div>
  97. <div class="panel-body">
  98. <table class="table">
  99. <tr>
  100. <td class="width-15"><label class="pull-right">短信用户名:</label></td>
  101. <td class="width-35">
  102. <form:input path="smsName" htmlEscape="false" maxlength="64" class="form-control "/>
  103. </td>
  104. </tr>
  105. <tr>
  106. <td class="width-15"><label class="pull-right">短信密码:</label></td>
  107. <td class="width-35">
  108. <form:password path="smsPassword" htmlEscape="false" maxlength="64" class="form-control "/>
  109. </td>
  110. </tr>
  111. </table>
  112. </div>
  113. </div>
  114. </form:form>
  115. </div>
  116. </div>
  117. </div>
  118. </body>
  119. </html>