eduColumnForm.jsp 3.5 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100
  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. <script type="text/javascript">
  8. $(document).ready(function() {
  9. <c:if test="${eduColumn.oprType !=null && eduColumn.oprType!=''}">
  10. $(".table.table-bordered").find("input,textarea,select").attr("disabled", "disabled");
  11. </c:if>
  12. <c:if test="${eduColumn.isOuterChain ==1}">
  13. shi();
  14. </c:if>
  15. <c:if test="${eduColumn.isOuterChain ==2}">
  16. fou();
  17. </c:if>
  18. });
  19. function save() {
  20. var isValidate = jp.validateForm('#inputForm');//校验表单
  21. if(!isValidate){
  22. return false;
  23. }else{
  24. jp.loading();
  25. jp.post("${ctx}/base/eduColumn/save",$('#inputForm').serialize(),function(data){
  26. if(data.success){
  27. jp.getParent().refresh();
  28. var dialogIndex = parent.layer.getFrameIndex(window.name); // 获取窗口索引
  29. parent.layer.close(dialogIndex);
  30. jp.success(data.msg)
  31. }else{
  32. jp.error(data.msg);
  33. }
  34. })
  35. }
  36. }
  37. function shi(){
  38. $('#ljdz').show();
  39. $('#wl').show();
  40. }
  41. function fou(){
  42. $('#ljdz').hide();
  43. $('#wl').hide();
  44. }
  45. </script>
  46. </head>
  47. <body class="bg-white">
  48. <form:form id="inputForm" modelAttribute="eduColumn" class="form-horizontal">
  49. <form:hidden path="id"/>
  50. <table class="table table-bordered">
  51. <tbody>
  52. <tr>
  53. <td class="width-15 active"><label class="pull-right"><font color="red">*</font>专题标题:</label></td>
  54. <td class="width-35">
  55. <form:input path="title" htmlEscape="false" maxlength="100" class="form-control required"/>
  56. </td>
  57. </tr>
  58. <tr>
  59. <td class="width-15 active"><label class="pull-right"><font color="red">*</font>封面地址:</label></td>
  60. <td class="width-35" style="text-align: center;">
  61. <c:choose>
  62. <c:when test="${eduColumn.oprType ==null || eduColumn.oprType == ''}">
  63. <sys:fileUpload path="cover" fileNumLimit="1" allowedExtensions="jpeg,jpg,png,bmp" value="${eduColumn.cover}" uploadPath="/base/eduColumn" type="images" required="required"/>
  64. </c:when>
  65. <c:otherwise>
  66. <img alt="image" src="${eduColumn.cover}" width="360" height="110">
  67. </c:otherwise>
  68. </c:choose>
  69. </td>
  70. </tr>
  71. <tr>
  72. <td class="width-15 active"><label class="pull-right">排序:</label></td>
  73. <td class="width-35">
  74. <form:input path="seq" htmlEscape="false" maxlength="10" class="form-control "/>
  75. </td>
  76. </tr>
  77. <tr>
  78. <td class="width-15 active"><label class="pull-right"><font color="red">*</font>是否为外链:</label></td>
  79. <td class="width-35">
  80. <form:radiobutton path="isOuterChain" onchange="shi()" value="1" label="是" checked="checked"/>
  81. <form:radiobutton path="isOuterChain" onchange="fou()" value="2" label="否"/>
  82. </td>
  83. </tr>
  84. <tr id="ljdz">
  85. <td class="width-15 active"><label class="pull-right">链接地址:</label></td>
  86. <td class="width-35">
  87. <form:input path="url" htmlEscape="false" class="form-control url"/>
  88. </td>
  89. </tr>
  90. </tbody>
  91. </table>
  92. </form:form>
  93. </body>
  94. </html>