projects
/
freeside.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
debug
[freeside.git]
/
httemplate
/
elements
/
progress-popup.html
diff --git
a/httemplate/elements/progress-popup.html
b/httemplate/elements/progress-popup.html
index
73440bb
..
a37cf24
100644
(file)
--- 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 $message = $cgi->param('message');
% my $popup_url = $cgi->param('popup_url');
% my $formname = scalar($cgi->param('formname'));
+% my $error_url = $cgi->param('error_url');
%
<HTML>
%
<HTML>
@@
-62,13
+63,14
@@
function updateStatus( status_statustext ) {
}
% }
}
% }
-% } elsif ( $url ) {
-
+% } elsif ( $url ) {
+ parent.nd(1);
window.top.location.href = '<% $url %>';
% } elsif ( $popup_url ) {
document.location.replace('<% $popup_url %>');
% } else {
window.top.location.href = '<% $url %>';
% } elsif ( $popup_url ) {
document.location.replace('<% $popup_url %>');
% } else {
+
alert('job done but no url or message specified');
% }
} else if ( status.indexOf('done') > -1 ) {
alert('job done but no url or message specified');
% }
} else if ( status.indexOf('done') > -1 ) {
@@
-80,9
+82,16
@@
function updateStatus( status_statustext ) {
window.top.location.href = statustext.substr(8, statustext.length-18);
} else if ( status.indexOf('error') > -1 ) {
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 = '<FONT SIZE="+1" COLOR="#FF0000">Error: ' + statustext + '</FONT>';
document.getElementById("progress_bar").innerHTML = '';
document.getElementById("progress_message").innerHTML = '<FONT SIZE="+1" COLOR="#FF0000">Error: ' + statustext + '</FONT>';
document.getElementById("progress_bar").innerHTML = '';
- document.getElementById("progress_percent").innerHTML = '<INPUT TYPE="button" VALUE="OK" onClick="
parent.nd(1);
">';
+ document.getElementById("progress_percent").innerHTML = '<INPUT TYPE="button" VALUE="OK" onClick="
<% $onClick %>
">';
document.getElementById("progress_jobnum").innerHTML = '';
if ( parent.document.<%$formname%>.submit.disabled == true ) {
parent.document.<%$formname%>.submit.disabled=false;
document.getElementById("progress_jobnum").innerHTML = '';
if ( parent.document.<%$formname%>.submit.disabled == true ) {
parent.document.<%$formname%>.submit.disabled=false;