epay_role_edit.jsp 5.8 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185
  1. <%@ include file="../common/header.jsp"%>
  2. <script type="text/javascript" language="javascript">
  3. <!--
  4. function doUpdateRole(){
  5. var x = window.confirm("<bean:message key="confirm.edit"/>");
  6. if(x){
  7. document.forms.epayRole.action.value = "edit_ok";
  8. document.forms.epayRole.post.value = "true";
  9. document.forms.epayRole.submit();
  10. }
  11. }
  12. function doEditSearch(){
  13. document.forms.epayRole.action.value="edit_search";
  14. document.forms.epayRole.submit();
  15. doDisable(document.forms.epayRole, "button");
  16. }
  17. function doBack(){
  18. document.forms.epayRole.action.value="edit";
  19. document.forms.epayRole.submit();
  20. doDisable(document.forms.epayRole, "button");
  21. }
  22. function doInactive(code,status){
  23. var x = window.confirm(" Are you sure inactivate this record?")
  24. if (x) {
  25. document.forms.epayRole.code.value=code;
  26. document.forms.epayRole.status.value=status;
  27. document.forms.epayRole.action.value="update_status";
  28. document.forms.epayRole.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.epayRole.code.value=code;
  35. document.forms.epayRole.status.value=status;
  36. document.forms.epayRole.action.value="update_status";
  37. document.forms.epayRole.submit();
  38. }
  39. }
  40. -->
  41. </script>
  42. <!-- CONTENT -->
  43. <form name="epayRole" method="post" action="epayRole.do">
  44. <input type="hidden" name="action" value =""/>
  45. <input type="hidden" name="clear" value =""/>
  46. <html:hidden name="nhrole" 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.role.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="nhrole" property="code">
  61. <tr align = "left">
  62. <td width="15%"><b><bean:message key="role.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="nhrole" property="code">
  85. <tr>
  86. <td width="30%"><b><bean:message key="role.id.key"/> <font color="#FF0000">*</font></b></td>
  87. <td width="5">:</td>
  88. <td width="60%">
  89. <bean:write name="nhrole" property="code"/>
  90. </td>
  91. </tr>
  92. <tr>
  93. <td width="15%"><b><bean:message key="role.name.key"/></b></td>
  94. <td width="10">:</td>
  95. <td width="30%">
  96. <html:text name="nhrole" 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 align = "left">
  104. <td valign="top"><b><bean:message key="role.privilege.key"/></b></td>
  105. <td valign="top">:</td>
  106. <td align="left"><div style="overflow:auto;height: 200px; width: 200px;;border:1px solid #336699;padding-left:5px">
  107. <table border="0" width="100%" align="center" cellpadding="2" cellspacing="1">
  108. <logic:notEmpty name="nhprivilegesSetList">
  109. <logic:iterate id="nhprivileges" name="nhprivilegesSetList" >
  110. <tr>
  111. <td width="1%" align="right">
  112. <input type="checkbox" name="<bean:write name="nhprivileges" property="code"/>"
  113. <logic:notEmpty name="nhrole" property="nhprivileges">
  114. <logic:iterate id="element_privileges" name="nhrole" property="nhprivileges" >
  115. <logic:equal name="nhprivileges" property="code" value="${element_privileges.code}">
  116. checked
  117. </logic:equal>
  118. </logic:iterate>
  119. </logic:notEmpty>
  120. >
  121. </td>
  122. <td><bean:write name="nhprivileges" property="name"/></td>
  123. </tr>
  124. </logic:iterate>
  125. </logic:notEmpty>
  126. </table>
  127. </div>
  128. </td>
  129. </tr>
  130. <tr>
  131. <td width="30%"><b><bean:message key="role.status.key"/></b></td>
  132. <td width="5">:</td>
  133. <td width="60%">
  134. <bean:write name="nhrole" property="status"/>
  135. </td>
  136. </tr>
  137. <tr>
  138. <td width="15%"></td>
  139. <td width="10"></td>
  140. <td width="30%">
  141. <input type="button" value="<bean:message key="button.back"/>" onclick="javascript:doBack();"/>&nbsp;
  142. <input type="button" value="<bean:message key="button.submit"/>" onclick="doUpdateRole();"/>
  143. <logic:equal name="nhrole" property ="status" value="ACTIVE">
  144. <input type="button" value="<bean:message key="button.inactive"/>" onclick="doInactive('<bean:write name="nhrole" property="code"/>','INACTIVE');">
  145. </logic:equal>
  146. <logic:equal name="nhrole" property ="status" value="INACTIVE">
  147. <input type="button" value="<bean:message key="button.active"/>" onclick="doActive('<bean:write name="nhrole" property="code"/>','ACTIVE');">
  148. </logic:equal>
  149. </td>
  150. <td colspan="4">&nbsp;</td>
  151. </tr>
  152. </logic:notEmpty>
  153. <tr>
  154. <td>&nbsp;</td>
  155. <td>&nbsp;</td>
  156. <td>&nbsp;</td>
  157. <td>&nbsp;</td>
  158. <td>&nbsp;</td>
  159. <td>&nbsp;</td>
  160. <td>&nbsp;</td>
  161. </tr>
  162. </table>
  163. </td>
  164. </tr>
  165. <tr>
  166. <td>&nbsp;</td>
  167. </tr>
  168. </table>
  169. </td>
  170. </form>
  171. <!-- END CONTENT -->
  172. <%@ include file="../common/footer.jsp"%>