diff options
Diffstat (limited to 'httemplate/elements/progress-init.html')
-rw-r--r-- | httemplate/elements/progress-init.html | 42 |
1 files changed, 0 insertions, 42 deletions
diff --git a/httemplate/elements/progress-init.html b/httemplate/elements/progress-init.html index 8b8da66c8..194fc7480 100644 --- a/httemplate/elements/progress-init.html +++ b/httemplate/elements/progress-init.html @@ -1,45 +1,3 @@ -<%doc> -Example: -In misc/something.html: - - <FORM NAME="MyForm"> - <INPUT TYPE="hidden" NAME="recordnum" VALUE="42"> - <INPUT TYPE="hidden" NAME="what_to_do" VALUE="delete"> - <% 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!' }, - ) %> - </FORM> - <SCRIPT TYPE="text/javascript>process();</SCRIPT> - -In misc/process_something.html: - -<%init> -my $server = FS::UI::Web::JSRPC->new('FS::something::process_whatever', $cgi); -</%init> -<% $server->process %> - -In FS/something.pm: - -sub process_whatever { #class method - my $job = shift; - my $param = thaw(base64_decode(shift)); - # param = { 'recordnum' => 42, 'what_to_do' => delete } - # make use of this as you like - do_phase1; - $job->update_statustext(20); - do_phase2; - $job->update_statustext(40); - do_phase3; - $job->update_statustext(60); - # etc. - return 'this value will be ignored'; -} - -</%doc> <% include('/elements/xmlhttp.html', 'method' => 'POST', 'url' => $action, |