eduTrainNoticeForm.jsp 2.6 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576
  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. <!-- SUMMERNOTE -->
  8. <%@include file="/webpage/include/summernote.jsp" %>
  9. <script type="text/javascript">
  10. $(document).ready(function() {
  11. <c:if test="${eduTrainNotice.oprType !=null && eduTrainNotice.oprType!=''}">
  12. $(".table.table-bordered").find("input,textarea,select").attr("disabled", "disabled");
  13. $('#content').summernote({
  14. height: 300
  15. });
  16. $('#content').summernote('disable');
  17. </c:if>
  18. //富文本初始化
  19. $('#content').summernote({
  20. height: 300,
  21. lang: 'zh-CN',
  22. callbacks: {
  23. onChange: function(contents, $editable) {
  24. $("input[name='content']").val($('#content').summernote('code'));//取富文本的值
  25. }
  26. }
  27. });
  28. });
  29. function save() {
  30. var isValidate = jp.validateForm('#inputForm');//校验表单
  31. if(!isValidate){
  32. return false;
  33. }else{
  34. jp.loading();
  35. jp.post("${ctx}/train/eduTrainNotice/save",$('#inputForm').serialize(),function(data){
  36. if(data.success){
  37. jp.getParent().refresh();
  38. var dialogIndex = parent.layer.getFrameIndex(window.name); // 获取窗口索引
  39. parent.layer.close(dialogIndex);
  40. jp.success(data.msg)
  41. }else{
  42. jp.error(data.msg);
  43. }
  44. })
  45. }
  46. }
  47. </script>
  48. </head>
  49. <body class="bg-white">
  50. <form:form id="inputForm" modelAttribute="eduTrainNotice" class="form-horizontal">
  51. <form:hidden path="id"/>
  52. <table class="table table-bordered">
  53. <tbody>
  54. <tr>
  55. <td class="width-15 active"><label class="pull-right"><font color="red">*</font>通知标题:</label></td>
  56. <td class="width-35">
  57. <form:input path="title" htmlEscape="false" maxlength="100" class="form-control required"/>
  58. </td>
  59. </tr>
  60. <tr>
  61. <td class="width-15 active"><label class="pull-right">通知内容:</label></td>
  62. <td class="width-35">
  63. <input type="hidden" name="content" value=" ${eduTrainNotice.content}"/>
  64. <div id="content">
  65. ${fns:unescapeHtml(eduTrainNotice.content)}
  66. </div>
  67. </td>
  68. </tr>
  69. </tbody>
  70. </table>
  71. </form:form>
  72. </body>
  73. </html>