| 123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295 |
- <%@ include file="../common/header.jsp" %>
- <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" language="javascript">
- <!--
- function loadPageInit() {
- doLoadBillerGroup();
- }
-
- function doLoadBillerGroup() {
- var form = document.forms.billerGroup;
-
- var code = form.billerCode.value;
- loadOneValueAJAX("billerGroup.do?action=generateBillerGroupTree&biller=" +code+ "&ts=" +new Date().getTime(), "billerGroup_div");
- }
-
- $(function() {
- function format(jsonmap) {
- return jsonmap.name+' - '+jsonmap.value;
- }
- $("#idNhBilCon").autocomplete('billerGroup.do?action=loadCodeBillerName', {
- 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
- $("#idNhBilCon").val(format(jsonmap));
- $("#idNameBiller").val(jsonmap.value);
- $("#codeNhBilCon").val(jsonmap.name);
- });
- });
-
- function doCreate(){
- var x = window.confirm("<bean:message key="confirm.create" />");
- if (x) {
- document.forms.billerGroup.action.value="create_ok";
- document.forms.billerGroup.post.value = "true";
- document.forms.billerGroup.submit();
- doDisable(document.forms.billerGroup, "button");
- }
- }
-
- function doEdit(indexCode){
- document.forms.billerGroup.indexCode.value=indexCode;
- document.forms.billerGroup.action.value="edit_billerGroup";
- document.forms.billerGroup.submit();
- }
-
- function doInactivate(indexCode){
- var x = window.confirm("<bean:message key="confirm.inactivate"/>");
- if (x) {
- document.forms.billerGroup.indexCode.value=indexCode;
- document.forms.billerGroup.action.value="remove_billerGroup";
- document.forms.billerGroup.submit();
- doDisable(document.forms.billerGroup, "button");
- doDisableImage(document.forms.billerGroup);
- }
- }
-
- function doActivate(indexCode){
- var x = window.confirm("<bean:message key="confirm.activate"/>");
- if (x) {
- document.forms.billerGroup.indexCode.value=indexCode;
- document.forms.billerGroup.action.value="activate_billerGroup";
- document.forms.billerGroup.submit();
- doDisable(document.forms.billerGroup, "button");
- doDisableImage(document.forms.billerGroup);
- }
- }
-
- function doEditSearch(){
- document.forms.billerGroup.action.value="edit_search";
- document.forms.billerGroup.clear.value="true";
- document.forms.billerGroup.submit();
- doDisable(document.forms.billerGroup, "button");
- }
-
- function doAddBillerGroup(){
- var message = "";
- var focus = false;
- var form = document.forms.billerGroup;
- if (trim(form.code.value).length == 0) {
- message = message + ("<bean:message key="error.billerGroup.code"/>\n");
- if (!focus) form.code.focus(); focus = true;
- }
- if (trim(form.name.value).length == 0) {
- message = message + ("<bean:message key="error.billerGroup.name"/>\n");
- if (!focus) form.name.focus(); focus = true;
- }
- if (message == "" ) {
- var x = window.confirm("<bean:message key="confirm.edit"/>");
- if (x) {
- document.forms.billerGroup.action.value="add_billerGroup";
- document.forms.billerGroup.submit();
- doDisable(form, "button");
- doDisableImage(form);
- }
- } else {
- alert(message);
- }
- }
-
- function doBack(){
- location.href="billerGroup.do?action=edit&clear=true";
- //document.forms.billerGroup.action.value="list";
- //document.forms.billerGroup.clear.value="true";
- //document.forms.billerGroup.submit();
- }
- -->
- </script>
- <!-- CONTENT -->
- <FORM name="billerGroup" method="post" action="billerGroup.do">
- <input type="hidden" name="action">
- <input type="hidden" name="post">
- <input type="hidden" name="clear">
- <input type="hidden" name="itemFocus">
- <input type="hidden" name="redirect" value="edit">
- <input type="hidden" name="indexCode">
- <input type="hidden" id="codeNhBilCon" name="codeNhBilCon" />
- <input type="hidden" name="ts" value="<logic:notEmpty name="ts"><bean:write name="ts" /></logic:notEmpty>">
- <input type="hidden" name="billerCode" value="<logic:notEmpty name="billerCode"><bean:write name="billerCode" /></logic:notEmpty>">
- <input type="hidden" name="billerName" value="<logic:notEmpty name="billerName"><bean:write name="billerName" /></logic:notEmpty>">
- <input type="hidden" name="billerGroupId" value="<logic:notEmpty name="billerGroup_${ts}"><bean:write name="billerGroup_${ts}" property="id" /></logic:notEmpty>">
- <table width="100%" border="0" align="center" cellpadding="2" cellspacing="4">
- <tr>
- <td class="titleHeader" align="left"><bean:message key="project.billerGroup.key"/> - EDIT</td>
- </tr>
- </table>
- <table width="100%" border="0" align="center" cellpadding="2" cellspacing="4">
- <tr>
- <td align="center">
- <table width="100%" border="0" cellspacing="1" cellpadding="2">
- <tr><td colspan="7"><html:errors/></td></tr>
- <logic:notEmpty name="biller">
- <logic:empty name="biller" property="code">
- <tr align = "left">
- <td width="15%"><b><bean:message key="billerData.biller.key" /></b></td>
- <td width="1%">:</td>
- <td width="34%" valign="top">
- <table border="0" cellspacing="0" cellpadding="0">
- <tr>
- <td><input type="text" name="idNhBillerGroup" size="50" id="idNhBilCon"></td>
- </tr>
- </table>
- </td>
- <td width="5%"> </td>
- <td width="15%"> </td>
- <td width="10"> </td>
- <td width="30%"> </td>
- </tr>
- </logic:empty>
- </logic:notEmpty>
-
- <logic:notEmpty name="biller">
- <logic:notEmpty name="biller" property="code">
- <tr align = "left">
- <td width="15%"><b><bean:message key="billerGroup.biller.key" /></b></td>
- <td width="1&">:</td>
- <td width="34%" valign="top">
- <logic:notEmpty name="billerName">
- <bean:write name="billerCode" /> - <bean:write name="billerName" />
- </logic:notEmpty>
- </td>
- <td width="5%"> </td>
- <td width="15%"> </td>
- <td width="10"> </td>
- <td width="30%"> </td>
- </tr>
- <tr align = "left">
- <td width="15%"><b><bean:message key="billerGroup.category.key" /></b></td>
- <td width="1%">:</td>
- <td width="34%" valign="top">
- <bean:write name="biller" property="billerCategory.name"/>
- </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="billerGroup.group.key" /></b></td>
- <td width="1%">:</td>
- <td width="34%" valign="top">
- <div id="billerGroup_div" align="left"></div>
- </td>
- <td width="5%"> </td>
- <td width="15%"> </td>
- <td width="10"> </td>
- <td width="30%"> </td>
- </tr>
- <tr>
- <td width="20%" valign="top"> </td>
- <td width="2%" valign="top"> </td>
- <td width="78%" valign="top"> </td>
- </tr>
- <tr>
- <td width="20%" valign="top"> </td>
- <td width="2%" valign="top"> </td>
- <td width="78%" valign="top">
- <table width="100%" border="0" align="center" cellpadding="2" cellspacing="1" bgcolor="#CCCCCC">
- <tr bgcolor="#FFFFFF">
- <td valign="top"><b><bean:message key="billerGroup.parent.key" /></b></td>
- <td valign="top"><b><bean:message key="billerGroup.code.key" /></b></td>
- <td valign="top"><b><bean:message key="billerGroup.name.key" /></b></td>
- <td valign="top"> </td>
- </tr>
- <tr bgcolor="#FFFFFF">
- <td valign="top">
- <select name="parentCode" style="width:130">
- <option value="">-- Select Parent --</option>
- <logic:notEmpty name="billerGroups">
- <logic:notEmpty name="billerGroup_${ts}">
- <logic:iterate id="element_parent" name="billerGroups" >
- <option value="<bean:write name="element_parent" property="id" />"
- <logic:notEmpty name="billerGroup_${ts}" property="parent">
- <logic:equal name="billerGroup_${ts}" property="parent.id" value="${element_parent.id}">
- selected
- </logic:equal>
- </logic:notEmpty>
- ><bean:write name="element_parent" property="name" /></option>
- </logic:iterate>
- </logic:notEmpty>
- </logic:notEmpty>
- </select>
- </td>
- <td>
- <input type="text" name="code" value="<bean:write name="billerGroup_${ts}" property="code" />">
- </td>
- <td>
- <input type="text" name="name" value="<bean:write name="billerGroup_${ts}" property="name" />">
- </td>
- <td align="left" valign="top">
- <input type="button" name="addBillerGroup" value="<bean:message key="button.add"/>" onclick="javascript:doAddBillerGroup();">
- </td>
- </tr>
- </table>
- </td>
- <td width="21%"></td>
- </tr>
- </logic:notEmpty>
- </logic:notEmpty>
- </table>
- <table width="100%" border="0" cellspacing="1" cellpadding="2">
- <tr>
- <td width="10%"></td>
- <td width="15%" align="center">
- <logic:notEmpty name="biller">
- <logic:empty name="biller" property="code">
- <input type="button" value="<bean:message key="button.edit" />" onclick="javascript:doEditSearch();">
- </logic:empty>
- </logic:notEmpty>
- </td>
- <td colspan="4"> </td>
-
- <td width="30%" align="center">
- <logic:notEmpty name="biller">
- <logic:notEmpty name="biller" property="code">
- <input type="button" value="<bean:message key="button.back" />" onclick="javascript:doBack();">
- </logic:notEmpty>
- </logic:notEmpty>
- </td>
- <td colspan="4"> </td>
- </tr>
- </table>
- </td>
- </tr>
- </table>
- </form>
- <logic:notEmpty name="biller">
- <logic:notEmpty name="biller" property="code">
- <script type="text/javascript" language="javascript">loadPageInit();</script>
- </logic:notEmpty>
- </logic:notEmpty>
- <!-- END CONTENT -->
- <%@ include file="../common/footer.jsp"%>
|