orgLeagueForm.jsp 5.5 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129
  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. <%@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="navId.id"/>
  53. <table class="table table-bordered">
  54. <tbody>
  55. <tr>
  56. <td class="width-15 active"><label class="pull-right"><font color="red">*</font>标题:</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. <form:select path="typeId" class="form-control required">
  65. <form:option value="" label=""/>
  66. <form:option value="4" label="联盟风采"/>
  67. <form:option value="5" label="资源清单"/>
  68. <form:option value="6" label="需求清单"/>
  69. <form:option value="7" label="项目清单"/>
  70. <form:option value="8" label="责任清单"/>
  71. </form:select>
  72. </td>
  73. <td class="width-15 active" rowspan="3"><label class="pull-right">图片:</label></td>
  74. <td class="width-35" rowspan="3">
  75. <c:choose>
  76. <c:when test="${appBaseNews.cover =='' ||appBaseNews.cover ==undefined}">
  77. </c:when>
  78. <c:otherwise>
  79. <img alt="image" src="${appBaseNews.cover}" height="150" width="250"/>
  80. </c:otherwise>
  81. </c:choose>
  82. <sys:fileUpload path="cover" value="${appBaseNews.cover}" uploadPath="/app/base/appBaseNews"
  83. type="image" fileNumLimit="1" fileSizeLimit="2048" />
  84. </td>
  85. </tr>
  86. <tr>
  87. <td class="width-15 active"><label class="pull-right"><font color="red">*</font>所属组织:</label></td>
  88. <td class="width-35">
  89. <c:choose>
  90. <c:when test="${admin}">
  91. <sys:treeselect id="dept" name="dept.id" value="${appBaseNews.dept.id}" labelName="dept.name" labelValue="${appBaseNews.dept.name}"
  92. title="所属党支部" url="/leader/org/leaderOrgNo/treeData" extId="${appBaseNews.id}" cssClass="form-control required" allowClear="true"/>
  93. </c:when>
  94. <c:otherwise>
  95. <input id="deptId" name="dept.id" type="hidden" value="${appBaseNews.dept.id}"/>
  96. <input id="dept" name="dept.name" class="form-control required" value="${appBaseNews.dept.name}" readonly>
  97. </c:otherwise>
  98. </c:choose>
  99. </td>
  100. </tr>
  101. <tr>
  102. <td class="width-15 active"><label class="pull-right"><font color="red">*</font>首页显示:</label></td>
  103. <td class="width-35">
  104. <form:radiobuttons path="display" items="${fns:getDictList('yes_no')}" itemLabel="label" itemValue="value" htmlEscape="false" class="i-checks required"/>
  105. </td>
  106. </tr>
  107. <tr>
  108. <td class="width-15 active"><label class="pull-right">内容:</label></td>
  109. <td class="width-35" colspan="3">
  110. <input type="hidden" name="content" value=" ${appBaseNews.content}"/>
  111. <div id="content">
  112. ${fns:unescapeHtml(appBaseNews.content)}
  113. </div>
  114. </td>
  115. </tr>
  116. <tr>
  117. </tr>
  118. </tbody>
  119. </table>
  120. </form:form>
  121. </body>
  122. </html>