eduTrainPlanForm.jsp 4.0 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111
  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="${eduTrainPlan.oprType !=null && eduTrainPlan.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. $('#trainDate').datetimepicker({
  19. format: "YYYY-MM-DD"
  20. });
  21. //富文本初始化
  22. $('#content').summernote({
  23. height: 300,
  24. lang: 'zh-CN',
  25. callbacks: {
  26. onChange: function(contents, $editable) {
  27. $("input[name='content']").val($('#content').summernote('code'));//取富文本的值
  28. }
  29. }
  30. });
  31. });
  32. function save() {
  33. var isValidate = jp.validateForm('#inputForm');//校验表单
  34. if(!isValidate){
  35. return false;
  36. }else{
  37. // if ($('#content').summernote('isEmpty')) {
  38. // alert('editor content is empty');
  39. // return false;
  40. // }
  41. jp.loading();
  42. jp.post("${ctx}/train/eduTrainPlan/save",$('#inputForm').serialize(),function(data){
  43. if(data.success){
  44. jp.getParent().refresh();
  45. var dialogIndex = parent.layer.getFrameIndex(window.name); // 获取窗口索引
  46. parent.layer.close(dialogIndex);
  47. jp.success(data.msg)
  48. }else{
  49. jp.error(data.msg);
  50. }
  51. })
  52. }
  53. }
  54. </script>
  55. </head>
  56. <body class="bg-white">
  57. <form:form id="inputForm" modelAttribute="eduTrainPlan" class="form-horizontal">
  58. <form:hidden path="id"/>
  59. <table class="table table-bordered">
  60. <tbody>
  61. <tr>
  62. <td class="width-15 active"><label class="pull-right"><font color="red">*</font>培训标题:</label></td>
  63. <td class="width-35" colspan="3">
  64. <form:input path="title" htmlEscape="false" maxlength="100" class="form-control required"/>
  65. </td>
  66. </tr>
  67. <tr>
  68. <td class="width-15 active"><label class="pull-right"><font color="red">*</font>培训时间:</label></td>
  69. <td class="width-35">
  70. <div class='input-group form_datetime' id='trainDate'>
  71. <input type='text' name="trainDate" class="form-control required" value="<fmt:formatDate value="${eduTrainPlan.trainDate}" pattern="yyyy-MM-dd"/>"/>
  72. <span class="input-group-addon">
  73. <span class="glyphicon glyphicon-calendar"></span>
  74. </span>
  75. </div>
  76. </td>
  77. <td class="width-15 active"><label class="pull-right">培训范围:</label></td>
  78. <td class="width-35">
  79. <form:input path="trainRange" htmlEscape="false" maxlength="100" class="form-control "/>
  80. </td>
  81. </tr>
  82. <tr>
  83. <td class="width-15 active"><label class="pull-right"><font color="red">*</font>培训讲师:</label></td>
  84. <td class="width-35">
  85. <form:input path="teacher" htmlEscape="false" maxlength="50" class="form-control required"/>
  86. </td>
  87. <td class="width-15 active"><label class="pull-right"><font color="red">*</font>培训地点:</label></td>
  88. <td class="width-35">
  89. <form:input path="place" htmlEscape="false" class="form-control required"/>
  90. </td>
  91. </tr>
  92. <tr>
  93. <td class="width-15 active"><label class="pull-right">培训内容:</label></td>
  94. <td class="width-35" colspan="3">
  95. <input type="hidden" name="content" value=" ${eduTrainPlan.content}" />
  96. <div id="content">
  97. ${fns:unescapeHtml(eduTrainPlan.content)}
  98. </div>
  99. </td>
  100. </tr>
  101. </tbody>
  102. </table>
  103. </form:form>
  104. </body>
  105. </html>