| 123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406 |
- <%@ include file="../common/header.jsp"%>
- <script type="text/javascript" language="javascript">
- <!--
-
- function doEditSearch(){
- document.forms.appUser.action.value="edit_search";
- document.forms.appUser.submit();
- doDisable(document.forms.appUser, "button");
- }
-
-
- function doUpdate(){
- var x = window.confirm("Update AppUser?");
- var src = document.getElementById("accountNumberRight");
- for(var i=0; i<src.options.length; i++) {
- src.options[i].selected = true;
- }
- if(x){
- document.forms.appUser.action.value = "edit_ok";
- document.forms.appUser.post.value = "true";
- document.forms.appUser.submit();
- }
- }
-
- function doBack(){
- document.forms.appUser.action.value="list";
- document.forms.appUser.submit();
- doDisable(document.forms.appUser, "button");
- }
-
- function doUpdateStatus(code,status){
- var x = (status == 'ACTIVE' ? window.confirm("<bean:message key="confirm.activate"/>"):window.confirm("<bean:message key="confirm.inactivate"/>"));
- if(x){
- document.forms.appUser.loginName.value=code;
- document.forms.appUser.action.value="update_status";
- document.forms.appUser.status.value=status;
- document.forms.appUser.submit();
- doDisable(document.forms.appUser, "button");
- }
- }
-
- function doResetPassword(code){
- var x = window.confirm("Reset User Password?");
- if(x){
- document.forms.appUser.loginName.value=code;
- document.forms.appUser.action.value="reset_password";
- document.forms.appUser.submit();
- doDisable(document.forms.appUser, "button");
- }
- }
- function listbox_moveacross(sourceID, destID) {
- var src = document.getElementById(sourceID);
- var dest = document.getElementById(destID);
- for(var count=0; count < src.options.length; count++) {
- if(src.options[count].selected == true) {
- var option = src.options[count];
- var newOption = document.createElement("option");
- newOption.value = option.value;
- newOption.text = option.text;
- newOption.selected = true;
- try {
- dest.add(newOption, null); //Standard
- src.remove(count, null);
- }catch(error) {
- dest.add(newOption); // IE only
- src.remove(count);
- }
- count--;
- }
- }
- }
-
- function listbox_moveacross_all(sourceID, destID) {
- var src = document.getElementById(sourceID);
- var dest = document.getElementById(destID);
- for(var count=0; count < src.options.length; count++) {
- src.options[count].selected == true
- var option = src.options[count];
- var newOption = document.createElement("option");
- newOption.value = option.value;
- newOption.text = option.text;
- newOption.selected = true;
- try {
- dest.add(newOption, null); //Standard
- src.remove(count, null);
- }catch(error) {
- dest.add(newOption); // IE only
- src.remove(count);
- }
- count--;
- }
- }
-
- function listbox_selectall(listID, isSelect) {
- var listbox = document.getElementById(listID);
- for(var count=0; count < listbox.options.length; count++) {
- listbox.options[count].selected = isSelect;
- }
- }
- -->
- </script>
-
- <script type="text/javascript" src="./js/autocomplete/jquery.js"></script>
- <script type='text/javascript'
- src='./js/autocomplete/jquery.bgiframe.min.js'></script>
- <script type='text/javascript'
- src='./js/autocomplete/jquery.ajaxQueue.js'></script>
- <script type='text/javascript'
- src='./js/autocomplete/thickbox-compressed.js'></script>
- <script type='text/javascript'
- src='./js/autocomplete/jquery.autocomplete.js'></script>
- <script type='text/javascript' src='./js/autocomplete/localdata.js'></script>
-
-
- <script type="text/javascript">
- $(function() {
- function format(jsonmap) {
- return jsonmap.value;
- }
- $("#idSearch").autocomplete('appUser.do?action=getUser', {
- dataType: "json",
- parse: function(data) {
- return $.map(data, function(row) {
- return {
- data: row,
- value: row.loginName,
- result: row.loginName
- }
- });
- },
- formatItem: function(jsonmap) {
- return jsonmap.loginName;
- }
- }).result(function(e, jsonmap) {
- //doEditSearch();
- });
-
- function format(jsonmap) {
- return jsonmap.name + " - " + jsonmap.value;
- }
- $("#biller_name").autocomplete('appUser.do?action=getBillers', {
- dataType: "json",
- parse: function(data) {
- return $.map(data, function(row) {
- return {
- data: row,
- value: row.name,
- result: row.name
- }
- });
- },
- formatItem: function(jsonmap) {
- return format(jsonmap);
- }
- }).result(function(e, jsonmap) {
- //after select
- $("#biller").val(jsonmap.name);
- $("#biller_name").val(jsonmap.name + " - " + jsonmap.value);
- $.get("appUser.do", { "action": "getBillerGroups", "biller" : jsonmap.name },
- function(data){
- options = '';
- for (var i = 0; i < data.length; i++) {
- options += '<option value="' + data[i].name + '">' + data[i].value + '</option>';
- }
- $("#billerGroups").html(options);
- $('#billerGroups option:first').attr('selected', 'selected');
-
- }, "json");
- $.get("appUser.do", { "action": "getAccounts", "billerAccount" : jsonmap.name },
- function(data){
- optionsLeft = '';
- optionsRight = '';
- if(data.length > 0) {
- for (var i = 0; i < data.length; i++) {
- optionsLeft += '<option value="' + data[i].name + '">' + data[i].name + '</option>';
- }
- }
- $("#accountNumberLeft").html(optionsLeft);
- $("#accountNumberRight").html(optionsRight);
- }, "json");
- });
- });
- </script>
- <!-- CONTENT -->
- <form name="appUser" method="post" action="appUser.do">
- <input type="hidden" name="action" value ="" />
- <input type="hidden" name="clear" value ="" />
- <input type="hidden" name="status" value ="" />
- <input type="hidden" name="post" value ="" />
- <input type="hidden" name="redirect" value ="edit" />
-
- <table width="100%" border="0" align="center" cellpadding="2" cellspacing="4">
- <tr>
- <td class="titleHeader"><bean:message key="project.appUser.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="appUser" >
- <tr align = "left">
- <td width="15%"><b><bean:message key="appUser.loginName.key" /></b></td>
- <td width="10">:</td>
- <td width="30%">
- <input type="text" name="idSearch" id="idSearch" value="" />
- </td>
- <td width="5%"> </td>
- <td width="15%"> </td>
- <td width="10"> </td>
- <td width="30%"> </td>
- </tr>
- <tr align = "left">
- <td width="15%"></td>
- <td width="10"></td>
- <td width="30%">
- <input type="button" value="<bean:message key="button.search" />" onclick="javascript:doEditSearch();" />
- </td>
- <td width="5%"> </td>
- <td width="15%"> </td>
- <td width="10"> </td>
- <td width="30%"> </td>
- </tr>
- </logic:empty>
-
- <!-- kalo found data -->
- <logic:notEmpty name="appUser" >
- <tr>
- <td width="15%">
- <b><bean:message key="appUser.loginName.key"/><font color="#FF0000">*</font></b>
- </td>
- <td width="10">:</td>
- <td width="30%">
- <input type="hidden" name="loginName" value ="<bean:write name="appUser" property="loginName" />" />
- <bean:write name="appUser" property="loginName"/>
- </td>
- <td width="5%"> </td>
- <td width="15%"> </td>
- <td width="10"> </td>
- <td width="30%"> </td>
- </tr>
- <tr>
- <td width="15%">
- <b><bean:message key="appUser.firstName.key" /><font color="#FF0000">*</font></b>
- </td>
- <td width="10">:</td>
- <td width="30%">
- <input type="text" name="firstName" value="<bean:write name="appUser" property="firstName"/>" />
- </td>
- <td width="5%"> </td>
- <td width="15%"> </td>
- <td width="10"> </td>
- <td width="30%"> </td>
- </tr>
- <tr>
- <td width="15%"><b><bean:message key="appUser.lastName.key" /></b></td>
- <td width="10">:</td>
- <td width="30%">
- <input type="text" name="lastName" value="<bean:write name="appUser" property="lastName"/>" />
- </td>
- <td width="5%"> </td>
- <td width="15%"> </td>
- <td width="10"> </td>
- <td width="30%"> </td>
- </tr>
- <tr>
- <td width="15%">
- <b><bean:message key="appUser.biller.key" /><font color="#FF0000">*</font></b>
- </td>
- <td width="10">:</td>
- <td width="30%">
- <input type="text" id="biller_name" size="50" name="biller_name" value="<bean:write name="biller_name" />" />
- <input type="hidden" id="biller" name="biller" value="
- <logic:notEmpty name="appUser" property="biller">
- <bean:write name="appUser" property="biller.code" />
- </logic:notEmpty>
- " />
- </td>
- <td width="5%"> </td>
- <td width="15%"> </td>
- <td width="10"> </td>
- <td width="30%"> </td>
- </tr>
- <tr>
- <td width="15%">
- <b><bean:message key="appUser.billerGroup.key" /><font color="#FF0000">*</font></b>
- </td>
- <td width="10">:</td>
- <td width="30%">
- <select id="billerGroups" name="billerGroups">
- <logic:notEmpty name="billerGroupList">
- <logic:iterate id="billerGroup" name="billerGroupList">
- <option value="<bean:write name="billerGroup" property="id" />"
- <logic:notEmpty name="appUser" property="billerGroup">
- <logic:equal name="billerGroup" property="id" value="${appUser.billerGroup}">
- selected="selected"
- </logic:equal>
- </logic:notEmpty>
- > <bean:write name="billerGroup" property="name" /> </option>
- </logic:iterate>
- </logic:notEmpty>
- </select>
- </td>
- <td width="5%"> </td>
- <td width="15%"> </td>
- <td width="10"> </td>
- <td width="30%"> </td>
- </tr>
- <tr>
- <td valign="top"><b>Roles</b></td>
- <td valign="top">:</td>
- <td valign="top">
- <logic:notEmpty name="roleList">
- <logic:iterate id="role" name="roleList">
- <input type="checkbox"
- <logic:notEmpty name="appUser" property="roles">
- <logic:iterate id="element_roles" name="appUser" property="roles" >
- <logic:equal name="role" property="code" value="${element_roles.code}">
- checked="checked"
- </logic:equal>
- </logic:iterate>
- </logic:notEmpty>
- name="roleList" value="<bean:write name="role" property="code"/>" /> <bean:write name="role" property="name"/> <br />
- </logic:iterate>
- </logic:notEmpty>
- </td>
- </tr>
- </logic:notEmpty>
- </table>
- <table border="0" width="98%" align="center" cellpadding="2" cellspacing="2">
- <logic:notEmpty name="appUser">
- <tr>
- <td width="15%" valign="top"><b><bean:message key="appUser.accNo.key" /><font color="#FF0000">*</font></b></td>
- <td width="1%" valign="top">:</td>
- <td width="10%">
- <select id="accountNumberLeft" name="accountsLeft" size="10" multiple>
- <logic:notEmpty name="accountsList">
- <logic:iterate id="element_accountNumber" name="accountsList">
- <option value="<bean:write name="element_accountNumber" property="acctno" />">
- <bean:write name="element_accountNumber" property="acctno" />
- </option>
- </logic:iterate>
- </logic:notEmpty>
-
- </select>
- </td>
- <td valign="top">
- <a href="#" onclick="listbox_moveacross('accountNumberLeft', 'accountNumberRight')">></a>
- <br/>
- <a href="#" onclick="listbox_moveacross_all('accountNumberLeft', 'accountNumberRight')">>></a>
- <br/><br/>
- <a href="#" onclick="listbox_moveacross('accountNumberRight', 'accountNumberLeft')"><</a>
- <br/>
- <a href="#" onclick="listbox_moveacross_all('accountNumberRight', 'accountNumberLeft')"><<</a>
- </td>
- <td>
- <select id="accountNumberRight" name="accountsRight" size="10" multiple>
- <logic:notEmpty name="accountList">
- <logic:iterate id="account" name="accountList">
- <logic:notEmpty name="account" property="acctno">
- <option value="<bean:write name="account" property="acctno" />"selected = "selected">
- <bean:write name="account" property="acctno" />
- </option>
- </logic:notEmpty>
- </logic:iterate>
- </logic:notEmpty>
- </select>
- </td>
- <td width="5%"> </td>
- <td width="15%"> </td>
- <td width="10"> </td>
- <td width="30%"> </td>
- </tr>
- </logic:notEmpty>
- </table>
- <table border="0" width="98%" align="center" cellpadding="2" cellspacing="2">
- <logic:notEmpty name="appUser">
- <tr>
- <td width="15%"></td>
- <td width="1%"></td>
- <td colspan="5">
- <input type="button" value="<bean:message key="button.back"/>" onclick="javascript:doBack();" />
- <input type="button" value="<bean:message key="button.submit"/>" onclick="doUpdate();" />
- <input type="button" value="Reset Password" onclick="doResetPassword('<bean:write name="appUser" property="loginName"/>');" />
- <logic:equal name="appUser" property="status" value="ACTIVE">
- <input type="button" value="<bean:message key="button.inactive" />" onclick="doUpdateStatus('<bean:write name="appUser" property="loginName"/>','INACTIVE');" />
- </logic:equal>
- <logic:equal name="appUser" property="status" value="INACTIVE">
- <input type="button" value="<bean:message key="button.active" />" onclick="doUpdateStatus('<bean:write name="appUser" property="loginName"/>','ACTIVE');" />
- </logic:equal>
- </td>
-
- </tr>
- </logic:notEmpty>
- </table>
- </td>
- </tr>
- </table>
- </form>
- <!-- END CONTENT -->
- <%@ include file="../common/footer.jsp"%>
|