From: ivan Date: Tue, 1 Apr 2008 06:34:33 +0000 (+0000) Subject: popup iframes don't have predictable names anymore, so locate submit buttons by id... X-Git-Tag: freeside_1_7_3rc1~4 X-Git-Url: http://git.freeside.biz/gitweb/?a=commitdiff_plain;h=af5133610865324e88e2005e0e5f13700664d743;p=freeside.git popup iframes don't have predictable names anymore, so locate submit buttons by id instead --- diff --git a/httemplate/edit/cust_credit.cgi b/httemplate/edit/cust_credit.cgi index 2af4e32ba..10eb53260 100755 --- a/httemplate/edit/cust_credit.cgi +++ b/httemplate/edit/cust_credit.cgi @@ -4,7 +4,7 @@
- + @@ -20,14 +20,14 @@ Credit Amount - $ + $ % %#print qq! Also post refund!; % -<% include('/elements/tr-select-reason.html', 'reasonnum', 'R', '', '', '', 'document.credit_popup.submit',) %> +<% include('/elements/tr-select-reason.html', 'reasonnum', 'R', '', '', '', "document.getElementById('confirm_credit_button')") %> Auto-apply
to invoices @@ -38,7 +38,7 @@ Credit
-
+
@@ -53,27 +53,10 @@ my $conf = new FS::Conf; die "access denied" unless $FS::CurrentUser::CurrentUser->access_right('Post credit'); -my($custnum, $amount, $reason); -if ( $cgi->param('error') ) { - #$cust_credit = new FS::cust_credit ( { - # map { $_, scalar($cgi->param($_)) } fields('cust_credit') - #} ); - $custnum = $cgi->param('custnum'); - $amount = $cgi->param('amount'); - #$refund = $cgi->param('refund'); - $reason = $cgi->param('reason'); -} else { - my($query) = $cgi->keywords; - $query =~ /^(\d+)$/; - $custnum = $1; - $amount = ''; - #$refund = 'yes'; - $reason = ''; -} -my $_date = time; - -my $otaker = getotaker; - -my $p1 = popurl(1); +my $custnum = $cgi->param('custnum'); +my $amount = $cgi->param('amount'); +my $_date = time; +my $otaker = getotaker; +my $p1 = popurl(1); diff --git a/httemplate/misc/cancel_cust.html b/httemplate/misc/cancel_cust.html index 94c23646c..1773afc54 100644 --- a/httemplate/misc/cancel_cust.html +++ b/httemplate/misc/cancel_cust.html @@ -14,7 +14,7 @@ <% ntable("#cccccc", 2) %> -<% include('/elements/tr-select-reason.html', 'reasonnum', 'C', '', '', '', 'document.cust_cancel_popup.submit', +<% include('/elements/tr-select-reason.html', 'reasonnum', 'C', '', '', '', "document.getElementById('confirm_cancel_cust_button')", ) %> @@ -22,7 +22,7 @@

-          +          diff --git a/httemplate/misc/cancel_pkg.html b/httemplate/misc/cancel_pkg.html index e41662793..7a4690b21 100755 --- a/httemplate/misc/cancel_pkg.html +++ b/httemplate/misc/cancel_pkg.html @@ -39,12 +39,12 @@ %} % -<% include('/elements/tr-select-reason.html', 'reasonnum', $class, $reasonnum, '', '', 'document.sc_popup.submit' ) %> +<% include('/elements/tr-select-reason.html', 'reasonnum', $class, $reasonnum, '', '', "document.getElementById('confirm_cancel_pkg_button')" ) %>
- +