1
0

mappingGroupLine_add.jsp 7.7 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193
  1. <%@ include file="../common/header.jsp" %>
  2. <script type="text/javascript" language="javascript">
  3. <!--
  4. function doAddMappinggroup(){
  5. var x = window.confirm("Add Mapping Group?")
  6. if (x) {
  7. document.forms.mappingGroup.action.value="add_mapping_group_ok";
  8. document.forms.mappingGroup.post.value = "true";
  9. document.forms.mappingGroup.submit();
  10. }
  11. }
  12. function doBack(){
  13. document.forms.mappingGroup.action.value="newCreate";
  14. document.forms.mappingGroup.clear.value="true";
  15. document.forms.mappingGroup.submit();
  16. }
  17. function doAddMappingGroupLine(){
  18. alert('doAddMappingGroupLine');
  19. document.forms.mappingGroup.addMappingGroupLineBtn.disabled=true;
  20. document.forms.mappingGroup.action.value="add_mappingGroupLine";
  21. document.forms.mappingGroup.submit();
  22. }
  23. function doEditMappingGroupLine(sequence){
  24. document.forms.mappingGroup.action.value="edit_mappingGroupLine";
  25. document.forms.mappingGroup.itemFocus.value="id";
  26. document.forms.mappingGroup.sequence.value=sequence;
  27. document.forms.mappingGroup.submit();
  28. }
  29. function doDeleteMappingGroupLine(sequence){
  30. var x = window.confirm("<bean:message key="confirm.delete"/>");
  31. if(x){
  32. document.forms.mappingGroup.action.value="delete_mappingGroupLine";
  33. //document.forms.mappingGroup.itemFocus.value="name";
  34. document.forms.mappingGroup.sequence.value=sequence;
  35. document.forms.mappingGroup.submit();
  36. }
  37. }
  38. -->
  39. </script>
  40. <!-- CONTENT -->
  41. <FORM name="mappingGroup" method="post" action="mapping.do">
  42. <input type="hidden" name="action">
  43. <input type="hidden" name="post">
  44. <input type="hidden" name="clear">
  45. <logic:notEmpty name="idx"><input type="hidden" name="idx" value="<bean:write name="idx"/>"></logic:notEmpty>
  46. <input type="hidden" name="ts" value="<logic:notEmpty name="ts"><bean:write name="ts" /></logic:notEmpty>">
  47. <input type="hidden" name="redirect" value="createNewMappingGroup">
  48. <input type="hidden" name="sequence">
  49. <!--td width="80%" valign="top"-->
  50. <table width="100%" border="0" align="center" cellpadding="2" cellspacing="4">
  51. <td class="titleHeader" align="left"><bean:message key="project.mappingGroup.key"/> CREATE</td>
  52. </table>
  53. <table width="100%" border="0" align="center" cellpadding="2" cellspacing="4">
  54. <tr>
  55. <td align="center">
  56. <table width="100%" border="0" cellspacing="1" cellpadding="2">
  57. <tr><td><html:errors/></td></tr>
  58. <tr>
  59. <td width="25%"><b><bean:message key="mappingGroup.source.key"/></b></td>
  60. <td width="1%">:</td>
  61. <td width="74%" colspan="2">
  62. <html:textarea cols="40" rows="5" name="mappingGroups_${ts}" property="source"/>
  63. </td>
  64. </tr>
  65. <tr>
  66. <td width="25%"><b><bean:message key="mappingGroup.target.key"/></b></td>
  67. <td width="1%">:</td>
  68. <td width="74%" colspan="2">
  69. <html:textarea cols="40" rows="5" name="mappingGroups_${ts}" property="target"/>
  70. </td>
  71. </tr>
  72. <tr>
  73. <td width="25%"><b><bean:message key="mappingGroup.includeMappingId.key"/> - <bean:message key="mappingGroup.includeId.key"/></b></td>
  74. <td width="1%">:</td>
  75. <td width="74%" colspan="2">
  76. <select name="includeId">
  77. <option value="">-- Pilih Salah Satu --</option>
  78. <logic:notEmpty name="mappingGroupIdList">
  79. <logic:iterate id="mappingGroupElement" name="mappingGroupIdList">
  80. <option value="<bean:write name="mappingGroupElement" property="id.mappingGroupId"/>,<bean:write name="mappingGroupElement" property="id.mappingId"/>"
  81. <logic:notEmpty name="mappingGroupElement" property="id.mappingGroupId">
  82. <logic:equal name="mappingGroupElement" property="id" value="${mappingGroupElement.id.mappingGroupId}">
  83. </logic:equal>
  84. </logic:notEmpty>
  85. >
  86. <bean:write name="mappingGroupElement" property="id.mappingId"/> - <bean:write name="mappingGroupElement" property="id.mappingGroupId"/></option>
  87. </logic:iterate>
  88. </logic:notEmpty>
  89. </select>
  90. </td>
  91. </tr>
  92. <tr>
  93. <td width="25%"></td>
  94. <td width="1%"></td>
  95. <td width="74%" colspan="2"><input type="button" value="<bean:message key="button.back"/>" onclick="javascript:doBack();"/>
  96. &nbsp;<input type="button" value="Add Mapping Group" onclick="javascript:doAddMappinggroup();"/></td>
  97. </tr>
  98. </table>
  99. </td>
  100. </tr>
  101. <tr>
  102. <td>&nbsp;</td>
  103. </tr>
  104. <tr>
  105. <td><b><bean:message key="project.mappinggroupLine.key"/></b></td>
  106. </tr>
  107. <!-- LIST ADD CHARGES ITEM -->
  108. <tr>
  109. <td>
  110. <table width="100%" border="0" cellspacing="1" cellpadding="1">
  111. <tr>
  112. <td class="titleField" height="22"><bean:message key="mappingGroupLine.no.key"/></td>
  113. <%/*<td class="titleField"><bean:message key="mappingGroupLine.mappingId.key"/></td>*/%>
  114. <%/*<td class="titleField"><bean:message key="mappingGroupLine.mappingGroupId.key"/></td>*/%>
  115. <td class="titleField"><bean:message key="mappingGroupLine.name.key"/></td>
  116. <td class="titleField"><bean:message key="mappingGroupLine.text.key"/></td>
  117. <td class="titleField">&nbsp;</td>
  118. </tr>
  119. <!-- START MAPPING GROUP LINE -->
  120. <logic:notEmpty name="mappingGroups_${ts}" property="mappingGroupLines">
  121. <% int index = 0; %>
  122. <logic:iterate id="element_mappingGroupLines" name="mappingGroups_${ts}" property="mappingGroupLines">
  123. <tr bgcolor="<%= index%2 == 0 ? "FFFFFF" : "EDEDE8" %>" >
  124. <td align="center"><%=++seq%>&nbsp;</td>
  125. <%/*<td align="left"><bean:write name="element_mappingGroupLines" property="id.mappingId"/></td>*/%>
  126. <%/*<td align="left"><bean:write name="element_mappingGroupLines" property="id.mappingGroupId"/></td>*/%>
  127. <td align="left"><bean:write name="element_mappingGroupLines" property="id.name"/></td>
  128. <td align="left"><bean:write name="element_mappingGroupLines" property="text"/></td>
  129. <td align="center">
  130. <a href="#" ><img src="./images/edit.gif" border="0" onclick="javascript:doEditMappingGroupLine(<%=index%>);" alt="edit"></a>
  131. <a href="#" ><img src="./images/trash.gif" border="0" onclick="javascript:doDeleteMappingGroupLine(<%=index%>);" alt="remove"></a>
  132. </td>
  133. </tr>
  134. <% index++; %>
  135. </logic:iterate>
  136. </logic:notEmpty>
  137. </table>
  138. </td>
  139. </tr>
  140. <!-- END MAPPING GROUP LINE -->
  141. <!-- ADD ANAK -->
  142. <tr>
  143. <td>
  144. <table width="100%" border="0" cellspacing="1" cellpadding="2">
  145. <tr>
  146. <td width="25%" align="left" valign="top"><b><bean:message key="mappingGroupLine.name.key"/>&nbsp;<font color="#FF0000">*</font></b></td>
  147. <td width="1%" align="left" valign="top">:</td>
  148. <td width="74%" align="left" valign="top">
  149. <input type="text" name="name" value="<logic:notEmpty name="mappingGroupLines_${ts}" property="id"><bean:write name="mappingGroupLines_${ts}" property="id.name"/></logic:notEmpty>">
  150. </td>
  151. </tr>
  152. <tr>
  153. <td width="25%" align="left" valign="top"><b><bean:message key="mappingGroupLine.text.key"/>&nbsp;<font color="#FF0000">*</font></b></td>
  154. <td width="1%" align="left" valign="top">:</td>
  155. <td width="74%" align="left" valign="top">
  156. <html:textarea cols="40" rows="5" name="mappingGroupLines_${ts}" property="text"/>
  157. </td>
  158. </tr>
  159. <tr>
  160. <td width="25%" align="left" valign="top">&nbsp;</td>
  161. <td width="1%" align="left" valign="top">&nbsp;</td>
  162. <td width="74%" align="left" valign="top">
  163. &nbsp;<input type="button" name="addMappingGroupLineBtn" value="<bean:message key="button.add"/>" onclick="javascript:doAddMappingGroupLine();">
  164. </td>
  165. </tr>
  166. </table>
  167. </td>
  168. </tr>
  169. <!-- END ANAK -->
  170. </table>
  171. </td>
  172. </form>
  173. <!-- END CONTENT -->
  174. <%@ include file="../common/footer.jsp"%>