X-Git-Url: http://git.freeside.biz/gitweb/?a=blobdiff_plain;f=httemplate%2Fedit%2Fprocess%2Felements%2Fprocess.html;h=a76f4befb181ee9bdc0786e182005a12606f10a8;hb=d07c72046444319e0811c6a00b504885da091992;hp=2d39e9dced551352fac55b33f64b41556692549b;hpb=a6fe07e49e3fc12169e801b1ed6874c3a5bd8500;p=freeside.git diff --git a/httemplate/edit/process/elements/process.html b/httemplate/edit/process/elements/process.html index 2d39e9dce..a76f4befb 100644 --- a/httemplate/edit/process/elements/process.html +++ b/httemplate/edit/process/elements/process.html @@ -62,6 +62,13 @@ Example: 'fields' => [qw( fieldname fieldname2 )], }, + 'process_upload' => { + 'process' => 'misc/mytable-import.html', + # fields to pass to the back end job, besides the + # primary key of the object + 'fields' => [qw( fieldname fieldname2 )], + }, + 'skip_process' => 0, #boolean, if set true, will skip the main table #add/edit processing and only run any linked table #process_ items @@ -70,6 +77,9 @@ Example: #return an error string or empty for no error 'precheck_callback' => sub { my( $cgi ) = @_; }, + #after the new object is created + 'post_new_object_callback' => sub { my( $cgi, $object ) = @_; }, + #after everything's inserted 'noerror_callback' => sub { my( $cgi, $object ) = @_; }, @@ -91,9 +101,6 @@ Example: %doc> %if ( $error ) { % -% my $edit_ext = $opt{'edit_ext'} || 'html'; -% my $url = $opt{'error_redirect'} || popurl(2)."$table.$edit_ext"; - % #my $query = $m->scomp('/elements/create_uri_query'); % #$cgi->redirect("$url?$query"); % if ( length($cgi->query_string) > 1920 ) { #stupid IE 2083 URL limit @@ -111,17 +118,68 @@ Example: % " attempting to set redirect$session to ". $cgi->query_string."\n"; % } % -<% $cgi->redirect("$url?redirect=$session") %> +<% $cgi->redirect("$error_redirect?redirect=$session") %> % % } else { % -<% $cgi->redirect("$url?". $cgi->query_string ) %> +<% $cgi->redirect("$error_redirect?". $cgi->query_string ) %> % -% } +% } % % #different ways of handling success % -%} elsif ( $opt{'popup_reload'} ) { +%} elsif ( $opt{'process_upload'} and @uploaded_files ) { +% +% # construct a form to pass all the requested fields, the +% +<& /elements/header.html &> +
+ +<& /elements/footer.html &> + +% } elsif ( $opt{'progress_init'} ) { +% # some false laziness with the above +% my ($form_name, $job_fields) = @{ $opt{'progress_init'} }; + + +<& /elements/footer.html &> + +% } elsif ( $opt{'popup_reload'} ) { <% include('/elements/header-popup.html', $opt{'popup_reload'} ) %> @@ -133,26 +191,8 @@ Example: