billerCategory_edit.jsp 5.7 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154
  1. <%@ include file="../common/header.jsp"%>
  2. <script type="text/javascript" language="javascript">
  3. <!--
  4. function doBack(){
  5. document.forms.billerCategory.action.value="edit";
  6. document.forms.billerCategory.clear.value="true";
  7. document.forms.billerCategory.submit();
  8. doDisable(document.forms.billerCategory, "button");
  9. }
  10. function doEditSearch(){
  11. document.forms.billerCategory.action.value="edit_search";
  12. document.forms.billerCategory.clear.value="true";
  13. document.forms.billerCategory.submit();
  14. doDisable(document.forms.billerCategory, "button");
  15. }
  16. function doEditOk(){
  17. var x = window.confirm("<bean:message key="confirm.edit" />");
  18. if(x){
  19. document.forms.billerCategory.action.value="edit_ok";
  20. document.forms.billerCategory.clear.value="true";
  21. document.forms.billerCategory.submit();
  22. doDisable(document.forms.billerCategory, "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.billerCategory.code.value=code;
  29. document.forms.billerCategory.status.value=status;
  30. document.forms.billerCategory.action.value="update_status";
  31. document.forms.billerCategory.submit();
  32. doDisable(document.forms.billerCategory, "button");
  33. }
  34. }
  35. function doActive(code,status){
  36. var x = window.confirm("Are you sure to inactivate this record?");
  37. if(x){
  38. document.forms.billerCategory.code.value=code;
  39. document.forms.billerCategory.status.value=status;
  40. document.forms.billerCategory.action.value="update_status";
  41. document.forms.billerCategory.submit();
  42. doDisable(document.forms.billerCategory, "button");
  43. }
  44. }
  45. -->
  46. </script>
  47. <!-- CONTENT -->
  48. <form name="billerCategory" method="post" action="billerCategory.do">
  49. <input type="hidden" name="action" value =""/>
  50. <input type="hidden" name="clear" value =""/>
  51. <input type="hidden" name="status">
  52. <html:hidden name="billerCategory" property="code"/>
  53. <table width="100%" border="0" align="center" cellpadding="2" cellspacing="4">
  54. <tr>
  55. <td class="titleHeader"><bean:message key="project.billerCategory.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="billerCategory" property="code">
  63. <table width="100%" border="0" cellspacing="1" cellpadding="2">
  64. <tr align = "left">
  65. <td width="15%"><b><bean:message key="billerCategory.category.key" /></b></td>
  66. <td width="1%">:</td>
  67. <td width="34%" valign="top">
  68. <select name="billerCode" style="width:300">
  69. <option value="">-- Select Biller Category --</option>
  70. <logic:notEmpty name="billerCategoryList">
  71. <logic:iterate id="element_billerCategory" name="billerCategoryList" >
  72. <option value="<bean:write name="element_billerCategory" property="code" />"
  73. <logic:notEmpty name="billerCategory" property="code">
  74. <logic:equal name="billerCategory" property="code" value="${element_billerCategory.code}">
  75. selected
  76. </logic:equal>
  77. </logic:notEmpty>
  78. ><bean:write name="element_billerCategory" property="name" /></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="billerCategory" property="code">
  91. <table width="100%" border="0" cellspacing="1" cellpadding="2">
  92. <tr>
  93. <td width="15%"><b><bean:message key="billerCategory.code.key"/> <font color="#FF0000">*</font></b></td>
  94. <td width="1%">:</td>
  95. <td width="34%">
  96. &nbsp;<bean:write name="billerCategory" 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="billerCategory.name.key"/> <font color="#FF0000">*</font></b></td>
  105. <td width="1%">:</td>
  106. <td width="34%">
  107. <html:text name="billerCategory" property="name" 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. </table>
  115. </logic:notEmpty>
  116. <table width="100%" border="0" cellspacing="1" cellpadding="2">
  117. <tr>
  118. <td width="15%" valign="top"></td>
  119. <td width="1%" valign="top"></td>
  120. <td width="84%" valign="top">
  121. <logic:empty name="billerCategory" property="code">
  122. <input type="button" value="<bean:message key="button.edit" />" onclick="javascript:doEditSearch();">
  123. </logic:empty>
  124. <logic:notEmpty name="billerCategory" property="code">
  125. <input type="button" value="<bean:message key="button.cancel" />" onclick="javascript:doBack();">
  126. &nbsp;&nbsp;
  127. <input type="button" value="<bean:message key="button.submit" />" onclick="javascript:doEditOk();">
  128. &nbsp;&nbsp;
  129. <logic:equal name="billerCategory_status" value="ACTIVE">
  130. <input type="button" value=<bean:message key="button.inactive"/> onclick="doInactive('<str:replace replace="&#39;" with="\&#39;"><bean:write name="billerCategory" property="code"/></str:replace>','INACTIVE');">
  131. </logic:equal>
  132. <logic:equal name="billerCategory_status" value="INACTIVE">
  133. <input type="button" value=<bean:message key="button.active"/> onclick="doActive('<str:replace replace="&#39;" with="\&#39;"><bean:write name="billerCategory" property="code"/></str:replace>','ACTIVE');">
  134. </logic:equal>
  135. </logic:notEmpty>
  136. </td>
  137. <td colspan="4">&nbsp;</td>
  138. </tr>
  139. </table>
  140. </td>
  141. </tr>
  142. </table>
  143. </form>
  144. <!-- END CONTENT -->
  145. <%@ include file="../common/footer.jsp"%>