X-Git-Url: http://git.freeside.biz/gitweb/?a=blobdiff_plain;f=httemplate%2Fedit%2Fprocess%2Felements%2Fprocess.html;h=f927eae4af1627929efea5ec1a2779cb5775cd83;hb=19d49567b9f1e07459253f28a41da121bd48811c;hp=7933717b01042df9e97ab194012d08b8cf905739;hpb=d616680361b7e453260fa1eb062f016982f8e836;p=freeside.git diff --git a/httemplate/edit/process/elements/process.html b/httemplate/edit/process/elements/process.html index 7933717b0..f927eae4a 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 @@ -477,9 +482,11 @@ foreach my $value ( @values ) { if ($class eq "FS::tower") { foreach my $part_svc_broadband_export ( FS::tower_sector->part_export_svc_broadband ) { if ($part_svc_broadband_export and $part_svc_broadband_export->can('export_tower_sector')) { - $error = $part_svc_broadband_export->export_tower_sector($new); + my $export_tower = $part_svc_broadband_export->export_tower_sector($new); + $error = $export_tower->{'error'} if $export_tower; } } + $cgi->param('error', $error) if $error; } # set up redirect URLs @@ -504,6 +511,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";