1
0

privilege_edit.jsp 6.2 KB

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