1
0

biller_group_edit.jsp 5.9 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172
  1. <%@ include file="../common/header.jsp" %>
  2. <script type="text/javascript" language="javascript">
  3. <!--
  4. function loadPageInit() {
  5. doGenerateBillerGroup();
  6. }
  7. function doGenerateBillerGroup() {
  8. var form = document.forms.billerGroup;
  9. var biller = form.biller.value;
  10. loadOneValueAJAX("billerGroup.do?action=generateBillerGroupTree&biller=" +biller+ "&ts=" +new Date().getTime(), "billerGroup_div");
  11. }
  12. function doEdit(billerGroupCode){
  13. var form = document.forms.billerGroup;
  14. form.action.value = "edit";
  15. form.billerGroupCode.value = billerGroupCode;
  16. form.submit();
  17. doDisable(form, "button");
  18. doDisableImage(form);
  19. }
  20. function doActivate(billerGroupCode){
  21. var form = document.forms.billerGroup;
  22. var x = window.confirm("<bean:message key="confirm.activate"/>");
  23. if (x) {
  24. form.action.value = "activate";
  25. form.billerGroupCode.value = billerGroupCode;
  26. form.submit();
  27. doDisable(form, "button");
  28. doDisableImage(form);
  29. }
  30. }
  31. function doInactivate(billerGroupCode){
  32. var form = document.forms.billerGroup;
  33. var x = window.confirm("<bean:message key="confirm.inactivate"/>");
  34. if (x) {
  35. form.action.value = "inactivate";
  36. form.billerGroupCode.value = billerGroupCode;
  37. form.submit();
  38. doDisable(form, "button");
  39. doDisableImage(form);
  40. }
  41. }
  42. function doEditOk(){
  43. var message = "";
  44. var focus = false;
  45. var form = document.forms.billerGroup;
  46. if (trim(form.code.value).length == 0) {
  47. message = message + ("<bean:message key="error.billerGroup.code"/>\n");
  48. if (!focus) form.code.focus(); focus = true;
  49. }
  50. if (trim(form.name.value).length == 0) {
  51. message = message + ("<bean:message key="error.billerGroup.name"/>\n");
  52. if (!focus) form.name.focus(); focus = true;
  53. }
  54. if (message == "" ) {
  55. var x = window.confirm("<bean:message key="confirm.edit"/>");
  56. if (x) {
  57. document.forms.billerGroup.action.value="edit_ok";
  58. document.forms.billerGroup.submit();
  59. doDisable(form, "button");
  60. doDisableImage(form);
  61. }
  62. } else {
  63. alert(message);
  64. }
  65. }
  66. -->
  67. </script>
  68. <form name="billerGroup" action="billerGroup.do" method="POST">
  69. <input type="hidden" name="action">
  70. <input type="hidden" name="biller" value="<logic:notEmpty name="biller"><bean:write name="biller" property="code" /></logic:notEmpty>">
  71. <input type="hidden" name="billerGroupId" value="<logic:notEmpty name="billerGroup"><bean:write name="billerGroup" property="id" /></logic:notEmpty>">
  72. <input type="hidden" name="billerGroupCode">
  73. <input type="hidden" name="redirect" value="edit">
  74. <table width="100%" border="0" cellspacing="1" cellpadding="2">
  75. <tr>
  76. <td class="titleHeader" align="left"><bean:message key="project.billerGroup.maintanance.key" /> - EDIT</td>
  77. </tr>
  78. </table>
  79. <table width="100%" border="0" cellspacing="1" cellpadding="2">
  80. <tr><td><html:errors /></td></tr>
  81. </table>
  82. <table width="98%" border="0" align="center" class="td" cellpadding="2" cellspacing="1">
  83. <tr>
  84. <td width="20%" valign="top"><bean:message key="billerGroup.biller.key" /></td>
  85. <td width="2%" valign="top">:</td>
  86. <td width="78%" valign="top">
  87. <logic:notEmpty name="biller">
  88. <bean:write name="biller" property="name" />&nbsp;-&nbsp;<bean:write name="biller" property="code" />
  89. </logic:notEmpty>
  90. </td>
  91. </tr>
  92. <tr>
  93. <td width="20%" valign="top"><bean:message key="billerGroup.billerCategory.key" /></td>
  94. <td width="2%" valign="top">:</td>
  95. <td width="78%" valign="top">
  96. <logic:notEmpty name="biller">
  97. <bean:write name="biller" property="billerCategory.name" />
  98. </logic:notEmpty>
  99. </td>
  100. </tr>
  101. <tr>
  102. <td width="20%" valign="top"><bean:message key="billerGroup.billerGroup.key" /></td>
  103. <td width="2%" valign="top">:</td>
  104. <td width="78%" valign="top">
  105. <div id="billerGroup_div" align="left"></div>
  106. </td>
  107. </tr>
  108. <tr>
  109. <td width="20%" valign="top">&nbsp;</td>
  110. <td width="2%" valign="top">&nbsp;</td>
  111. <td width="78%" valign="top">&nbsp;</td>
  112. </tr>
  113. <tr>
  114. <td width="20%" valign="top">&nbsp;</td>
  115. <td width="2%" valign="top">&nbsp;</td>
  116. <td width="78%" valign="top">
  117. <table width="100%" border="0" align="center" cellpadding="2" cellspacing="1" bgcolor="#CCCCCC">
  118. <tr bgcolor="#FFFFFF">
  119. <td valign="top"><b><bean:message key="billerGroup.parent.key" /></b></td>
  120. <td valign="top"><b><bean:message key="billerGroup.code.key" /></b></td>
  121. <td valign="top"><b><bean:message key="billerGroup.name.key" /></b></td>
  122. <td valign="top">&nbsp;</td>
  123. </tr>
  124. <tr bgcolor="#FFFFFF">
  125. <td valign="top">
  126. <select name="parent" style="width:200">
  127. <option value="">-- Select Parent --</option>
  128. <logic:notEmpty name="parentList">
  129. <logic:iterate id="element_parent" name="parentList" >
  130. <option value="<bean:write name="element_parent" property="id" />"
  131. <logic:notEmpty name="billerGroup">
  132. <logic:notEmpty name="billerGroup" property="parent">
  133. <logic:equal name="billerGroup" property="parent.id" value="${element_parent.id}">
  134. selected
  135. </logic:equal>
  136. </logic:notEmpty>
  137. </logic:notEmpty>
  138. ><bean:write name="element_parent" property="name" /></option>
  139. </logic:iterate>
  140. </logic:notEmpty>
  141. </select>
  142. </td>
  143. <td valign="top">
  144. <input type="text" name="code" value="<logic:notEmpty name="billerGroup"><bean:write name="billerGroup" property="code" /></logic:notEmpty>">
  145. </td>
  146. <td valign="top">
  147. <input type="text" name="name" value="<logic:notEmpty name="billerGroup"><bean:write name="billerGroup" property="name" /></logic:notEmpty>">
  148. </td>
  149. <td valign="top"><input type="button" value=<bean:message key="button.add"/> onclick="doEditOk();" ></td>
  150. </tr>
  151. </table>
  152. </td>
  153. </tr>
  154. </table>
  155. </form>
  156. <script type="text/javascript" language="javascript">loadPageInit();</script>
  157. <logic:notEmpty name="focus"><bean:write name="focus" filter="false" /></logic:notEmpty>
  158. <%@ include file="../common/footer.jsp" %>