X-Git-Url: http://git.freeside.biz/gitweb/?a=blobdiff_plain;f=httemplate%2Felements%2Fprogress-popup.html;fp=httemplate%2Felements%2Fprogress-popup.html;h=a37cf24ebecc857b054f35bd97a65bf0858a4321;hb=f041c3f6e17bdacf8ad6b0da87342ef84e7db404;hp=2d273880c642f60547c4310ef4e9523b98c1eb80;hpb=63e6a91136d87591d57a7f4e006dbfb41906a02c;p=freeside.git diff --git a/httemplate/elements/progress-popup.html b/httemplate/elements/progress-popup.html index 2d273880c..a37cf24eb 100644 --- a/httemplate/elements/progress-popup.html +++ b/httemplate/elements/progress-popup.html @@ -4,6 +4,7 @@ % my $message = $cgi->param('message'); % my $popup_url = $cgi->param('popup_url'); % my $formname = scalar($cgi->param('formname')); +% my $error_url = $cgi->param('error_url'); % @@ -62,7 +63,7 @@ function updateStatus( status_statustext ) { } % } -% } elsif ( $url ) { +% } elsif ( $url ) { parent.nd(1); window.top.location.href = '<% $url %>'; % } elsif ( $popup_url ) { @@ -81,9 +82,16 @@ function updateStatus( status_statustext ) { window.top.location.href = statustext.substr(8, statustext.length-18); } else if ( status.indexOf('error') > -1 ) { +% +% # default behavior: just close the popup +% my $onClick = 'parent.nd(1);'; +% if ( $error_url ) { # then on clicking to confirm, redirect somewhere +% $onClick = "window.top.location.href = \\'$error_url\\';"; +% } + document.getElementById("progress_message").innerHTML = 'Error: ' + statustext + ''; document.getElementById("progress_bar").innerHTML = ''; - document.getElementById("progress_percent").innerHTML = ''; + document.getElementById("progress_percent").innerHTML = ''; document.getElementById("progress_jobnum").innerHTML = ''; if ( parent.document.<%$formname%>.submit.disabled == true ) { parent.document.<%$formname%>.submit.disabled=false;