[freeside-commits] freeside/httemplate/misc change_pkg.cgi, 1.12, 1.13 order_pkg.html, 1.23, 1.24
Ivan,,,
ivan at wavetail.420.am
Mon Apr 11 16:06:18 PDT 2011
Update of /home/cvs/cvsroot/freeside/httemplate/misc
In directory wavetail.420.am:/tmp/cvs-serv23145/misc
Modified Files:
change_pkg.cgi order_pkg.html
Log Message:
fix usps-validation misfire and inability to submit on change package too, RT#12377, RT#12183
Index: change_pkg.cgi
===================================================================
RCS file: /home/cvs/cvsroot/freeside/httemplate/misc/change_pkg.cgi,v
retrieving revision 1.12
retrieving revision 1.13
diff -u -w -d -r1.12 -r1.13
--- change_pkg.cgi 11 Oct 2010 19:00:33 -0000 1.12
+++ change_pkg.cgi 11 Apr 2011 23:06:16 -0000 1.13
@@ -1,5 +1,7 @@
<% include('/elements/header-popup.html', "Change Package") %>
+<SCRIPT TYPE="text/javascript" SRC="../elements/order_pkg.js"></SCRIPT>
+
<% include('/elements/error.html') %>
<FORM NAME="OrderPkgForm" ACTION="<% $p %>edit/process/change-cust_pkg.html" METHOD=POST>
@@ -40,7 +42,12 @@
%>
<BR>
-<INPUT NAME="submitButton" TYPE="button" VALUE="Change package" onClick="this.disabled=true; standardize_locations();">
+<INPUT NAME = "submitButton"
+ TYPE = "button"
+ VALUE = "Change package"
+ onClick = "this.disabled=true; standardize_new_location();"
+ <% scalar($cgi->param('pkgpart')) ? '' : 'DISABLED' %>
+>
</FORM>
</BODY>
Index: order_pkg.html
===================================================================
RCS file: /home/cvs/cvsroot/freeside/httemplate/misc/order_pkg.html,v
retrieving revision 1.23
retrieving revision 1.24
diff -u -w -d -r1.23 -r1.24
--- order_pkg.html 11 Apr 2011 16:12:46 -0000 1.23
+++ order_pkg.html 11 Apr 2011 23:06:16 -0000 1.24
@@ -5,33 +5,7 @@
<SCRIPT TYPE="text/javascript" SRC="../elements/calendar-en.js"></SCRIPT>
<SCRIPT TYPE="text/javascript" SRC="../elements/calendar-setup.js"></SCRIPT>
-<SCRIPT TYPE="text/javascript">
-
- function enable_order_pkg () {
- if ( document.OrderPkgForm.pkgpart.selectedIndex > 0 ) {
- document.OrderPkgForm.submitButton.disabled = false;
- if ( document.OrderPkgForm.pkgpart.options[document.OrderPkgForm.pkgpart.selectedIndex].getAttribute('data-can_discount') == 1 ) {
- document.OrderPkgForm.discountnum.disabled = false;
- } else {
- document.OrderPkgForm.discountnum.disabled = true;
- }
- } else {
- document.OrderPkgForm.submitButton.disabled = true;
- document.OrderPkgForm.discountnum.disabled = true;
- }
- }
-
- function standardize_new_location() {
- var form = document.OrderPkgForm;
- var loc = form.locationnum;
- if (loc.type == 'select-one' && loc.options[loc.selectedIndex].value == -1){
- standardize_locations();
- } else {
- form.submit();
- }
- }
-
-</SCRIPT>
+<SCRIPT TYPE="text/javascript" SRC="../elements/order_pkg.js"></SCRIPT>
<% include('/elements/error.html') %>
More information about the freeside-commits
mailing list