| 123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202 |
- <%@ include file="../common/header.jsp"%>
-
- <script type="text/javascript" language="javascript">
- <!--
- function doUpdateRole(){
- var x = window.confirm("<bean:message key="confirm.edit"/>");
- if(x){
- document.forms.role.action.value = "edit_ok";
- document.forms.role.post.value = "true";
- document.forms.role.submit();
- }
- }
-
- function doEditSearch(){
- document.forms.role.action.value="edit_search";
- document.forms.role.submit();
- doDisable(document.forms.role, "button");
- }
- function doBack(){
- document.forms.role.action.value="edit";
- document.forms.role.submit();
- doDisable(document.forms.role, "button");
- }
-
- function doInactive(id,status){
- var x = window.confirm(" Are you sure inactivate this record?")
- if (x) {
- document.forms.role.id.value=id;
- document.forms.role.status.value=status;
- document.forms.role.action.value="update_status";
- document.forms.role.submit();
- }
- }
-
- function doActive(id,status){
- var x = window.confirm(" Are you sure activate this record?")
- if (x) {
- document.forms.role.id.value=id;
- document.forms.role.status.value=status;
- document.forms.role.action.value="update_status";
- document.forms.role.submit();
- }
- }
- -->
- </script>
- <!-- CONTENT -->
- <form name="role" method="post" action="role.do">
- <input type="hidden" name="action" value ="">
- <input type="hidden" name="clear" value ="">
- <html:hidden name="role" property="id"/>
- <input type="hidden" name="post">
- <input type="hidden" name="status" value ="">
- <!--td width="80%" valign="top"-->
- <table width="100%" border="0" align="center" cellpadding="2" cellspacing="4">
- <tr>
- <td class="titleHeader"><bean:message key="project.role.key"/> - EDIT</td>
- </tr>
- </table>
- <table width="100%" border="0" align="center" cellpadding="2" cellspacing="4">
- <tr><td colspan="7"><html:errors/></td></tr>
- <tr>
- <td align="center">
- <table width="100%" border="0" cellspacing="1" cellpadding="2">
- <logic:empty name="role" property="id">
- <tr align = "left">
- <td width="15%"><b><bean:message key="role.id.key" /></b></td>
- <td width="1%">:</td>
- <td width="84%" colspan="5">
- <select name="idSearch">
- <option value="">-- Pilih Salah Satu --</option>
- <logic:notEmpty name="groupList">
- <logic:iterate id="groupElement" name="groupList">
- <option value="<bean:write name="groupElement"/>"
- <logic:equal name="groupElement" value="${role.id}">
- SELECTED
- </logic:equal>
- >
- <bean:write name="groupElement"/></option>
- </logic:iterate>
- </logic:notEmpty>
- </select>
- </td>
- </tr>
- <tr align = "left">
- <td width="15%"></td>
- <td width="1%"></td>
- <td width="84%" colspan="5">
- <input type="button" value="<bean:message key="button.edit"/>" onclick="doEditSearch();">
- </td>
- </tr>
- </logic:empty>
- <logic:notEmpty name="role" property="id">
- <tr>
- <td width="15%"><b><bean:message key="role.id.key"/> <font color="#FF0000">*</font></b></td>
- <td width="1">:</td>
- <td width="84%" colspan="5">
- <bean:write name="role" property="id"/>
- </td>
- </tr>
- <tr>
- <td width="15%"><b><bean:message key="role.name.key"/></b></td>
- <td width="1%">:</td>
- <td width="84%" colspan="5">
- <html:text name="role" property="name" size="30"/>
- </td>
- </tr>
- <tr align = "left">
- <td width="15%"><b><bean:message key="role.type.key" /></b></td>
- <td width="1%">:</td>
- <td width="84%" colspan="5">
- <select name="type">
- <option value="">-- Pilih Salah Satu --</option>
- <logic:notEmpty name="typeList">
- <logic:iterate id="typeElement" name="typeList">
- <option value="<bean:write name="typeElement" property="name"/>"
- <logic:equal name="role" property="type" value="${typeElement.name}">
- selected
- </logic:equal>
- >
- <bean:write name="typeElement" property="name"/></option>
- </logic:iterate>
- </logic:notEmpty>
- </select>
- </td>
- </tr>
- <tr align = "left">
- <td valign="top"><b><bean:message key="role.privilege.key"/></b></td>
- <td valign="top">:</td>
- <td align="left"><div style="overflow:auto;height: 200px; width: 200px;;border:1px solid #336699;padding-left:5px">
- <table border="0" width="100%" align="center" cellpadding="2" cellspacing="1">
- <logic:notEmpty name="privilegesSetList">
- <logic:iterate id="privileges" name="privilegesSetList" >
- <tr>
- <td width="1%" align="right">
- <input type="checkbox" name="<bean:write name="privileges" property="id"/>"
- <logic:notEmpty name="role" property="privileges">
- <logic:iterate id="element_privileges" name="role" property="privileges" >
- <logic:equal name="privileges" property="id" value="${element_privileges.id}">
- checked
- </logic:equal>
- </logic:iterate>
- </logic:notEmpty>
- >
- </td>
- <td><bean:write name="privileges" property="name"/></td>
- </tr>
- </logic:iterate>
- </logic:notEmpty>
- </table>
- </div>
- </td>
- </tr>
- <tr>
- <td width="15%"><b><bean:message key="role.status.key"/></b></td>
- <td width="1%">:</td>
- <td width="84%" colspan="5">
- <bean:write name="role" property="status"/>
- </td>
- </tr>
- <tr>
- <td width="15%"></td>
- <td width="1%"></td>
- <td width="84%" colspan="5">
- <input type="button" value="<bean:message key="button.back"/>" onclick="javascript:doBack();"/>
- <input type="button" value="<bean:message key="button.submit"/>" onclick="doUpdateRole();"/>
- <logic:equal name="role" property ="status" value="ACTIVE">
- <input type="button" value="<bean:message key="button.inactive"/>" onclick="doInactive('<bean:write name="role" property="id"/>','INACTIVE');">
- </logic:equal>
- <logic:equal name="role" property ="status" value="INACTIVE">
- <input type="button" value="<bean:message key="button.active"/>" onclick="doActive('<bean:write name="role" property="id"/>','ACTIVE');">
- </logic:equal>
- </td>
- </tr>
- </logic:notEmpty>
- <tr>
- <td> </td>
- <td> </td>
- <td> </td>
- <td> </td>
- <td> </td>
- <td> </td>
- <td> </td>
- </tr>
- </table>
- </td>
- </tr>
- <tr>
- <td> </td>
- </tr>
- </table>
- </form>
- <!-- END CONTENT -->
- <%@ include file="../common/footer.jsp"%>
-
|