testPicForm.jsp 2.0 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061
  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. });
  10. function save() {
  11. var isValidate = jp.validateForm('#inputForm');//校验表单
  12. if(!isValidate){
  13. return false;
  14. }else{
  15. jp.loading();
  16. jp.post("${ctx}/test/pic/testPic/save",$('#inputForm').serialize(),function(data){
  17. if(data.success){
  18. jp.getParent().refresh();
  19. var dialogIndex = parent.layer.getFrameIndex(window.name); // 获取窗口索引
  20. parent.layer.close(dialogIndex);
  21. jp.success(data.msg)
  22. }else{
  23. jp.error(data.msg);
  24. }
  25. })
  26. }
  27. }
  28. </script>
  29. </head>
  30. <body class="bg-white">
  31. <form:form id="inputForm" modelAttribute="testPic" class="form-horizontal">
  32. <form:hidden path="id"/>
  33. <table class="table table-bordered">
  34. <tbody>
  35. <tr>
  36. <td class="width-15 active"><label class="pull-right">标题:</label></td>
  37. <td class="width-35">
  38. <form:input path="title" htmlEscape="false" class="form-control "/>
  39. </td>
  40. <td class="width-15 active"><label class="pull-right"><font color="red">*</font>图片路径:</label></td>
  41. <td class="width-35">
  42. <sys:fileUpload path="pic" value="${testPic.pic}" type="file" uploadPath="/test/pic/testPic"/>
  43. </td>
  44. </tr>
  45. <tr>
  46. <td class="width-15 active"><label class="pull-right">备注信息:</label></td>
  47. <td class="width-35">
  48. <form:textarea path="remarks" htmlEscape="false" rows="4" class="form-control "/>
  49. </td>
  50. <td class="width-15 active"></td>
  51. <td class="width-35" ></td>
  52. </tr>
  53. </tbody>
  54. </table>
  55. </form:form>
  56. </body>
  57. </html>