default to a session cookie instead of setting an explicit timeout, weird timezone...
[freeside.git] / httemplate / edit / process / part_fee.html
index 6d17863..075cdee 100755 (executable)
@@ -1,5 +1,5 @@
 <& elements/process.html,
-  'debug'             => 1,
+  #'debug'             => 1,
   'table'             => 'part_fee',
   'agent_virt'        => 1,
   'agent_null_right'  => 'Edit global fee definitions',
@@ -17,6 +17,7 @@
                                            ],
                            },
                          ],
+  'precheck_callback'=> \&precheck,
 &>
 <%init>
 
@@ -26,4 +27,13 @@ my $acl_edit_global = $curuser->access_right('Edit global fee definitions');
 die "access denied"
   unless $acl_edit or $acl_edit_global;
 
+sub precheck {
+  my $cgi = shift;
+  if ( $cgi->param('basis') =~ /^(\w+)$/ ) {
+    my $basis = $1;
+    $cgi->param('percent', $cgi->param($basis.'_percent') );
+  }
+  ''; #no error
+}
+
 </%init>