1
0

parser_edit.jsp 7.9 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223
  1. <%@ include file="../common/header.jsp"%>
  2. <script type="text/javascript" language="javascript">
  3. <!--
  4. function doEditSearch(){
  5. document.forms.parser.action.value="edit_search";
  6. document.forms.parser.submit();
  7. doDisable(document.forms.parser, "button");
  8. }
  9. function doAddParserCodex(){
  10. document.forms.parser.addParserCodexBtn.disabled=true;
  11. document.forms.parser.action.value="add_parserCodex";
  12. document.forms.parser.submit();
  13. }
  14. function doEditParserCodex(sequence){
  15. document.forms.parser.action.value="edit_parserCodex";
  16. document.forms.parser.sequence.value=sequence;
  17. document.forms.parser.submit();
  18. }
  19. function doDeleteParserCodex(sequence){
  20. var x = window.confirm("<bean:message key="confirm.delete"/>");
  21. if(x){
  22. document.forms.parser.action.value="delete_parserCodex";
  23. document.forms.parser.sequence.value=sequence;
  24. document.forms.parser.submit();
  25. }
  26. }
  27. function doUpdateParser(){
  28. var x = window.confirm("<bean:message key="confirm.edit"/>");
  29. if(x){
  30. document.forms.parser.action.value = "edit_ok";
  31. document.forms.parser.post.value = "true";
  32. document.forms.parser.submit();
  33. }
  34. }
  35. function doBack(){
  36. document.forms.parser.action.value="detail";
  37. document.forms.parser.submit();
  38. doDisable(document.forms.parser, "button");
  39. }
  40. -->
  41. </script>
  42. <!-- CONTENT -->
  43. <form name="parser" method="post" action="parser.do">
  44. <input type="hidden" name="action" value ="">
  45. <input type="hidden" name="clear" value ="">
  46. <html:hidden name="parser_${ts}" property="id"/>
  47. <input type="hidden" name="post">
  48. <input type="hidden" name="sequence">
  49. <logic:notEmpty name="idx"><input type="hidden" name="idx" value="<bean:write name="idx"/>"></logic:notEmpty>
  50. <input type="hidden" name="ts" value="<logic:notEmpty name="ts"><bean:write name="ts" /></logic:notEmpty>">
  51. <input type="hidden" name="redirect" value="edit">
  52. <!--td width="80%" valign="top"-->
  53. <table width="100%" border="0" align="center" cellpadding="2" cellspacing="4">
  54. <tr>
  55. <td class="titleHeader"><bean:message key="project.parser.key"/> - EDIT</td>
  56. </tr>
  57. </table>
  58. <table width="100%" border="0" align="center" cellpadding="2" cellspacing="4">
  59. <tr><td colspan="7"><html:errors/></td></tr>
  60. <tr>
  61. <logic:empty name="parser_${ts}" property="id">
  62. <td align="center">
  63. <table width="100%" border="0" cellspacing="1" cellpadding="2">
  64. <tr>
  65. <td width="15%"><b><bean:message key="parser.id.key"/> <font color="#FF0000">*</font></b></td>
  66. <td width="1%">:</td>
  67. <td width="84%" colspan="4" align="left">
  68. <input type="text" name="idSearch" value="">
  69. </td>
  70. </tr>
  71. <tr>
  72. <td width="15%"></td>
  73. <td width="10"></td>
  74. <td width="84%" colspan="4" align="left">
  75. <BR>
  76. <input type="button" value="<bean:message key="button.edit"/>" onclick="javascript:doEditSearch();">
  77. </td>
  78. </tr>
  79. </table>
  80. </td>
  81. </logic:empty>
  82. <logic:notEmpty name="parser_${ts}" property="id">
  83. <td align="center">
  84. <table width="100%" border="0" cellspacing="1" cellpadding="2">
  85. <tr>
  86. <td width="15%"><b><bean:message key="parser.id.key"/> <font color="#FF0000">*</font></b></td>
  87. <td width="1%">:</td>
  88. <td width="84%" colspan="4" align="left">
  89. <bean:write name="parser_${ts}" property="id"/>
  90. </td>
  91. </tr>
  92. <%/*<tr>
  93. <td width="15%"><b><bean:message key="parser.type.key"/></b></td>
  94. <td width="1%">:</td>
  95. <td width="84%" colspan="4" align="left">
  96. <html:text name="parser_${ts}" property="type"/>
  97. </td>
  98. </tr>*/%>
  99. <tr>
  100. <td width="15%"></td>
  101. <td width="1%"></td>
  102. <td width="84%" colspan="4" align="left">
  103. <input type="button" value="<bean:message key="button.back"/>" onclick="javascript:doBack();"/>&nbsp;
  104. <input type="button" value="<bean:message key="button.submit"/>" onclick="doUpdateParser();"/>
  105. </td>
  106. </tr>
  107. <tr>
  108. <td>&nbsp;</td>
  109. <td>&nbsp;</td>
  110. <td>&nbsp;</td>
  111. <td>&nbsp;</td>
  112. <td>&nbsp;</td>
  113. <td>&nbsp;</td>
  114. <td>&nbsp;</td>
  115. </tr>
  116. <tr>
  117. <td>&nbsp;</td>
  118. </tr>
  119. <tr>
  120. <td class="titleHeader" align="left"><b><bean:message key="project.parserCodex.key"/></b></td>
  121. </tr>
  122. <!-- LIST ADD ADAPTOR CODEX -->
  123. <tr>
  124. <td colspan="7">
  125. <table width="100%" border="0" cellspacing="1" cellpadding="1">
  126. <tr>
  127. <td class="titleField" height="22" width="5%" align="center"><bean:message key="parserCodex.no.key"/></td>
  128. <td nowrap="nowrap" class="titleField" width="30%"><bean:message key="parserCodex.id.key"/></td>
  129. <td class="titleField" width="55%"><bean:message key="parserCodex.codex.key"/></td>
  130. <td class="titleField" width="10%">&nbsp;</td>
  131. </tr>
  132. <!-- START ADAPTOR CODEX -->
  133. <logic:notEmpty name="parser_${ts}" property="parserCodexes">
  134. <% int index = 0; %>
  135. <logic:iterate id="element_parserCodexes" name="parser_${ts}" property="parserCodexes">
  136. <tr bgcolor="<%= index%2 == 0 ? "FFFFFF" : "EDEDE8" %>" >
  137. <td align="center"><%=++seq2%>&nbsp;</td>
  138. <td align="left">&nbsp;<bean:write name="element_parserCodexes" property="id.id"/></td>
  139. <td align="left">&nbsp;<bean:write name="element_parserCodexes" property="codexId.id"/></td>
  140. <td align="center">
  141. <a href="#" ><img src="./images/edit.gif" border="0" onclick="javascript:doEditParserCodex(<%=index%>);" alt="edit"></a>
  142. <a href="#" ><img src="./images/trash.gif" border="0" onclick="javascript:doDeleteParserCodex(<%=index%>);" alt="remove"></a>
  143. </td>
  144. </tr>
  145. <% index++; %>
  146. </logic:iterate>
  147. </logic:notEmpty>
  148. </table>
  149. </td>
  150. </tr>
  151. <!-- END LIST ADD ADAPTOR CODEX -->
  152. <!-- ADD ANAK ADAPTOR CODEX-->
  153. <tr>
  154. <td colspan="7">
  155. <table width="100%" border="0" cellspacing="1" cellpadding="2">
  156. <tr>
  157. <td width="20%" align="left" valign="top"><b><bean:message key="parserCodex.id.key"/></b> <font color="#FF0000">*</font></td>
  158. <td width="1%" align="left" valign="top">:</td>
  159. <td width="29%" align="left" valign="top">
  160. <input type="text" name="idParserCodexes" value="<logic:notEmpty name="parserCodexes_${ts}" property="id"><bean:write name="parserCodexes_${ts}" property="id.id"/></logic:notEmpty>">
  161. </td>
  162. </tr>
  163. <tr>
  164. <td width="20%" align="left" valign="top"><b><bean:message key="parserCodex.codex.key"/></b> <font color="#FF0000">*</font></td>
  165. <td width="1%" align="left" valign="top">:</td>
  166. <td width="29%" align="left" valign="top">
  167. <select name="codex">
  168. <option value="">-- Pilih Salah Satu --</option>
  169. <logic:notEmpty name="codexList">
  170. <logic:iterate id="codexElement" name="codexList">
  171. <option value="<bean:write name="codexElement" property="id"/>"
  172. <logic:notEmpty name="parserCodexes_${ts}" property="codexId">
  173. <logic:equal name="parserCodexes_${ts}" property="codexId.id" value="${codexElement.id}">
  174. SELECTED
  175. </logic:equal>
  176. </logic:notEmpty>
  177. >
  178. <bean:write name="codexElement" property="id"/></option>
  179. </logic:iterate>
  180. </logic:notEmpty>
  181. </select>
  182. </td>
  183. </tr>
  184. <tr>
  185. <td align="left" valign="top">&nbsp;</td>
  186. <td align="left" valign="top">&nbsp;</td>
  187. <td align="left" valign="top">
  188. <BR><input type="button" name="addParserCodexBtn" value="<bean:message key="button.add"/>" onclick="javascript:doAddParserCodex();">
  189. </td>
  190. </tr>
  191. <tr>
  192. <td>&nbsp;</td>
  193. <td>&nbsp;</td>
  194. <td>&nbsp;</td>
  195. <td>&nbsp;</td>
  196. <td>&nbsp;</td>
  197. <td>&nbsp;</td>
  198. </tr>
  199. </table>
  200. </td>
  201. </tr>
  202. <!-- END ANAK ADAPTOR CODEX-->
  203. </table>
  204. </td>
  205. </logic:notEmpty>
  206. </tr>
  207. </table>
  208. </form>
  209. <!-- END CONTENT -->
  210. <%@ include file="../common/footer.jsp"%>