nhBillerConfig_edit.jsp 12 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319
  1. <%@ include file="../common/header.jsp"%>
  2. <script type="text/javascript" src="./js/autocomplete/jquery.js"></script>
  3. <script type='text/javascript' src='./js/autocomplete/jquery.bgiframe.min.js'></script>
  4. <script type='text/javascript' src='./js/autocomplete/jquery.ajaxQueue.js'></script>
  5. <script type='text/javascript' src='./js/autocomplete/thickbox-compressed.js'></script>
  6. <script type='text/javascript' src='./js/autocomplete/jquery.autocomplete.js'></script>
  7. <script type='text/javascript' src='./js/autocomplete/localdata.js'></script>
  8. <script type="text/javascript" language="javascript">
  9. <!--
  10. $(function() {
  11. function format(jsonmap) {
  12. return jsonmap.name+' - '+jsonmap.value;
  13. }
  14. $("#idNhBilCon").autocomplete('nhBillerConfig.do?action=loadBillerCodeAndName', {
  15. dataType: "json",
  16. parse: function(data) {
  17. return $.map(data, function(row) {
  18. return {
  19. data: row,
  20. value: row.name,
  21. result: row.name
  22. }
  23. });
  24. },
  25. formatItem: function(jsonmap) {
  26. return format(jsonmap);
  27. }
  28. }).result(function(e, jsonmap) {
  29. //after select
  30. $("#idNhBilCon").val(format(jsonmap));
  31. $("#idNameBiller").val(jsonmap.value);
  32. });
  33. });
  34. function doActive(id,status){
  35. var x = window.confirm(" Are you sure activate this record?")
  36. if (x) {
  37. document.forms.nhBillerConfig.id.value=id;
  38. document.forms.nhBillerConfig.status.value=status;
  39. document.forms.nhBillerConfig.action.value="update_status";
  40. document.forms.nhBillerConfig.submit();
  41. }
  42. }
  43. function doInactive(id,status){
  44. var x = window.confirm(" Are you sure inactivate this record?")
  45. if (x) {
  46. document.forms.nhBillerConfig.id.value=id;
  47. document.forms.nhBillerConfig.status.value=status;
  48. document.forms.nhBillerConfig.action.value="update_status";
  49. document.forms.nhBillerConfig.submit();
  50. }
  51. }
  52. function doActiveStart(id,status){
  53. var x = window.confirm(" Are you sure activate this record?")
  54. if (x) {
  55. document.forms.nhBillerConfig.id.value=id;
  56. document.forms.nhBillerConfig.status.value=status;
  57. document.forms.nhBillerConfig.action.value="update_status";
  58. document.forms.nhBillerConfig.submit();
  59. }
  60. }
  61. function doBack(){
  62. document.forms.nhBillerConfig.action.value="edit";
  63. document.forms.nhBillerConfig.clear.value="true";
  64. document.forms.nhBillerConfig.submit();
  65. doDisable(document.forms.billerCategory, "button");
  66. }
  67. function doEditSearch(){
  68. document.forms.nhBillerConfig.action.value="edit_search";
  69. document.forms.nhBillerConfig.clear.value="true";
  70. document.forms.nhBillerConfig.submit();
  71. doDisable(document.forms.billerCategory, "button");
  72. }
  73. function doEditOk(){
  74. var x = window.confirm("<bean:message key="confirm.edit" />");
  75. if(x){
  76. document.forms.nhBillerConfig.action.value="edit_ok";
  77. document.forms.nhBillerConfig.clear.value="true";
  78. document.forms.nhBillerConfig.submit();
  79. doDisable(document.forms.nhBillerConfig, "button");
  80. }
  81. }
  82. -->
  83. </script>
  84. <!-- CONTENT -->
  85. <form name="nhBillerConfig" method="post" action="nhBillerConfig.do">
  86. <input type="hidden" name="action" value =""/>
  87. <input type="hidden" name="clear" value =""/>
  88. <input type="hidden" name="status" value="<logic:notEmpty name="nhBillerConfig" property="status"><bean:write name="nhBillerConfig" property="status" /></logic:notEmpty>">
  89. <input type="hidden" name="id" value="<logic:notEmpty name="nhBillerConfig" property="id"><bean:write name="nhBillerConfig" property="id" /></logic:notEmpty>">
  90. <input type="hidden" name="nameBillerConfig" value="<bean:write name="nhBillerConfig" property="name"/>">
  91. <table width="100%" border="0" align="center" cellpadding="2" cellspacing="4">
  92. <tr>
  93. <td class="titleHeader"><bean:message key="project.nhBillerConfig.key"/> - EDIT</td>
  94. </tr>
  95. <tr><td colspan="7"><html:errors/></td></tr>
  96. </table>
  97. <table width="100%" border="0" align="center" cellpadding="2" cellspacing="4">
  98. <tr>
  99. <td align="center">
  100. <logic:empty name="nhBillerConfig" property="id">
  101. <table width="100%" border="0" cellspacing="1" cellpadding="2">
  102. <tr align = "left">
  103. <td width="20%"><b><bean:message key="nhBillerConfig.biller.key"/></b></td>
  104. <td width="1%">:</td>
  105. <td width="79%" valign="top" colspan="4">
  106. <table>
  107. <tr>
  108. <td><input type="text" id="idNhBilCon" size="50" name="idNhBillerConfig"></TD>
  109. <td></td>
  110. </tr>
  111. </table>
  112. </td>
  113. </tr>
  114. </table>
  115. </logic:empty>
  116. <logic:notEmpty name="nhBillerConfig" property="id">
  117. <table width="100%" border="0" cellspacing="1" cellpadding="2">
  118. <tr align = "left">
  119. <td width="20%"><b><bean:message key="nhBillerConfig.biller.key"/></b></td>
  120. <td width="1%">:</td>
  121. <td width="79%" align="left" colspan="4">
  122. <bean:write name="nhBillerConfig" property="id"/> - <bean:write name="nhBillerConfig" property="name"/>
  123. </td>
  124. <td colspan="4">&nbsp;</td>
  125. </tr>
  126. <%/*<tr align = "left">
  127. <td width="20%"><b><bean:message key="nhBillerConfig.name.key"/></b></td>
  128. <td width>:</td>
  129. <td valign="top">
  130. <bean:write name="nhBillerConfig" property="name"/>
  131. <input type="hidden" name="nameBillerConfig" value="<bean:write name="nhBillerConfig" property="name"/>">
  132. </td>
  133. <td colspan="4"></td>
  134. </tr>*/%>
  135. <tr align = "left">
  136. <td width="20%"><b><bean:message key="nhBillerConfig.datasourceProvider.key"/></b></td>
  137. <td width="1%">:</td>
  138. <td width="79%" align="left" colspan="4">
  139. <html:text name="nhBillerConfig" property="datasourceProvider"/>
  140. </td>
  141. </tr>
  142. <tr align = "left">
  143. <td width="20%"><b><bean:message key="nhBillerConfig.databaseHost.key"/></b></td>
  144. <td width="1%">:</td>
  145. <td width="79%" align="left" colspan="4">
  146. <html:text name="nhBillerConfig" property="databaseHost"/>
  147. </td>
  148. </tr>
  149. <tr align = "left">
  150. <td width="20%"><b><bean:message key="nhBillerConfig.databasePort.key"/></b></td>
  151. <td width="1%">:</td>
  152. <td width="79%" align="left" colspan="4">
  153. <html:text name="nhBillerConfig" property="databasePort"/>
  154. </td>
  155. </tr>
  156. <tr align = "left">
  157. <td width="20%"><b><bean:message key="nhBillerConfig.databaseName.key"/></b></td>
  158. <td width="1%">:</td>
  159. <td width="79%" valign="left" colspan="4">
  160. <html:text name="nhBillerConfig" property="databaseName"/>
  161. </td>
  162. </tr>
  163. <tr align = "left">
  164. <td width="20%"><b><bean:message key="nhBillerConfig.defaultSchema.key"/></b></td>
  165. <td width="1%">:</td>
  166. <td width="79%" align="left" colspan="4">
  167. <html:text name="nhBillerConfig" property="defaultSchema"/>
  168. </td>
  169. </tr>
  170. <tr align = "left">
  171. <td width="20%"><b><bean:message key="nhBillerConfig.databaseUser.key"/></b></td>
  172. <td width="1%">:</td>
  173. <td width="79%" align="left" colspan="4">
  174. <html:text name="nhBillerConfig" property="databaseUser"/>
  175. </td>
  176. </tr>
  177. <tr align = "left">
  178. <td width="20%"><b><bean:message key="nhBillerConfig.databasePassword.key"/></b></td>
  179. <td width="1%">:</td>
  180. <td width="79%" align="left" colspan="4">
  181. <input type="password" name="databasePassword" value="*****">
  182. <%/*<html:password name="nhBillerConfig" property="databasePassword"/>*/%>
  183. </td>
  184. </tr>
  185. <tr align = "left">
  186. <td width="20%"><b><bean:message key="nhBillerConfig.dbms.key"/></b></td>
  187. <td width="1%">:</td>
  188. <td width="79%" align="left" colspan="4">
  189. <SELECT name="dbms">
  190. <option value="">Pilih Salah Satu</option>
  191. <option value="DB2"
  192. <logic:equal name="nhBillerConfig" property="dbms" value="DB2">
  193. SELECTED
  194. </logic:equal>
  195. >DB2</option>
  196. <option value="SQLServer"
  197. <logic:equal name="nhBillerConfig" property="dbms" value="SQLServer">
  198. SELECTED
  199. </logic:equal>
  200. >Microsoft SQL Server</option>
  201. <option value="MySQL"
  202. <logic:equal name="nhBillerConfig" property="dbms" value="MySQL">
  203. SELECTED
  204. </logic:equal>
  205. >MySQL</option>
  206. </SELECT>
  207. </td>
  208. <td colspan="4">&nbsp;</td>
  209. </tr>
  210. <tr align = "left">
  211. <td width="20%"><b><bean:message key="nhBillerConfig.as400file.key"/></b></td>
  212. <td width="1%">:</td>
  213. <td width="79%" align="left" colspan="4">
  214. <html:text name="nhBillerConfig" property="AS400FILE"/>
  215. </td>
  216. </tr>
  217. <tr align = "left">
  218. <td width="20%"><b><bean:message key="nhBillerConfig.synchronizeType.key"/></b></td>
  219. <td width="1%">:</td>
  220. <td width="79%" align="left" colspan="4">
  221. <SELECT name="synchronizeType">
  222. <option value=""> Pilih Salah Satu </option>
  223. <option value="1"
  224. <logic:equal name="nhBillerConfig" property="synchronizeType" value="1">
  225. SELECTED
  226. </logic:equal>
  227. >Tagihan - Pembayaran </option>
  228. <option value="2"
  229. <logic:equal name="nhBillerConfig" property="synchronizeType" value="2">
  230. SELECTED
  231. </logic:equal>
  232. >Tagihan</option>
  233. <option value="3"
  234. <logic:equal name="nhBillerConfig" property="synchronizeType" value="3">
  235. SELECTED
  236. </logic:equal>
  237. >Pembayaran</option>
  238. </SELECT>
  239. </td>
  240. </tr>
  241. <%/*<tr align = "left">
  242. <td width="20%"><b><bean:message key="nhBillerConfig.billerType.key"/></b></td>
  243. <td width>:</td>
  244. <td valign="top">
  245. <SELECT name="billerType">
  246. <option value=""> Pilih Salah Satu </option>
  247. <option value="UNIVERSITAS"
  248. <logic:equal name="nhBillerConfig" property="billerType" value="UNIVERSITAS">
  249. SELECTED
  250. </logic:equal>
  251. >UNIVERSITAS</option>
  252. <option value="NON_UNIVERSITAS"
  253. <logic:equal name="nhBillerConfig" property="billerType" value="NON_UNIVERSITAS">
  254. SELECTED
  255. </logic:equal>
  256. >NON_UNIVERSITAS</option>
  257. </SELECT>
  258. </td>
  259. <td colspan="4">&nbsp;</td>
  260. </tr>*/%>
  261. <tr align = "left">
  262. <td width="20%"><b><bean:message key="nhBillerConfig.maxTagihan.key"/></b></td>
  263. <td width="1%">:</td>
  264. <td width="79%" align="left" colspan="4">
  265. <html:text name="nhBillerConfig" property="maxTagihan"/>
  266. </td>
  267. </tr>
  268. <tr align = "left">
  269. <td width="20%"><b><bean:message key="nhBillerConfig.status.key"/></b></td>
  270. <td width="1%">:</td>
  271. <td width="79%" align="left" colspan="4">
  272. <bean:write name="nhBillerConfig" property="status"/>
  273. </td>
  274. </tr>
  275. </table>
  276. </logic:notEmpty>
  277. <table width="100%" border="0" cellspacing="1" cellpadding="2">
  278. <tr>
  279. <td width="20%" valign="top"></td>
  280. <td width="1%" valign="top"></td>
  281. <td width="79%" valign="top" colspan="4">
  282. <logic:empty name="nhBillerConfig" property="id">
  283. <input type="button" value="<bean:message key="button.edit" />" onclick="javascript:doEditSearch();">
  284. </logic:empty>
  285. <logic:notEmpty name="nhBillerConfig" property="id">
  286. &nbsp;&nbsp;
  287. <input type="button" value="<bean:message key="button.back" />" onclick="javascript:doBack();">
  288. &nbsp;&nbsp;
  289. <input type="button" value="<bean:message key="button.submit"/>" onclick="javascript:doEditOk();">
  290. &nbsp;&nbsp;
  291. <logic:equal name="nhBillerConfig" property="status" value="ACTIVE">
  292. <input type="button" value="<bean:message key="button.inactive"/>" onclick="doInactive('<bean:write name="nhBillerConfig" property="id"/>','INACTIVE');">
  293. </logic:equal>
  294. <logic:equal name="nhBillerConfig" property="status" value="NEW">
  295. <input type="button" value="<bean:message key="button.active"/>" onclick="doActiveStart('<bean:write name="nhBillerConfig" property="id"/>','ACTIVE');">
  296. </logic:equal>
  297. <logic:equal name="nhBillerConfig" property="status" value="INACTIVE">
  298. <input type="button" value="<bean:message key="button.active"/>" onclick="doActive('<bean:write name="nhBillerConfig" property="id"/>','ACTIVE');">
  299. </logic:equal>
  300. </logic:notEmpty>
  301. </td>
  302. </tr>
  303. </table>
  304. </td>
  305. </tr>
  306. </table>
  307. </form>
  308. <!-- END CONTENT -->
  309. <%@ include file="../common/footer.jsp"%>