template-field-input.jsp 3.3 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102
  1. <%@page contentType="text/html;charset=UTF-8"%>
  2. <%@include file="/taglibs.jsp"%>
  3. <%pageContext.setAttribute("currentHeader", "template");%>
  4. <%pageContext.setAttribute("currentMenu", "template");%>
  5. <%pageContext.setAttribute("currentTitle", "party-8");%>
  6. <!doctype html>
  7. <html>
  8. <head>
  9. <%@include file="/common/meta.jsp"%>
  10. <title>编辑</title>
  11. <%@include file="/common/s3.jsp"%>
  12. <script type="text/javascript">
  13. $(function() {
  14. $("#template-fieldForm").validate({
  15. submitHandler: function(form) {
  16. bootbox.animate(false);
  17. var box = bootbox.dialog('<div class="progress progress-striped active" style="margin:0px;"><div class="bar" style="width: 100%;"></div></div>');
  18. form.submit();
  19. },
  20. errorClass: 'validate-error'
  21. });
  22. <c:if test="${model.type != 'manual'}">
  23. var editor = CKEDITOR.replace('templateField_content');
  24. </c:if>
  25. })
  26. </script>
  27. </head>
  28. <body>
  29. <%@include file="/header/_pim3.jsp"%>
  30. <div class="row-fluid">
  31. <%@include file="/menu/template-info.jsp"%>
  32. <!-- start of main -->
  33. <section id="m-main" class="col-md-10" style=" ">
  34. <div class="panel panel-default">
  35. <div class="panel-heading">
  36. <i class="glyphicon glyphicon-list"></i>
  37. 编辑
  38. </div>
  39. <div class="panel-body">
  40. <form id="template-infoForm" method="post" action="template-field-save.do" class="form-horizontal">
  41. <c:if test="${model != null}">
  42. <input id="template-info_id" type="hidden" name="id" value="${model.id}">
  43. </c:if>
  44. <div class="form-group">
  45. <label class="control-label col-md-1" for="template-info_name"><spring:message code="template-info.template-info.input.name" text="名称"/></label>
  46. <div class="col-sm-5">
  47. <input id="template-info_name" type="text" name="name" value="${model.name}" size="40" class="form-control required" minlength="2" maxlength="10">
  48. </div>
  49. </div>
  50. <div class="form-group">
  51. <label class="control-label col-md-1" for="templateField_infoId">模板</label>
  52. <div class="col-sm-5">
  53. <select id="templateField_infoId" name="infoId" class="form-control">
  54. <c:forEach items="${templateInfos}" var="item">
  55. <option value="${item.id}">${item.name}</option>
  56. </c:forEach>
  57. </select>
  58. </div>
  59. </div>
  60. <div class="form-group">
  61. <label class="control-label col-md-1" for="template-info_code">类型</label>
  62. <div class="col-sm-5">
  63. <label><input id="mailTemplate_manual0" type="radio" name="type" value="manual" ${model.type == 'manual' ? 'checked' : ''}>手工</label>
  64. <label><input id="mailTemplate_manual0" type="radio" name="type" value="ckeditor" ${empty model.type || model.type == 'ckeditor' ? 'checked' : ''}>ckeditor</label>
  65. </div>
  66. </div>
  67. <div class="form-group">
  68. <label class="control-label col-md-1" for="templateField_content">内容</label>
  69. <div class="col-sm-5">
  70. <textarea id="templateField_content" name="content">${model.content}</textarea>
  71. </div>
  72. </div>
  73. <div class="form-group">
  74. <div class="col-sm-5">
  75. <button type="submit" class="btn btn-primary a-submit"><spring:message code='core.input.save' text='保存'/></button>
  76. &nbsp;
  77. <button type="button" class="btn btn-link a-cancel" onclick="history.back();"><spring:message code='core.input.back' text='返回'/></button>
  78. </div>
  79. </div>
  80. </form>
  81. </div>
  82. </article>
  83. </section>
  84. <!-- end of main -->
  85. </div>
  86. </body>
  87. </html>