sysCodeTemplateEdit.jsp 4.0 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120
  1. <%--
  2. time:2012-12-19 15:38:01
  3. desc:edit the 自定义表代码模版
  4. --%>
  5. <%@page language="java" pageEncoding="UTF-8"%>
  6. <%@include file="/commons/include/html_doctype.html"%>
  7. <html>
  8. <head>
  9. <title>编辑 自定义表代码模版</title>
  10. <%@include file="/commons/include/form.jsp"%>
  11. <script type="text/javascript" src="${ctx}/js/hotent/CustomValid.js"></script>
  12. <script type="text/javascript">
  13. $(function() {
  14. var options = {};
  15. if (showResponse) {
  16. options.success = showResponse;
  17. }
  18. var frm = $('#sysCodeTemplateForm').form();
  19. $("a.save").click(function() {
  20. frm.ajaxForm(options);
  21. if (frm.valid()) {
  22. $('#sysCodeTemplateForm').submit();
  23. }
  24. });
  25. });
  26. function showResponse(responseText) {
  27. var obj = new com.hotent.form.ResultMessage(responseText);
  28. if (obj.isSuccess()) {
  29. $.ligerDialog.confirm(obj.getMessage() + ",是否继续操作","提示信息",
  30. function(rtn) {
  31. if (rtn) {
  32. this.close();
  33. $("#sysCodeTemplateForm").resetForm();
  34. } else {
  35. window.location.href = "${ctx}/platform/system/sysCodeTemplate/list.ht";
  36. }
  37. });
  38. } else {
  39. $.ligerDialog.err("提示信息","自定义表代码模版保存失败!",obj.getMessage());
  40. }
  41. }
  42. </script>
  43. </head>
  44. <body>
  45. <div class="panel">
  46. <div class="panel-top">
  47. <div class="tbar-title">
  48. <c:choose>
  49. <c:when test="${sysCodeTemplate.id !=null}">
  50. <span class="tbar-label">编辑自定义表代码模版</span>
  51. </c:when>
  52. <c:otherwise>
  53. <span class="tbar-label">添加自定义表代码模版</span>
  54. </c:otherwise>
  55. </c:choose>
  56. </div>
  57. <div class="panel-toolbar">
  58. <div class="toolBar">
  59. <div class="group">
  60. <a class="link save" id="dataFormSave" href="javascript:;"><span></span>保存</a>
  61. </div>
  62. <div class="l-bar-separator"></div>
  63. <div class="group">
  64. <a class="link back" href="list.ht"><span></span>返回</a>
  65. </div>
  66. </div>
  67. </div>
  68. </div>
  69. <div class="panel-body">
  70. <form id="sysCodeTemplateForm" method="post" action="save.ht">
  71. <table class="table-detail" cellpadding="0" cellspacing="0"
  72. border="0" type="main">
  73. <tr>
  74. <th width="20%">模版名称:</th>
  75. <td><input type="text" id="templateName" name="templateName" value="${sysCodeTemplate.templateName}" class="inputText" validate="{required:true,maxlength:200}" /></td>
  76. </tr>
  77. <tr>
  78. <th width="20%">别名:</th>
  79. <td><input type="text" id="templateAlias" name="templateAlias" value="${sysCodeTemplate.templateAlias}" class="inputText" validate="{required:true,maxlength:200}" /></td>
  80. </tr>
  81. <tr>
  82. <th width="20%">从表也生成:</th>
  83. <td>
  84. <input type="radio" name="isSub" value="0" <c:if test="${sysCodeTemplate.isSub eq 0 or empty sysCodeTemplate.isSub}"> checked='checked' </c:if>>否
  85. &nbsp;&nbsp;
  86. <input type="radio" name="isSub" value="1" <c:if test="${sysCodeTemplate.isSub eq 1 }"> checked='checked' </c:if>>是
  87. </td>
  88. </tr>
  89. <tr>
  90. <th width="20%">备注:</th>
  91. <td><input type="text" id="memo" name="memo" value="${sysCodeTemplate.memo}" class="inputText" validate="{required:false,maxlength:200}" /></td>
  92. </tr>
  93. <tr>
  94. <th width="20%">模版生成的文件路径:</th>
  95. <td><input type="text" id="fileDir" name="fileDir" value="${sysCodeTemplate.fileDir}" class="inputText" validate="{required:true,maxlength:200}" style="width: 350px;" /></td>
  96. </tr>
  97. <tr>
  98. <th width="20%">模版生成的文件名称:</th>
  99. <td><input type="text" id="fileName" name="fileName" value="${sysCodeTemplate.fileName}" class="inputText" validate="{required:true,maxlength:200}" style="width: 250px;" /></td>
  100. </tr>
  101. <tr>
  102. <th width="20%">模版HTML:</th>
  103. <td><textarea name="html" cols="120" rows="20">${fn:escapeXml(sysCodeTemplate.html)}</textarea>
  104. </td>
  105. </tr>
  106. </table>
  107. <input type="hidden" name="id" value="${sysCodeTemplate.id}" />
  108. </form>
  109. </div>
  110. </div>
  111. </body>
  112. </html>