X-Git-Url: http://git.freeside.biz/gitweb/?a=blobdiff_plain;f=httemplate%2Fedit%2Fprocess%2Felements%2Fprocess.html;h=19110e18b654b6db03a6bda96c62fcb0c0b66f85;hb=ce530564cdf3182e547652c7550e8e3676e61e01;hp=1711b0118fcacedb4bf3a2fb17a87bb5f63c4583;hpb=a9056b16e215e7ac8da9144106e34918cced951f;p=freeside.git diff --git a/httemplate/edit/process/elements/process.html b/httemplate/edit/process/elements/process.html index 1711b0118..19110e18b 100644 --- a/httemplate/edit/process/elements/process.html +++ b/httemplate/edit/process/elements/process.html @@ -34,6 +34,11 @@ Example: 'clear_on_error' => [ 'form_field1', 'form_field2', ... ], + ## message will be returned to redirect page as cookie and read by header.html + ## append =status, =warning, =error to change color of message box. Default is status + ## status is green, warning is yellow, and error is red + 'message' => [ 'My message=status', 'Please restart=warning' ], + #pass an arrayref of hashrefs for multiple m2ms or m2names #be certain you incorporate m2m_Common if you see error: param @@ -208,7 +213,16 @@ process(); %} else { -<% $cgi->redirect($redirect) %> +% my $cookie; +% $cookie = CGI::Cookie->new( +% -name => 'freeside_status', +% -value => $messages, +% -expires => '+5m', +% ) if $messages; + <% $cgi->redirect( -uri => $redirect, + -cookie => $cookie, + ) + %> %} <%init> @@ -510,6 +524,8 @@ if ( !$error ) { } } +my $messages = $opt{'message'} ? $opt{'message'} : ''; + my $edit_ext = $opt{'edit_ext'} || 'html'; my $error_redirect = $opt{'error_redirect'} || popurl(2)."$table.$edit_ext";