X-Git-Url: http://git.freeside.biz/gitweb/?a=blobdiff_plain;f=httemplate%2Fedit%2Fprocess%2Felements%2Fprocess.html;h=5b79c21bbe1e75168f4e73f04514ddcbb5b32135;hb=f3bfabe2cea97fd34610cfc6ea94c4177fcef336;hp=107b3f29833636e1f209fc2c86ab9b601cfd10a1;hpb=b5c4237a34aef94976bc343c8d9e138664fc3984;p=freeside.git diff --git a/httemplate/edit/process/elements/process.html b/httemplate/edit/process/elements/process.html index 107b3f298..5b79c21bb 100644 --- a/httemplate/edit/process/elements/process.html +++ b/httemplate/edit/process/elements/process.html @@ -2,7 +2,7 @@ Example: - include( 'elements/process.html', + <& elements/process.html, ### # required @@ -59,8 +59,20 @@ Example: 'process_o2m' => { 'table' => table_name', 'num_col' => 'column', #if column name is different in #link_table than source_table + '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 + #checks CGI params and whatever else before much else runs #return an error string or empty for no error 'precheck_callback' => sub { my( $cgi ) = @_; }, @@ -78,13 +90,16 @@ Example: 'agent_virt' => 1, 'agent_null_right' => 'Access Right Name', - ) + #special bulk insert mode + 'bulk' => 'field', + + &> %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 % % my $session = int(rand(4294967296)); #XXX @@ -100,16 +115,48 @@ 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{'process_upload'} and @uploaded_files ) { +% +% # construct a form to pass all the requested fields, the +% +<& /elements/header.html &> +
+ +<& /elements/footer.html &> + %} elsif ( $opt{'popup_reload'} ) { <% include('/elements/header-popup.html', $opt{'popup_reload'} ) %> @@ -122,26 +169,8 @@ Example: