default to a session cookie instead of setting an explicit timeout, weird timezone...
[freeside.git] / httemplate / edit / process / svc_circuit.html
index d28f913..06cd7e7 100644 (file)
@@ -1,11 +1,23 @@
 <& elements/svc_Common.html,
     table       => 'svc_circuit',
     edit_ext    => 'html',
-    redirect    => popurl(3)."view/svc_circuit.html?",
+    redirect    => popurl(3)."view/svc_circuit.cgi?",
+    precheck_callback => $precheck,
 &>
 <%init>
 
 die "access denied"
   unless $FS::CurrentUser::CurrentUser->access_right('Provision customer service'); #something else more specific?
 
+my $precheck = sub {
+  my $cgi = shift;
+  foreach ('desired_due_date', 'due_date') {
+    if ( length $cgi->param($_) ) {
+      my $date = parse_datetime( $cgi->param($_) );
+      $cgi->param($_, $date);
+    }
+  }
+  return;
+};
+
 </%init>