1
0

report_edit.jsp 8.4 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235
  1. <%@ include file="../common/header.jsp" %>
  2. <script type="text/javascript" language="javascript">
  3. <!--
  4. function doBack(){
  5. document.forms.report.action.value="list";
  6. document.forms.report.clear.value="true";
  7. document.forms.report.submit();
  8. doDisable(document.forms.report, "button");
  9. }
  10. function doEditSearch(){
  11. document.forms.report.action.value="edit_search";
  12. document.forms.report.clear.value="true";
  13. document.forms.report.submit();
  14. doDisable(document.forms.report, "button");
  15. }
  16. function doEditOk(){
  17. var x = window.confirm("<bean:message key="confirm.edit" />");
  18. if(x){
  19. document.forms.report.action.value="edit_ok";
  20. document.forms.report.clear.value="true";
  21. document.forms.report.submit();
  22. doDisable(document.forms.report, "button");
  23. }
  24. }
  25. function doInactive(code,status){
  26. var x = window.confirm("Are you sure to Inactivate this record?");
  27. if(x){
  28. document.forms.report.code.value=code;
  29. document.forms.report.status.value=status;
  30. document.forms.report.action.value="update_status";
  31. document.forms.report.submit();
  32. doDisable(document.forms.report, "button");
  33. }
  34. }
  35. function doActive(code,status){
  36. var x = window.confirm("Are you sure to Activate this record?");
  37. if(x){
  38. document.forms.report.code.value=code;
  39. document.forms.report.status.value=status;
  40. document.forms.report.action.value="update_status";
  41. document.forms.report.submit();
  42. doDisable(document.forms.report, "button");
  43. }
  44. }
  45. -->
  46. </script>
  47. <!-- CONTENT -->
  48. <form name="report" method="post" action="report.do" enctype="multipart/form-data">
  49. <input type="hidden" name="action" value =""/>
  50. <input type="hidden" name="clear" value =""/>
  51. <input type="hidden" name="status">
  52. <html:hidden name="report" property="code"/>
  53. <table width="100%" border="0" align="center" cellpadding="2" cellspacing="4">
  54. <tr>
  55. <td class="titleHeader"><bean:message key="project.report.key"/> - EDIT</td>
  56. </tr>
  57. <tr><td colspan="3"><html:errors/></td></tr>
  58. </table>
  59. <table width="100%" border="0" align="center" cellpadding="2" cellspacing="4">
  60. <tr>
  61. <td align="center">
  62. <logic:empty name="report" property="code">
  63. <table width="100%" border="0" cellspacing="1" cellpadding="2">
  64. <tr align = "left">
  65. <td width="15%"><b><bean:message key="report.report.key" /></b></td>
  66. <td width="1%">:</td>
  67. <td width="30%" valign="top">
  68. <select name="reportCode" style="width:300">
  69. <option value="">-- Select Report --</option>
  70. <logic:notEmpty name="reportList">
  71. <logic:iterate id="element_report" name="reportList" >
  72. <option value="<bean:write name="element_report" property="code" />"
  73. <logic:notEmpty name="report" property="code">
  74. <logic:equal name="report" property="code" value="${element_report.code}">
  75. selected
  76. </logic:equal>
  77. </logic:notEmpty>
  78. ><bean:write name="element_report" property="report" /></option>
  79. </logic:iterate>
  80. </logic:notEmpty>
  81. </select>
  82. </td>
  83. <td width="5%">&nbsp;</td>
  84. <td width="15%">&nbsp;</td>
  85. <td width="10">&nbsp;</td>
  86. <td width="30%">&nbsp;</td>
  87. </tr>
  88. </table>
  89. </logic:empty>
  90. <logic:notEmpty name="report" property="code">
  91. <table width="100%" border="0" cellspacing="1" cellpadding="2">
  92. <tr>
  93. <td width="15%"><b><bean:message key="report.code.key"/> <font color="#FF0000">*</font></b></td>
  94. <td width="1%">:</td>
  95. <td width="34%">
  96. <bean:write name="report" property="code"/>
  97. </td>
  98. <td width="5%">&nbsp;</td>
  99. <td width="15%">&nbsp;</td>
  100. <td width="10">&nbsp;</td>
  101. <td width="30%">&nbsp;</td>
  102. </tr>
  103. <tr>
  104. <td width="15%"><b><bean:message key="report.name.key"/> <font color="#FF0000">*</font></b></td>
  105. <td width="1%">:</td>
  106. <td width="34%">
  107. <html:text name="report" property="report" maxlength="50"/>
  108. </td>
  109. <td width="5%">&nbsp;</td>
  110. <td width="15%">&nbsp;</td>
  111. <td width="10">&nbsp;</td>
  112. <td width="30%">&nbsp;</td>
  113. </tr>
  114. <tr>
  115. <td width="15%"><b><bean:message key="report.jrxml.key"/> <font color="#FF0000">*</font></b></td>
  116. <td width="1%">:</td>
  117. <td width="34%">
  118. <input type="file" name="uploadFile" value="<logic:notEmpty name="uploadFile_report"><bean:write name="uploadFile_report" /></logic:notEmpty>">
  119. </td>
  120. <td width="5%">&nbsp;</td>
  121. <td width="15%">&nbsp;</td>
  122. <td width="10">&nbsp;</td>
  123. <td width="30%">&nbsp;</td>
  124. </tr>
  125. <tr>
  126. <td width="15%"><b><bean:message key="report.filter.key"/> <font color="#FF0000">*</font></b></td>
  127. <td width="1%">:</td>
  128. <td width="34%" valign="top">
  129. <select name="filter" style="width:300">
  130. <option value="">-- Select Filter --</option>
  131. <logic:notEmpty name="filters">
  132. <logic:iterate id="element_filter" name="filters" >
  133. <option value="<bean:write name="element_filter" property="code"/>"
  134. <logic:notEmpty name="report" property="filter">
  135. <logic:equal name="report" property="filter.code" value="${element_filter.code}">
  136. selected
  137. </logic:equal>
  138. </logic:notEmpty>
  139. ><bean:write name="element_filter" property="name" /></option>
  140. </logic:iterate>
  141. </logic:notEmpty>
  142. </select>
  143. </td>
  144. <td width="5%">&nbsp;</td>
  145. <td width="15%">&nbsp;</td>
  146. <td width="10">&nbsp;</td>
  147. <td width="30%">&nbsp;</td>
  148. </tr>
  149. <tr align = "left">
  150. <td width="15%"><b><bean:message key="report.category.key" /></b></td>
  151. <td width="1%">:</td>
  152. <td width="34%" valign="top">
  153. <select name="billerCode" style="width:300">
  154. <option value="">-- Select Biller Category --</option>
  155. <logic:notEmpty name="billerCategoryList">
  156. <logic:iterate id="element_billerCategory" name="billerCategoryList" >
  157. <option value="<bean:write name="element_billerCategory" property="code" />"
  158. <logic:notEmpty name="report" property="billerCategory.code">
  159. <logic:equal name="report" property="billerCategory.code" value="${element_billerCategory.code}">
  160. selected
  161. </logic:equal>
  162. </logic:notEmpty>
  163. ><bean:write name="element_billerCategory" property="name" /></option>
  164. </logic:iterate>
  165. </logic:notEmpty>
  166. </select>
  167. </td>
  168. <td width="5%">&nbsp;</td>
  169. <td width="15%">&nbsp;</td>
  170. <td width="10">&nbsp;</td>
  171. <td width="30%">&nbsp;</td>
  172. </tr>
  173. <tr>
  174. <td width="15%"><b><bean:message key="report.filename.key"/></b></td>
  175. <td width="1%">:</td>
  176. <td width="34%">
  177. <bean:write name="report" property="filename" />
  178. </td>
  179. <td width="5%">&nbsp;</td>
  180. <td width="15%">&nbsp;</td>
  181. <td width="10">&nbsp;</td>
  182. <td width="30%">&nbsp;</td>
  183. </tr>
  184. <tr>
  185. <td width="15%"><b><bean:message key="report.status.key"/></b></td>
  186. <td width="1%">:</td>
  187. <td width="34%">
  188. <bean:write name="report" property="status" />
  189. </td>
  190. <td width="5%">&nbsp;</td>
  191. <td width="15%">&nbsp;</td>
  192. <td width="10">&nbsp;</td>
  193. <td width="30%">&nbsp;</td>
  194. </tr>
  195. </table>
  196. </logic:notEmpty>
  197. <table width="100%" border="0" cellspacing="1" cellpadding="2">
  198. <tr>
  199. <td width="15%" valign="top"></td>
  200. <td width="1%" valign="top"></td>
  201. <td width="84%" valign="top">
  202. <logic:empty name="report" property="code">
  203. <input type="button" value="<bean:message key="button.edit" />" onclick="javascript:doEditSearch();">
  204. </logic:empty>
  205. <logic:notEmpty name="report" property="code">
  206. <input type="button" value="<bean:message key="button.cancel" />" onclick="javascript:doBack();">
  207. &nbsp;&nbsp;
  208. <input type="button" value="<bean:message key="button.submit" />" onclick="javascript:doEditOk();">
  209. &nbsp;&nbsp;
  210. <logic:equal name="report_status" value="ACTIVE">
  211. <input type="button" value=<bean:message key="button.inactive"/> onclick="doInactive('<str:replace replace="&#39;" with="\&#39;"><bean:write name="report" property="code"/></str:replace>','INACTIVE');">
  212. </logic:equal>
  213. <logic:equal name="report_status" value="INACTIVE">
  214. <input type="button" value=<bean:message key="button.active"/> onclick="doActive('<str:replace replace="&#39;" with="\&#39;"><bean:write name="report" property="code"/></str:replace>','ACTIVE');">
  215. </logic:equal>
  216. </logic:notEmpty>
  217. </td>
  218. <td colspan="4">&nbsp;</td>
  219. </tr>
  220. </table>
  221. </td>
  222. </tr>
  223. </table>
  224. </form>
  225. <!-- END CONTENT -->
  226. <%@ include file="../common/footer.jsp"%>