X-Git-Url: http://git.freeside.biz/gitweb/?a=blobdiff_plain;ds=sidebyside;f=httemplate%2Felements%2Fprogress-init.html;h=cef54b824faf6e3ab28da31ae5f38a20680cfa72;hb=54a357b171aa44f9399b4c146acd2afd3b686075;hp=3894feef93a68b2a54ab75c7caa1959c7b551250;hpb=c8cccb4a92adceb943c635fe62dad0d034462ce0;p=freeside.git diff --git a/httemplate/elements/progress-init.html b/httemplate/elements/progress-init.html index 3894feef9..cef54b824 100644 --- a/httemplate/elements/progress-init.html +++ b/httemplate/elements/progress-init.html @@ -1,17 +1,51 @@ -% -% 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'} ) -% } else { -% $url_or_message_link = "url=$url_or_message"; -% } -% +<%doc> +Example: +In misc/something.html: +
+ - + +<& /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'}; + $url_or_message_link = 'popup_url=' .uri_escape( $url_or_message->{'popup_url'} ) + if $url_or_message->{'popup_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; + +%init>