default to a session cookie instead of setting an explicit timeout, weird timezone...
[freeside.git] / httemplate / edit / process / cgp_rule.html
1 <% include( 'elements/process.html',
2               'table'       => 'cgp_rule',
3               'redirect'    => $redirect,
4               'process_o2m' => [
5                 {
6                   'table' => 'cgp_rule_condition',
7                   'fields' => [qw( conditionname op params )],
8                 },
9                 {
10                   'table' => 'cgp_rule_action',
11                   'fields' => [qw( action params )],
12                 },
13               ],
14               'noerror_callback' => sub {
15                 my( $cgi, $object ) = @_;
16                 my $error = $object->svc_export;
17                 #shit, not a good place for error handling :/
18                 die $error if $error;
19               },
20           )
21 %>
22 <%init>
23
24 my $redirect = sub {
25   my($cgi, $new) = @_;
26   my $svcnum = $new->svcnum;
27   popurl(3)."browse/cgp_rule.html?svcnum=$svcnum;rulenum=";
28 };
29
30 </%init>