1
0

rpgCall_edit.jsp 8.8 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248
  1. <%@ include file="../common/header.jsp"%>
  2. <script type="text/javascript" language="javascript">
  3. <!--
  4. function doEditSearch(){
  5. document.forms.rpgCall.action.value="edit_search";
  6. document.forms.rpgCall.submit();
  7. doDisable(document.forms.rpgCall, "button");
  8. }
  9. function doUpdateRpgCall(){
  10. var x = window.confirm("<bean:message key="confirm.edit"/>");
  11. if(x){
  12. document.forms.rpgCall.action.value = "edit_ok";
  13. document.forms.rpgCall.post.value = "true";
  14. document.forms.rpgCall.submit();
  15. }
  16. }
  17. function doBack(){
  18. document.forms.rpgCall.action.value="detail";
  19. document.forms.rpgCall.submit();
  20. doDisable(document.forms.rpgCall, "button");
  21. }
  22. function doAddRpgCallArg(){
  23. document.forms.rpgCall.addRpgCallArgBtn.disabled=true;
  24. document.forms.rpgCall.action.value="add_rpgCallArg";
  25. document.forms.rpgCall.itemFocus.value="name";
  26. document.forms.rpgCall.submit();
  27. }
  28. function doEditRpgCallArg(sequence){
  29. document.forms.rpgCall.action.value="edit_rpgCallArg";
  30. document.forms.rpgCall.itemFocus.value="name";
  31. document.forms.rpgCall.sequence.value=sequence;
  32. document.forms.rpgCall.submit();
  33. }
  34. function doDeleterpgCallArg(sequence){
  35. var x = window.confirm("<bean:message key="confirm.delete"/>");
  36. if(x){
  37. document.forms.rpgCall.action.value="delete_rpgCallArg";
  38. document.forms.rpgCall.itemFocus.value="name";
  39. document.forms.rpgCall.sequence.value=sequence;
  40. document.forms.rpgCall.submit();
  41. }
  42. }
  43. function doActivateRpgCallsItems(sequence) {
  44. var form = document.forms.rpgCall;
  45. var x = window.confirm("<bean:message key="confirm.activate" />");
  46. if (x) {
  47. form.action.value="activate_RpgCallsItems";
  48. form.sequence.value=sequence;
  49. form.submit();
  50. doDisable(form, "button");
  51. doDisableImage(form);
  52. }
  53. }
  54. function doInactivateRpgCallsItems(sequence) {
  55. var form = document.forms.rpgCall;
  56. var x = window.confirm("<bean:message key="confirm.inactivate" />");
  57. if (x) {
  58. form.action.value="inactivate_RpgCallsItems";
  59. form.sequence.value=sequence;
  60. form.submit();
  61. doDisable(form, "button");
  62. doDisableImage(form);
  63. }
  64. }
  65. -->
  66. </script>
  67. <!-- CONTENT -->
  68. <form name="rpgCall" method="post" action="rpgCall.do">
  69. <input type="hidden" name="action">
  70. <input type="hidden" name="itemFocus">
  71. <html:hidden name="rpgCall_${ts}" property="id"/>
  72. <input type="hidden" name="sequence">
  73. <logic:notEmpty name="idx"><input type="hidden" name="idx" value="<bean:write name="idx"/>"></logic:notEmpty>
  74. <input type="hidden" name="ts" value="<bean:write name="ts"/>">
  75. <input type="hidden" name="post">
  76. <input type="hidden" name="redirect" value="edit">
  77. <!--td width="80%" valign="top"-->
  78. <table width="100%" border="0" align="center" cellpadding="2" cellspacing="4">
  79. <tr>
  80. <td class="titlePage"><bean:message key="project.rpgCall.key"/> - EDIT</td>
  81. </tr>
  82. </table>
  83. <table width="100%" border="0" align="center" cellpadding="2" cellspacing="4">
  84. <tr><td colspan="7"><html:errors/></td></tr>
  85. <tr>
  86. <logic:empty name="rpgCall_${ts}" property="id">
  87. <td align="center">
  88. <table width="100%" border="0" cellspacing="1" cellpadding="2">
  89. <tr>
  90. <td width="15%"><b><bean:message key="rpgCall.id.key"/> <font color="#FF0000">*</font></b></td>
  91. <td width="1%">:</td>
  92. <td width="84%" colspan="4" align="left">
  93. <input type="text" name="idSearch" value="">
  94. </td>
  95. </tr>
  96. <tr>
  97. <td width="15%"></td>
  98. <td width="10"></td>
  99. <td width="84%" colspan="4" align="left">
  100. <br>
  101. <input type="button" value="<bean:message key="button.edit"/>" onclick="javascript:doEditSearch();">
  102. </td>
  103. </tr>
  104. </table>
  105. </td>
  106. </logic:empty>
  107. <logic:notEmpty name="rpgCall_${ts}" property="id">
  108. <td align="center">
  109. <table width="100%" border="0" cellspacing="1" cellpadding="2">
  110. <tr>
  111. <td width="15%"><b><bean:message key="rpgCall.id.key"/> <font color="#FF0000">*</font></b></td>
  112. <td width="10">:</td>
  113. <td width="30%">
  114. <bean:write name="rpgCall_${ts}" property="id" />
  115. </td>
  116. <td width="5%">&nbsp;</td>
  117. <td width="15%">&nbsp;</td>
  118. <td width="10">&nbsp;</td>
  119. <td width="30%">&nbsp;</td>
  120. </tr>
  121. <tr>
  122. <td width="15%"><b><bean:message key="rpgCall.cmd.key"/> <font color="#FF0000">*</font></b></td>
  123. <td width="10">:</td>
  124. <td width="30%">
  125. <html:textarea cols="40" rows="5" name="rpgCall_${ts}" property="cmd"/>
  126. </td>
  127. <td width="5%">&nbsp;</td>
  128. <td width="15%">&nbsp;</td>
  129. <td width="10">&nbsp;</td>
  130. <td width="30%">&nbsp;</td>
  131. </tr>
  132. <tr>
  133. <td width="15%"><b><bean:message key="rpgCall.host.key"/></b></td>
  134. <td width="10">:</td>
  135. <td width="30%">
  136. <select name="host">
  137. <option value="emptyVal">-- Pilih Salah Satu --</option>
  138. <logic:notEmpty name="hostList">
  139. <logic:iterate id="hostElement" name="hostList">
  140. <option value="<bean:write name="hostElement" property="id"/>"
  141. <logic:notEmpty name="rpgCall_${ts}" property="host">
  142. <logic:equal name="rpgCall_${ts}" property="host.id" value="${hostElement.id}">
  143. SELECTED
  144. </logic:equal>
  145. </logic:notEmpty>
  146. >
  147. <bean:write name="hostElement" property="id"/></option>
  148. </logic:iterate>
  149. </logic:notEmpty>
  150. </select>
  151. </td>
  152. <td width="5%">&nbsp;</td>
  153. <td width="15%">&nbsp;</td>
  154. <td width="10">&nbsp;</td>
  155. <td width="30%">&nbsp;</td>
  156. </tr>
  157. <tr>
  158. <td width="15%"><b><bean:message key="rpgCall.timeout.key"/></b></td>
  159. <td width="10">:</td>
  160. <td width="30%">
  161. <html:text name="rpgCall_${ts}" property="timeout" />
  162. </td>
  163. <td width="5%">&nbsp;</td>
  164. <td width="15%">&nbsp;</td>
  165. <td width="10">&nbsp;</td>
  166. <td width="30%">&nbsp;</td>
  167. </tr>
  168. <!--UNTUK BUTTON EDIT-->
  169. <tr>
  170. <td width="15%"></td>
  171. <td width="10"></td>
  172. <td width="30%">
  173. <input type="button" value="<bean:message key="button.back"/>" onclick="javascript:doBack();"/>&nbsp;<input type="button" value="<bean:message key="button.submit"/>" onclick="doUpdateRpgCall();">
  174. </td>
  175. <td colspan="4">&nbsp;</td>
  176. </tr>
  177. <tr>
  178. <td>&nbsp;</td>
  179. <td>&nbsp;</td>
  180. <td>&nbsp;</td>
  181. <td>&nbsp;</td>
  182. <td>&nbsp;</td>
  183. <td>&nbsp;</td>
  184. <td>&nbsp;</td>
  185. </tr>
  186. </table>
  187. <!--Untuk ANAK AKHIR-->
  188. <br>
  189. <table border="0" width="98%" align="center" cellpadding="2" cellspacing="1">
  190. <tr ><td colspan="10" align="center" class="titleField"><bean:message key="project.rpgCallArg.key" /></td></tr>
  191. <tr class="titlefield">
  192. <td align="left" class="titleField"><bean:message key="rpgCallArg.name.key"/> <font color="#FF0000">*</font></td>
  193. <td align="left" class="titleField"><bean:message key="rpgCallArg.type.key"/> <font color="#FF0000">*</font></td>
  194. <td align="left" class="titleField"><bean:message key="rpgCallArg.length.key"/></td>
  195. <td class="titleField">&nbsp;</td>
  196. </tr>
  197. <logic:notEmpty name="rpgCall_${ts}" property="rpgCallArgs">
  198. <% int index = 0; %>
  199. <logic:iterate id="element_rpgCallArgs" name="rpgCall_${ts}" property="rpgCallArgs">
  200. <tr bgcolor="<%= index%2 == 0 ? "FFFFFF" : "EDEDE8" %>" >
  201. <td align="left"><bean:write name="element_rpgCallArgs" property="name"/></td>
  202. <td align="left"><bean:write name="element_rpgCallArgs" property="type" /></td>
  203. <td align="left"><bean:write name="element_rpgCallArgs" property="length" /></td>
  204. <td align="center">
  205. <a href="#" ><img src="./images/edit.gif" border="0" onclick="javascript:doEditRpgCallArg(<%=index%>);" alt="edit"></a>
  206. <a href="#" ><img src="./images/trash.gif" border="0" onclick="javascript:doDeleterpgCallArg(<%=index%>);" alt="remove"></a>
  207. </td>
  208. </tr>
  209. <% index++; %>
  210. </logic:iterate>
  211. </logic:notEmpty>
  212. <tr>
  213. <td><input type="text" maxlength="50" name="name" value="<bean:write name="rpgCallArgs_${ts}" property="name"/>"></td>
  214. <td><input type="text" size ="25" maxlength="100" name="type" value="<bean:write name="rpgCallArgs_${ts}" property="type"/>"></td>
  215. <td><input type="text" maxlength="25" name="length" value="<bean:write name="rpgCallArgs_${ts}" property="length"/>"></td>
  216. <td align=center>
  217. <input type="button" size="5" name="addRpgCallArgBtn" value="<bean:message key="button.add" />" onclick="javascript:doAddRpgCallArg();"></td>
  218. </tr>
  219. </table>
  220. <!--Untuk ANAK AKHIR-->
  221. </td>
  222. </logic:notEmpty>
  223. </tr>
  224. </table>
  225. </form>
  226. <!-- END CONTENT -->
  227. <%@ include file="../common/footer.jsp"%>