From 145e7ee0b767e95c229657680ae477bb693ac7fc Mon Sep 17 00:00:00 2001 From: ivan Date: Tue, 1 Apr 2008 06:34:17 +0000 Subject: [PATCH] popup iframes don't have predictable names anymore, so locate submit buttons by id instead --- httemplate/edit/cust_credit.cgi | 44 +++++++++++++--------------------------- httemplate/misc/cancel_cust.html | 4 ++-- httemplate/misc/cancel_pkg.html | 4 ++-- 3 files changed, 18 insertions(+), 34 deletions(-) diff --git a/httemplate/edit/cust_credit.cgi b/httemplate/edit/cust_credit.cgi index 36109cf5d..c9ca31ff3 100755 --- a/httemplate/edit/cust_credit.cgi +++ b/httemplate/edit/cust_credit.cgi @@ -4,7 +4,7 @@
- + @@ -20,18 +20,19 @@ Credit Amount - $ + $ % %#print qq! Also post refund!; % -<% include('/elements/tr-select-reason.html', - 'field' => 'reasonnum', - 'reason_class' => 'R', - 'control_button' => 'document.credit_popup.submit', - ) +<% include( '/elements/tr-select-reason.html', + 'field' => 'reasonnum', + 'reason_class' => 'R', + 'control_button' => "document.getElementById('confirm_credit_button')", + 'cgi' => $cgi, + ) %> @@ -43,7 +44,7 @@ Credit
-
+
@@ -58,27 +59,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 74362f862..5c2e03677 100644 --- a/httemplate/misc/cancel_cust.html +++ b/httemplate/misc/cancel_cust.html @@ -18,7 +18,7 @@ 'field' => 'reasonnum', 'reason_class' => 'C', 'cgi' => $cgi, - 'control_button' => 'document.cust_cancel_popup.submit', + 'control_button' => "document.getElementById('confirm_cancel_cust_button')", ) %> @@ -26,7 +26,7 @@

-          +          diff --git a/httemplate/misc/cancel_pkg.html b/httemplate/misc/cancel_pkg.html index 8dffba72e..e0e5fd1f8 100755 --- a/httemplate/misc/cancel_pkg.html +++ b/httemplate/misc/cancel_pkg.html @@ -43,14 +43,14 @@ 'field' => 'reasonnum', 'reason_class' => $class, 'curr_value' => $reasonnum, - 'control_button' => 'document.sc_popup.submit', + 'control_button' => "document.getElementById('confirm_cancel_pkg_button')", ) %>
- + -- 2.11.0