diff options
Diffstat (limited to 'httemplate')
-rw-r--r-- | httemplate/elements/progress-popup.html | 8 | ||||
-rwxr-xr-x | httemplate/search/report_newtax.html | 11 | ||||
-rwxr-xr-x | httemplate/search/report_queued_newtax.cgi | 12 |
3 files changed, 20 insertions, 11 deletions
diff --git a/httemplate/elements/progress-popup.html b/httemplate/elements/progress-popup.html index 8a55efb4a..a29210201 100644 --- a/httemplate/elements/progress-popup.html +++ b/httemplate/elements/progress-popup.html @@ -69,6 +69,14 @@ function updateStatus( status_statustext ) { alert('job done but no url or message specified'); % } + } else if ( status.indexOf('done') > -1 ) { + + document.getElementById("progress_message").innerHTML = "Loading report"; + document.getElementById("progress_bar").innerHTML = ''; + document.getElementById("progress_percent").innerHTML = ''; + document.getElementById("progress_jobnum").innerHTML = ''; + window.top.location.href = statustext.substr(8, statustext.length-18); + } else if ( status.indexOf('error') > -1 ) { document.getElementById("progress_message").innerHTML = '<FONT SIZE="+1" COLOR="#FF0000">Error: ' + statustext + '</FONT>'; document.getElementById("progress_bar").innerHTML = ''; diff --git a/httemplate/search/report_newtax.html b/httemplate/search/report_newtax.html index 2588b48d3..da39b0c4d 100755 --- a/httemplate/search/report_newtax.html +++ b/httemplate/search/report_newtax.html @@ -1,6 +1,6 @@ <% include('/elements/header.html', 'Tax Report' ) %> -<FORM ACTION="report_queued_newtax.cgi" METHOD="GET"> +<FORM NAME="newtax"> <TABLE> @@ -10,10 +10,17 @@ </TABLE> -<BR><INPUT TYPE="submit" VALUE="Get Report"> +<BR><INPUT TYPE="button" VALUE="Get Report" onClick="document.newtax.submit.disabled=true; process();"> </FORM> +<% include( '/elements/progress-init.html', + 'newtax', + [ qw( agentnum beginning ending ) ], + 'report_queued_newtax.cgi', + ) +%> + <% include('/elements/footer.html') %> <%init> diff --git a/httemplate/search/report_queued_newtax.cgi b/httemplate/search/report_queued_newtax.cgi index 1d5813ece..a375fce62 100755 --- a/httemplate/search/report_queued_newtax.cgi +++ b/httemplate/search/report_queued_newtax.cgi @@ -1,16 +1,10 @@ -<% include("/elements/header.html", "Queue Tax Report") %> -<% include("/elements/error.html") %> -% unless ($error) { - <CENTER> - Report queued. Check the job queue for status. - </CENTER> -% } -<% include("/elements/footer.html") %> +<% $server->process %> <%init> die "access denied" unless $FS::CurrentUser::CurrentUser->access_right('Financial reports'); -my $error = FS::tax_rate::queue_liability_report($cgi); +my $server = + new FS::UI::Web::JSRPC 'FS::tax_rate::queue_liability_report', $cgi; </%init> |