Author: apatel
Date: Fri Jul 17 02:53:15 2009 New Revision: 794949 URL: http://svn.apache.org/viewvc?rev=794949&view=rev Log: Enable form submit if paymentMethodTypeId is selected. Modified: ofbiz/trunk/applications/accounting/webapp/ap/invoices/PurchaseInvoices.ftl ofbiz/trunk/applications/accounting/webapp/ar/payment/batchPayments.ftl Modified: ofbiz/trunk/applications/accounting/webapp/ap/invoices/PurchaseInvoices.ftl URL: http://svn.apache.org/viewvc/ofbiz/trunk/applications/accounting/webapp/ap/invoices/PurchaseInvoices.ftl?rev=794949&r1=794948&r2=794949&view=diff ============================================================================== --- ofbiz/trunk/applications/accounting/webapp/ap/invoices/PurchaseInvoices.ftl (original) +++ ofbiz/trunk/applications/accounting/webapp/ap/invoices/PurchaseInvoices.ftl Fri Jul 17 02:53:15 2009 @@ -66,6 +66,8 @@ function setServiceName(selection) { document.listPurchaseInvoices.action = '<@ofbizUrl>'+selection.value+'</@ofbizUrl>'; showIssueChecks(selection); + $('submitButton').disabled = true; + $('paymentMethodTypeId').value = "" } function runAction() { @@ -87,6 +89,13 @@ Effect.BlindUp('issueChecks',{duration: 0.0}); } } +function enableSubmitButton() { + if ($('paymentMethodTypeId').value == "") { + $('submitButton').disabled = true; + } else { + $('submitButton').disabled = false; + } +} --> </script> @@ -102,12 +111,12 @@ <option value=""/> <option value="processMassCheckRun">${uiLabelMap.AccountingIssueCheck}</option> </select> - <a href="javascript:runAction();" id="runAction" class="buttontext">${uiLabelMap.OrderRunAction}</a> + <input id="submitButton" type="button" onclick="javascript:runAction();" value="${uiLabelMap.OrderRunAction}" disabled/> </div> <input type="hidden" name="organizationPartyId" value="${organizationPartyId}"/> <div id="issueChecks" style="display: none;" align="right"> <span class="label">${uiLabelMap.AccountingVendorPaymentMethod}</span> - <select name="paymentMethodTypeId"> + <select name="paymentMethodTypeId" id="paymentMethodTypeId" onchange="javascript:enableSubmitButton();"> <option value=""></option> <#if paymentMethodType?has_content> <option value="${paymentMethodType.paymentMethodTypeId}">${paymentMethodType.description}</option> Modified: ofbiz/trunk/applications/accounting/webapp/ar/payment/batchPayments.ftl URL: http://svn.apache.org/viewvc/ofbiz/trunk/applications/accounting/webapp/ar/payment/batchPayments.ftl?rev=794949&r1=794948&r2=794949&view=diff ============================================================================== --- ofbiz/trunk/applications/accounting/webapp/ar/payment/batchPayments.ftl (original) +++ ofbiz/trunk/applications/accounting/webapp/ar/payment/batchPayments.ftl Fri Jul 17 02:53:15 2009 @@ -64,6 +64,13 @@ $('showPaymentRunningTotal').update(""); } } +function enableSubmitButton() { + if ($('paymentGroupName').value == "") { + $('submitButton').disabled = true; + } else { + $('submitButton').disabled = false; + } +} // --> </script> @@ -73,7 +80,7 @@ <#if paymentList?has_content> <div> <span class="label">${uiLabelMap.AccountingPayment} ${uiLabelMap.PartyPartyGroupName}</span> - <input type="text" size='25' name='paymentGroupName'> + <input type="text" size='25' id="paymentGroupName" name='paymentGroupName' onchange="javascript:enableSubmitButton();"> <input type="hidden" name='organizationPartyId' value="${organizationPartyId?if_exists}"> <input type="hidden" name='paymentGroupTypeId' value="BATCH_PAYMENT"> </div> @@ -110,10 +117,10 @@ </td> </tr> </#list> + <div align="right"> + <input id="submitButton" type="submit" value="${uiLabelMap.AccountingCreateBatch}" disabled/> + <div> </table> - <div align="right"> - <a href="javascript:document.paymentBatchForm.submit();" class="buttontext">${uiLabelMap.AccountingCreateBatch}</a> - <div> <#else> <span class="label">${uiLabelMap.AccountingNoRecordFound}</span> </#if> |
Free forum by Nabble | Edit this page |