orgNewsForm.jsp 4.9 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116
  1. <%@ page contentType="text/html;charset=UTF-8" %>
  2. <%@ include file="/webpage/include/taglib.jsp"%>
  3. <html>
  4. <head>
  5. <title>${appBaseNews.typeName}</title>
  6. <meta name="decorator" content="ani"/>
  7. <%@include file="/webpage/include/summernote.jsp" %>
  8. <script type="text/javascript">
  9. $(document).ready(function() {
  10. <c:if test="${appBaseNews.oprType !=null && appBaseNews.oprType!=''}">
  11. $(".table.table-bordered").find("input,textarea,select").attr("disabled", "disabled");
  12. $("#coverButton").hide();
  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}/app/base/appBaseNews/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="appBaseNews" class="form-horizontal">
  51. <form:hidden path="id"/>
  52. <form:hidden path="typeId"/>
  53. <table class="table table-bordered">
  54. <tbody>
  55. <tr>
  56. <td class="active" style="width: 18%;"><label class="pull-right"><font color="red">*</font>${appBaseNews.typeName}标题:</label></td>
  57. <td class="width-35" colspan="3">
  58. <form:input path="title" htmlEscape="false" maxlength="100" class="form-control required"/>
  59. </td>
  60. </tr>
  61. <tr>
  62. <td class="width-15 active"><label class="pull-right"><font color="red">*</font>所属党支部:</label></td>
  63. <td class="width-35">
  64. <c:choose>
  65. <c:when test="${admin}">
  66. <sys:treeselect id="dept" name="dept.id" value="${appBaseNews.dept.id}" labelName="dept.name" labelValue="${appBaseNews.dept.name}"
  67. title="所属党支部" url="/leader/org/leaderOrgNo/treeData" extId="${appBaseNews.id}" cssClass="form-control required" allowClear="true"/>
  68. </c:when>
  69. <c:otherwise>
  70. <input id="deptId" name="dept.id" type="hidden" value="${appBaseNews.dept.id}"/>
  71. <input id="dept" name="dept.name" class="form-control required" value="${appBaseNews.dept.name}" readonly>
  72. </c:otherwise>
  73. </c:choose>
  74. </td>
  75. <td class="width-15 active" rowspan="2"><label class="pull-right">图片:</label></td>
  76. <td class="width-35" rowspan="2">
  77. <c:choose>
  78. <c:when test="${appBaseNews.cover =='' ||appBaseNews.cover ==undefined}">
  79. </c:when>
  80. <c:otherwise>
  81. <img alt="image" src="${appBaseNews.cover}" height="150" width="250"/>
  82. </c:otherwise>
  83. </c:choose>
  84. <c:if test="${mode != 'view'}">
  85. <sys:fileUpload path="cover" value="${appBaseNews.cover}" uploadPath="/app/base/appBaseNews"
  86. type="image" fileNumLimit="1" fileSizeLimit="2048" />
  87. </c:if>
  88. </td>
  89. </tr>
  90. <tr>
  91. <td class="width-15 active"><label class="pull-right"><font color="red">*</font>首页显示:</label></td>
  92. <td class="width-35">
  93. <form:radiobuttons path="display" items="${fns:getDictList('yes_no')}" itemLabel="label" itemValue="value" htmlEscape="false" class="i-checks required"/>
  94. </td>
  95. </tr>
  96. <tr>
  97. <td class="width-15 active"><label class="pull-right">内容:</label></td>
  98. <td class="width-35" colspan="3">
  99. <input type="hidden" name="content" value=" ${appBaseNews.content}"/>
  100. <div id="content">
  101. ${fns:unescapeHtml(appBaseNews.content)}
  102. </div>
  103. </td>
  104. </tr>
  105. </tbody>
  106. </table>
  107. </form:form>
  108. </body>
  109. </html>