X-Git-Url: http://git.freeside.biz/gitweb/?a=blobdiff_plain;f=httemplate%2Felements%2Fprogress-init.html;h=194fc7480f593c2d60a49d294439d9848c942e4c;hb=70569273833d91085c6c562865a78a08ddde49a1;hp=7edb831c570d59be47d13e5c22c0b448e9ecbac5;hpb=d6047391feb3236374e16fd73240d9821d77fe06;p=freeside.git diff --git a/httemplate/elements/progress-init.html b/httemplate/elements/progress-init.html index 7edb831c5..194fc7480 100644 --- a/httemplate/elements/progress-init.html +++ b/httemplate/elements/progress-init.html @@ -1,45 +1,87 @@ -<% my( $formname, $fields, $action, $success_url ) = @_; %> +<% include('/elements/xmlhttp.html', + 'method' => 'POST', + 'url' => $action, + 'subs' => [ 'start_job' ], + 'key' => $key, + ) +%> + +<% include('/elements/init_overlib.html') %> - - + +<%init> + +my( $formname, $fields, $action, $url_or_message, $key ) = @_; +$key = '' unless defined $key; + +my $url_or_message_link; +if ( ref($url_or_message) ) { #its a message or something + $url_or_message_link = 'message='. uri_escape( $url_or_message->{'message'} ); + $url_or_message_link .= ';url='. uri_escape( $url_or_message->{'url'} ) + if $url_or_message->{'url'}; +} else { + $url_or_message_link = "url=$url_or_message"; +} + +#stupid safari is caching the "location" of popup iframs, and submitting them +#instead of displaying them. this should prevent that. +my $popup_name = 'popup-'.time. "-$$-". rand() * 2**32; + +