123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111 |
- <%@ page contentType="text/html;charset=UTF-8" %>
- <%@ include file="/webpage/include/taglib.jsp"%>
- <html>
- <head>
- <title>培训计划管理</title>
- <meta name="decorator" content="ani"/>
- <!-- SUMMERNOTE -->
- <%@include file="/webpage/include/summernote.jsp" %>
- <script type="text/javascript">
- $(document).ready(function() {
- <c:if test="${eduTrainPlan.oprType !=null && eduTrainPlan.oprType!=''}">
- $(".table.table-bordered").find("input,textarea,select").attr("disabled", "disabled");
- $('#content').summernote({
- height: 300
- });
- $('#content').summernote('disable');
- </c:if>
- $('#trainDate').datetimepicker({
- format: "YYYY-MM-DD"
- });
- //富文本初始化
- $('#content').summernote({
- height: 300,
- lang: 'zh-CN',
- callbacks: {
- onChange: function(contents, $editable) {
- $("input[name='content']").val($('#content').summernote('code'));//取富文本的值
- }
- }
- });
- });
- function save() {
- var isValidate = jp.validateForm('#inputForm');//校验表单
- if(!isValidate){
- return false;
- }else{
- // if ($('#content').summernote('isEmpty')) {
- // alert('editor content is empty');
- // return false;
- // }
- jp.loading();
- jp.post("${ctx}/train/eduTrainPlan/save",$('#inputForm').serialize(),function(data){
- if(data.success){
- jp.getParent().refresh();
- var dialogIndex = parent.layer.getFrameIndex(window.name); // 获取窗口索引
- parent.layer.close(dialogIndex);
- jp.success(data.msg)
- }else{
- jp.error(data.msg);
- }
- })
- }
- }
- </script>
- </head>
- <body class="bg-white">
- <form:form id="inputForm" modelAttribute="eduTrainPlan" class="form-horizontal">
- <form:hidden path="id"/>
- <table class="table table-bordered">
- <tbody>
- <tr>
- <td class="width-15 active"><label class="pull-right"><font color="red">*</font>培训标题:</label></td>
- <td class="width-35" colspan="3">
- <form:input path="title" htmlEscape="false" maxlength="100" class="form-control required"/>
- </td>
- </tr>
- <tr>
- <td class="width-15 active"><label class="pull-right"><font color="red">*</font>培训时间:</label></td>
- <td class="width-35">
- <div class='input-group form_datetime' id='trainDate'>
- <input type='text' name="trainDate" class="form-control required" value="<fmt:formatDate value="${eduTrainPlan.trainDate}" pattern="yyyy-MM-dd"/>"/>
- <span class="input-group-addon">
- <span class="glyphicon glyphicon-calendar"></span>
- </span>
- </div>
- </td>
- <td class="width-15 active"><label class="pull-right">培训范围:</label></td>
- <td class="width-35">
- <form:input path="trainRange" htmlEscape="false" maxlength="100" class="form-control "/>
- </td>
- </tr>
- <tr>
- <td class="width-15 active"><label class="pull-right"><font color="red">*</font>培训讲师:</label></td>
- <td class="width-35">
- <form:input path="teacher" htmlEscape="false" maxlength="50" class="form-control required"/>
- </td>
- <td class="width-15 active"><label class="pull-right"><font color="red">*</font>培训地点:</label></td>
- <td class="width-35">
- <form:input path="place" htmlEscape="false" class="form-control required"/>
- </td>
- </tr>
- <tr>
- <td class="width-15 active"><label class="pull-right">培训内容:</label></td>
- <td class="width-35" colspan="3">
- <input type="hidden" name="content" value=" ${eduTrainPlan.content}" />
- <div id="content">
- ${fns:unescapeHtml(eduTrainPlan.content)}
- </div>
- </td>
- </tr>
- </tbody>
- </table>
- </form:form>
- </body>
- </html>
|