role_create.jsp 4.8 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155
  1. <%@ include file="../common/header.jsp" %>
  2. <script type="text/javascript" language="javascript">
  3. <!--
  4. function doCreateRole(){
  5. var x = window.confirm("<bean:message key="confirm.create"/>")
  6. if (x) {
  7. document.forms.role.action.value="create_ok";
  8. document.forms.role.post.value = "true";
  9. document.forms.role.submit();
  10. }
  11. }
  12. function doBack(){
  13. document.forms.role.action.value="list";
  14. document.forms.role.clear.value="true";
  15. document.forms.role.submit();
  16. }
  17. -->
  18. </script>
  19. <!-- CONTENT -->
  20. <form name="role" method="post" action="role.do">
  21. <input type="hidden" name="action">
  22. <input type="hidden" name="clear">
  23. <input type="hidden" name="sequence">
  24. <input type="hidden" name="post">
  25. <input type="hidden" name="redirect" value="create">
  26. <!--td width="80%" valign="top"-->
  27. <table width="100%" border="0" align="center" cellpadding="2" cellspacing="4">
  28. <tr>
  29. <td class="titleHeader" align="left"><bean:message key="project.role.key"/> CREATE</td>
  30. </tr>
  31. </table>
  32. <table width="100%" border="0" align="center" cellpadding="2" cellspacing="4">
  33. <tr>
  34. <td align="center">
  35. <table width="100%" border="0" cellspacing="1" cellpadding="2">
  36. <tr>
  37. <td colspan="6"><html:errors/></td>
  38. </tr>
  39. <tr>
  40. <td width="15%"><b><bean:message key="role.id.key"/><font color="#FF0000">*</font></b></td>
  41. <td width="10">:</td>
  42. <td width="30%">
  43. <select name="userNameList">
  44. <option value="">-- Pilih Salah Satu --</option>
  45. <logic:notEmpty name="groupList">
  46. <logic:iterate id="groupElement" name="groupList">
  47. <option value="<bean:write name="groupElement"/>"
  48. <logic:equal name="groupElement" value="${role.id}">
  49. SELECTED
  50. </logic:equal>
  51. >
  52. <bean:write name="groupElement"/></option>
  53. </logic:iterate>
  54. </logic:notEmpty>
  55. </select>
  56. <%/*<html:text name="role" property="id" size="30"/>*/%>
  57. </td>
  58. <td width="5%">&nbsp;</td>
  59. <td width="15%">&nbsp;</td>
  60. <td width="10">&nbsp;</td>
  61. <td width="30%">&nbsp;</td>
  62. </tr>
  63. <tr>
  64. <td width="15%"><b><bean:message key="role.name.key"/><font color="#FF0000">*</font></b></td>
  65. <td width="10">:</td>
  66. <td width="30%">
  67. <html:text name="role" property="name" size="30"/>
  68. </td>
  69. <td width="5%">&nbsp;</td>
  70. <td width="15%">&nbsp;</td>
  71. <td width="10">&nbsp;</td>
  72. <td width="30%">&nbsp;</td>
  73. </tr>
  74. <tr>
  75. <td width="15%"><b><bean:message key="role.type.key"/><font color="#FF0000">*</font></b></td>
  76. <td width="10">:</td>
  77. <td width="30%">
  78. <select name="type">
  79. <option value="">-- Pilih Salah Satu --</option>
  80. <logic:notEmpty name="typeList">
  81. <logic:iterate id="typeElement" name="typeList">
  82. <option value="<bean:write name="typeElement" property="name"/>"
  83. <logic:equal name="typeName" value="${typeElement.name}">
  84. selected
  85. </logic:equal>
  86. >
  87. <bean:write name="typeElement" property="name"/></option>
  88. </logic:iterate>
  89. </logic:notEmpty>
  90. </select>
  91. </td>
  92. <td width="5%">&nbsp;</td>
  93. <td width="15%">&nbsp;</td>
  94. <td width="10">&nbsp;</td>
  95. <td width="30%">&nbsp;</td>
  96. </tr>
  97. <tr>
  98. <td valign="top"><b><bean:message key="role.privilege.key" /></b></td>
  99. <td valign="top">:</td>
  100. <td colspan=4 valign="top">
  101. <table border="0" cellspacing="0" cellpadding="4">
  102. <tr>
  103. <td valign="top">
  104. <div style="overflow:auto;height: 200px; width: 200px;;border:1px solid #336699;padding-left:5px">
  105. <table border="0" width="100%" align="center" cellpadding="2" cellspacing="1">
  106. <logic:notEmpty name="privilegesSetList">
  107. <logic:iterate id="privilege" name="privilegesSetList">
  108. <tr>
  109. <td width="1%" align="right">
  110. <input type="checkbox" name="<bean:write name="privilege" property="id"/>"
  111. <logic:notEmpty name="role" property="privileges"><logic:iterate id="element_privileges" name="role" property="privileges">
  112. <logic:equal name="privilege" property="id" value="${element_privileges.id}">
  113. CHECKED
  114. </logic:equal>
  115. </logic:iterate> </logic:notEmpty>>
  116. </td>
  117. <td><bean:write name="privilege" property="name"/></td>
  118. </tr>
  119. </logic:iterate>
  120. </logic:notEmpty>
  121. </table>
  122. </div>
  123. </td>
  124. </tr>
  125. </table>
  126. </td>
  127. </tr>
  128. <tr>
  129. <td width="15%"></td>
  130. <td width="10"></td>
  131. <td width="30%"><input type="button" value="<bean:message key="button.back"/>" onclick="doBack();">
  132. &nbsp;<input type="button" value="<bean:message key="button.submit"/>" onclick="doCreateRole();"></td>
  133. <td colspan="4">&nbsp;</td>
  134. </tr>
  135. </table>
  136. </td>
  137. </tr>
  138. <tr>
  139. <td>&nbsp;</td>
  140. </tr>
  141. </table>
  142. </form>
  143. <!-- END CONTENT -->
  144. <%@ include file="../common/footer.jsp"%>