default to a session cookie instead of setting an explicit timeout, weird timezone...
[freeside.git] / httemplate / edit / process / cgp_rule.html
index 3880b56..5326587 100644 (file)
@@ -1,6 +1,22 @@
 <% include( 'elements/process.html',
-              'table'    => 'cgp_rule',
-              'redirect' => $redirect,
+              'table'       => 'cgp_rule',
+              'redirect'    => $redirect,
+              'process_o2m' => [
+                {
+                  'table' => 'cgp_rule_condition',
+                  'fields' => [qw( conditionname op params )],
+                },
+                {
+                  'table' => 'cgp_rule_action',
+                  'fields' => [qw( action params )],
+                },
+              ],
+              'noerror_callback' => sub {
+                my( $cgi, $object ) = @_;
+                my $error = $object->svc_export;
+                #shit, not a good place for error handling :/
+                die $error if $error;
+              },
           )
 %>
 <%init>