X-Git-Url: http://git.freeside.biz/gitweb/?a=blobdiff_plain;f=httemplate%2Felements%2Fprogress-init.html;h=2ec248e322c01545e29f644d06c8943989dba79a;hb=ea3ce8d7f076e7fecff4be7ae63bc413adb0adf5;hp=194fc7480f593c2d60a49d294439d9848c942e4c;hpb=624b2d44625f69d71175c3348cae635d580c890b;p=freeside.git diff --git a/httemplate/elements/progress-init.html b/httemplate/elements/progress-init.html index 194fc7480..2ec248e32 100644 --- a/httemplate/elements/progress-init.html +++ b/httemplate/elements/progress-init.html @@ -1,3 +1,51 @@ +<%doc> +Example: +In misc/something.html: + +
+ + + <% include( '/elements/progress-init.html', + 'MyForm', + [ 'recordnum', 'what_to_do' ], + $p.'misc/process_something.html', + { url => $p.'where_to_go_next.html' }, + #or { message => 'Finished!' }, + #or { url => $p.'where_to_go.html', + message => 'Finished' }, + # which displays the message, then waits for confirmation before + # redirecting to the URL. + #or { popup_url => $p.'popup_contents.html' } + # which loads that URL into the popup after completion + ) %> +
+ +<%once> +my $noinit = 0; + <%init> my( $formname, $fields, $action, $url_or_message, $key ) = @_; @@ -76,6 +130,9 @@ 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"; }