epay_privilege_edit.jsp 7.2 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229
  1. <%@ include file="../common/header.jsp"%>
  2. <script type="text/javascript" language="javascript">
  3. <!--
  4. function doUpdatePrivilege(){
  5. var x = window.confirm("<bean:message key="confirm.edit"/>");
  6. if(x){
  7. document.forms.epayPrivilege.action.value = "edit_ok";
  8. document.forms.epayPrivilege.post.value = "true";
  9. document.forms.epayPrivilege.submit();
  10. }
  11. }
  12. function doBack(){
  13. document.forms.epayPrivilege.action.value="detail";
  14. document.forms.epayPrivilege.submit();
  15. doDisable(document.forms.epayPrivilege, "button");
  16. }
  17. function doEditSearch(){
  18. document.forms.epayPrivilege.action.value="edit_search";
  19. document.forms.epayPrivilege.submit();
  20. doDisable(document.forms.epayPrivilege, "button");
  21. }
  22. function doInactive(code,status){
  23. var x = window.confirm(" Are you sure inactivate this record?")
  24. if (x) {
  25. document.forms.epayPrivilege.code.value=code;
  26. document.forms.epayPrivilege.status.value=status;
  27. document.forms.epayPrivilege.action.value="update_status";
  28. document.forms.epayPrivilege.submit();
  29. }
  30. }
  31. function doActive(code,status){
  32. var x = window.confirm(" Are you sure activate this record?")
  33. if (x) {
  34. document.forms.epayPrivilege.code.value=code;
  35. document.forms.epayPrivilege.status.value=status;
  36. document.forms.epayPrivilege.action.value="update_status";
  37. document.forms.epayPrivilege.submit();
  38. }
  39. }
  40. -->
  41. </script>
  42. <!-- CONTENT -->
  43. <form name="epayPrivilege" method="post" action="epayPrivilege.do">
  44. <input type="hidden" name="action" value =""/>
  45. <input type="hidden" name="clear" value =""/>
  46. <html:hidden name="nhprivilege" property="code"/>
  47. <input type="hidden" name="post">
  48. <input type="hidden" name="status" value =""/>
  49. <!--td width="80%" valign="top"-->
  50. <table width="100%" border="0" align="center" cellpadding="2" cellspacing="4">
  51. <tr>
  52. <td class="titleHeader"><bean:message key="project.privilege.key"/> - EDIT</td>
  53. </tr>
  54. </table>
  55. <table width="100%" border="0" align="center" cellpadding="2" cellspacing="4">
  56. <tr><td><html:errors/></td></tr>
  57. <tr>
  58. <td align="center">
  59. <table width="100%" border="0" cellspacing="1" cellpadding="2">
  60. <logic:empty name="nhprivilege" property="code">
  61. <tr align = "left">
  62. <td width="15%"><b><bean:message key="privilege.id.key" /></b></td>
  63. <td width="10">:</td>
  64. <td width="30%">
  65. <input type="text" name="codeSearch" value="">
  66. </td>
  67. <td width="5%">&nbsp;</td>
  68. <td width="15%">&nbsp;</td>
  69. <td width="10">&nbsp;</td>
  70. <td width="30%">&nbsp;</td>
  71. </tr>
  72. <tr align = "left">
  73. <td width="15%"></td>
  74. <td width="10"></td>
  75. <td width="30%">
  76. <input type="button" value="<bean:message key="button.edit" />" onclick="javascript:doEditSearch();">
  77. </td>
  78. <td width="5%">&nbsp;</td>
  79. <td width="15%">&nbsp;</td>
  80. <td width="10">&nbsp;</td>
  81. <td width="30%">&nbsp;</td>
  82. </tr>
  83. </logic:empty>
  84. <logic:notEmpty name="nhprivilege" property="code">
  85. <tr>
  86. <td width="30%"><b><bean:message key="privilege.id.key"/> <font color="#FF0000">*</font></b></td>
  87. <td width="5">:</td>
  88. <td width="60%">
  89. <bean:write name="nhprivilege" property="code"/>
  90. </td>
  91. </tr>
  92. <tr>
  93. <td width="15%"><b><bean:message key="privilege.name.key"/><font color="#FF0000">*</font></b></td>
  94. <td width="10">:</td>
  95. <td width="30%">
  96. <html:text name="nhprivilege" property="name" size="30"/>
  97. </td>
  98. <td width="5%">&nbsp;</td>
  99. <td width="15%">&nbsp;</td>
  100. <td width="10">&nbsp;</td>
  101. <td width="30%">&nbsp;</td>
  102. </tr>
  103. <tr>
  104. <td width="15%"><b><bean:message key="privilege.type.key"/><font color="#FF0000">*</font></b></td>
  105. <td width="10">:</td>
  106. <td width="30%">
  107. <SELECT name="type">
  108. <option value="">Pilih Salah Satu</option>
  109. <option value="PRIV_TYPE_MENU"
  110. <logic:equal name="nhprivilege" property="type" value="PRIV_TYPE_MENU">
  111. SELECTED
  112. </logic:equal>
  113. >PRIV_TYPE_MENU</option>
  114. <option value="PRIV_TYPE_ACTION"
  115. <logic:equal name="nhprivilege" property="type" value="PRIV_TYPE_ACTION">
  116. SELECTED
  117. </logic:equal>
  118. >PRIV_TYPE_ACTION</option>
  119. </SELECT>
  120. </td>
  121. <td width="5%">&nbsp;</td>
  122. <td width="15%">&nbsp;</td>
  123. <td width="10">&nbsp;</td>
  124. <td width="30%">&nbsp;</td>
  125. </tr>
  126. <tr>
  127. <td width="15%"><b><bean:message key="privilege.path.key"/><font color="#FF0000">*</font></b></td>
  128. <td width="10">:</td>
  129. <td width="30%">
  130. <html:text name="nhprivilege" property="path" size="30"/>
  131. </td>
  132. <td width="5%">&nbsp;</td>
  133. <td width="15%">&nbsp;</td>
  134. <td width="10">&nbsp;</td>
  135. <td width="30%">&nbsp;</td>
  136. </tr>
  137. <tr>
  138. <td width="15%"><b><bean:message key="privilege.parent.key"/></b></td>
  139. <td width="10">:</td>
  140. <td width="30%">
  141. <select name="parent">
  142. <option value="">-- Pilih Salah Satu --</option>
  143. <logic:notEmpty name="nhprivilegeList">
  144. <logic:iterate id="nhprivilegeElement" name="nhprivilegeList">
  145. <option value="<bean:write name="nhprivilegeElement" property="code"/>"
  146. <logic:equal name="nhprivilegeElement" property="code" value="${nhprivilege.parent.code}">
  147. SELECTED
  148. </logic:equal>>
  149. <bean:write name="nhprivilegeElement" property="name"/></option>
  150. </logic:iterate>
  151. </logic:notEmpty>
  152. </select>
  153. </td>
  154. <td width="5%">&nbsp;</td>
  155. <td width="15%">&nbsp;</td>
  156. <td width="10">&nbsp;</td>
  157. <td width="30%">&nbsp;</td>
  158. </tr>
  159. <tr>
  160. <td width="15%"><b><bean:message key="privilege.priority.key"/></b></td>
  161. <td width="10">:</td>
  162. <td width="30%">
  163. <html:text name="nhprivilege" property="priority" size="30"/>
  164. </td>
  165. <td width="5%">&nbsp;</td>
  166. <td width="15%">&nbsp;</td>
  167. <td width="10">&nbsp;</td>
  168. <td width="30%">&nbsp;</td>
  169. </tr>
  170. <tr align = "left">
  171. <td><b><bean:message key="privilege.status.key"/></b></td>
  172. <td>:</td>
  173. <td align="left"><bean:write name="nhprivilege" property="status"/></td>
  174. <td>&nbsp;</td>
  175. <td>&nbsp;</td>
  176. <td>&nbsp;</td>
  177. </tr>
  178. <tr>
  179. <td width="15%"></td>
  180. <td width="10"></td>
  181. <td width="30%">
  182. <input type="button" value="<bean:message key="button.back"/>" onclick="javascript:doBack();"/>
  183. &nbsp;&nbsp;<input type="button" value="<bean:message key="button.submit"/>" onclick="doUpdatePrivilege();"/>
  184. <logic:equal name="nhprivilege" property="status" value="ACTIVE">
  185. <input type="button" value="<bean:message key="button.inactive"/>" onclick="doInactive('<bean:write name="nhprivilege" property="code"/>','INACTIVE');">
  186. </logic:equal>
  187. <logic:equal name="nhprivilege" property="status" value="INACTIVE">
  188. <input type="button" value="<bean:message key="button.active"/>" onclick="doActive('<bean:write name="nhprivilege" property="code"/>','ACTIVE');">
  189. </logic:equal>
  190. </td>
  191. <td colspan="4">&nbsp;</td>
  192. </tr>
  193. <tr>
  194. <td>&nbsp;</td>
  195. <td>&nbsp;</td>
  196. <td>&nbsp;</td>
  197. <td>&nbsp;</td>
  198. <td>&nbsp;</td>
  199. <td>&nbsp;</td>
  200. <td>&nbsp;</td>
  201. </tr>
  202. </logic:notEmpty>
  203. </table>
  204. </td>
  205. </tr>
  206. <tr>
  207. <td>&nbsp;</td>
  208. </tr>
  209. </table>
  210. </td>
  211. </form>
  212. <!-- END CONTENT -->
  213. <%@ include file="../common/footer.jsp"%>