[freeside-commits] branch master updated. 96419278c8a1370b34246515591f0b620adb94c2

Mark Wells mark at 420.am
Wed Dec 31 15:04:59 PST 2014


The branch, master has been updated
       via  96419278c8a1370b34246515591f0b620adb94c2 (commit)
      from  1be5d7ada63dc18682e4b6747c66bfed4f34945c (commit)

Those revisions listed above that are new to this repository have
not appeared on any other notification email; so we list those
revisions in full, below.

- Log -----------------------------------------------------------------
commit 96419278c8a1370b34246515591f0b620adb94c2
Author: Mark Wells <mark at freeside.biz>
Date:   Wed Dec 31 15:04:48 2014 -0800

    fix date fields in svc_circuit, related to #30380

diff --git a/httemplate/edit/process/svc_circuit.html b/httemplate/edit/process/svc_circuit.html
index d28f913..27f43db 100644
--- a/httemplate/edit/process/svc_circuit.html
+++ b/httemplate/edit/process/svc_circuit.html
@@ -2,10 +2,22 @@
     table       => 'svc_circuit',
     edit_ext    => 'html',
     redirect    => popurl(3)."view/svc_circuit.html?",
+    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>
diff --git a/httemplate/view/svc_circuit.html b/httemplate/view/svc_circuit.html
index c8d5d23..42bfc4b 100644
--- a/httemplate/view/svc_circuit.html
+++ b/httemplate/view/svc_circuit.html
@@ -53,10 +53,10 @@ my @fields = (
     table     => 'circuit_termination',
     name_col  => 'termination',
   },
-  qw( vendor_qual_id vendor_order_id vendor_order_type vendor_order_status
-      desired_due_date due_date
-      endpoint_ip_addr
-  ),
+  qw( vendor_qual_id vendor_order_id vendor_order_type vendor_order_status ),
+  { field     => 'desired_due_date', type => 'date' },
+  { field     => 'due_date', type => 'date' },
+  'endpoint_ip_addr',
   { field     => 'endpoint_mac_addr', type => 'mac_addr' },
 );
 

-----------------------------------------------------------------------

Summary of changes:
 httemplate/edit/process/svc_circuit.html |   12 ++++++++++++
 httemplate/view/svc_circuit.html         |    8 ++++----
 2 files changed, 16 insertions(+), 4 deletions(-)




More information about the freeside-commits mailing list