From: ivan Date: Sat, 11 Mar 2006 05:21:20 +0000 (+0000) Subject: fix the progressbar bug with multiple progressbar forms on a page X-Git-Tag: BEFORE_RT_3_4_5^2~187 X-Git-Url: http://git.freeside.biz/gitweb/?a=commitdiff_plain;h=36d9b47e5c20ae3bc71c0bd0eaf289b566d0cf7c;p=freeside.git fix the progressbar bug with multiple progressbar forms on a page --- diff --git a/httemplate/elements/progress-init.html b/httemplate/elements/progress-init.html index ba9f6edd6..efebe48e9 100644 --- a/httemplate/elements/progress-init.html +++ b/httemplate/elements/progress-init.html @@ -14,7 +14,8 @@ <%= include('/elements/xmlhttp.html', 'method' => 'POST', 'url' => $action, - 'subs' => [ $key.'start_job' ], + 'subs' => [ 'start_job' ], + 'key' => $key, ) %> diff --git a/httemplate/elements/xmlhttp.html b/httemplate/elements/xmlhttp.html index 28130e501..e03438822 100644 --- a/httemplate/elements/xmlhttp.html +++ b/httemplate/elements/xmlhttp.html @@ -4,6 +4,7 @@ my $url = $opt{'url'}; my $method = exists($opt{'method'}) ? $opt{'method'} : 'GET'; #my @subs = @{ $opt{'subs'}; + my $key = exists($opt{'key'}) ? $opt{'key'} : ''; $url .= ( ($url =~ /\?/) ? '&' : '?' ) if $method eq 'GET'; @@ -38,10 +39,10 @@ %> - function <%=$func%>() { + function <%=$key%><%=$func%>() { // count args; build URL var url = "<%=$furl%>"; - var a = <%=$func%>.arguments; + var a = <%=$key%><%=$func%>.arguments; var args; var len; diff --git a/httemplate/misc/email_invoice_events.cgi b/httemplate/misc/email_invoice_events.cgi index b5e66d5ac..3a39bcd19 100644 --- a/httemplate/misc/email_invoice_events.cgi +++ b/httemplate/misc/email_invoice_events.cgi @@ -1,6 +1,3 @@ <% - my $server = new FS::UI::Web::JSRPC 'FS::cust_bill_event::process_reemail', $cgi; -$server->process; - -%> +%><%= $server->process %> diff --git a/httemplate/misc/email_invoices.cgi b/httemplate/misc/email_invoices.cgi index bd231261c..490c42f52 100644 --- a/httemplate/misc/email_invoices.cgi +++ b/httemplate/misc/email_invoices.cgi @@ -1,6 +1,3 @@ <% - my $server = new FS::UI::Web::JSRPC 'FS::cust_bill::process_reemail', $cgi; -$server->process; - -%> +%><%= $server->process %> diff --git a/httemplate/misc/fax_invoice_events.cgi b/httemplate/misc/fax_invoice_events.cgi index 9a5e8aaea..778c4291e 100644 --- a/httemplate/misc/fax_invoice_events.cgi +++ b/httemplate/misc/fax_invoice_events.cgi @@ -1,6 +1,3 @@ -<% - +<% my $server = new FS::UI::Web::JSRPC 'FS::cust_bill_event::process_refax', $cgi; -$server->process; - -%> +%><%= $server->process %> diff --git a/httemplate/misc/fax_invoices.cgi b/httemplate/misc/fax_invoices.cgi index 24bee7da9..b3238885f 100644 --- a/httemplate/misc/fax_invoices.cgi +++ b/httemplate/misc/fax_invoices.cgi @@ -1,6 +1,3 @@ -<% - +<% my $server = new FS::UI::Web::JSRPC 'FS::cust_bill::process_refax', $cgi; -$server->process; - -%> +%><%= $server->process %> diff --git a/httemplate/misc/print_invoice_events.cgi b/httemplate/misc/print_invoice_events.cgi index 3cf4cf7c8..897c39ede 100644 --- a/httemplate/misc/print_invoice_events.cgi +++ b/httemplate/misc/print_invoice_events.cgi @@ -1,6 +1,3 @@ <% - -my $server = new FS::UI::Web::JSRPC 'FS::cust_bill_event::process_reprint', $cgi; -$server->process; - -%> +my $server = new FS::UI::Web::JSRPC 'FS::cust_bill_event::process_reprint', $cgi; %> +<%= $server->process %> diff --git a/httemplate/misc/print_invoices.cgi b/httemplate/misc/print_invoices.cgi index 6d32eaaac..218262077 100644 --- a/httemplate/misc/print_invoices.cgi +++ b/httemplate/misc/print_invoices.cgi @@ -1,6 +1,3 @@ -<% - +<% my $server = new FS::UI::Web::JSRPC 'FS::cust_bill::process_reprint', $cgi; -$server->process; - -%> +%><%= $server->process %>