[freeside-commits] branch FREESIDE_4_BRANCH updated. aa0e7222dae7df139688480534cb3cd10c84e227

Christopher Burger burgerc at 420.am
Tue Aug 29 04:32:45 PDT 2017


The branch, FREESIDE_4_BRANCH has been updated
       via  aa0e7222dae7df139688480534cb3cd10c84e227 (commit)
      from  9c036d4afb4f0709e7baf6e94931262a88573701 (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 aa0e7222dae7df139688480534cb3cd10c84e227
Author: Christopher Burger <burgerc at freeside.biz>
Date:   Mon Aug 28 11:50:25 2017 -0400

    RT# 77200 - Changed fixed active date to a user input date

diff --git a/httemplate/edit/deploy_zone-fixed.html b/httemplate/edit/deploy_zone-fixed.html
index b8d9f8b..24e03b0 100644
--- a/httemplate/edit/deploy_zone-fixed.html
+++ b/httemplate/edit/deploy_zone-fixed.html
@@ -19,6 +19,7 @@
         'file'            => 'Import blocks from text file',
         'censusyear'      => 'as census year',
     },
+
     'fields'        => [
         { field         => 'zonetype',
           type          => 'hidden',
@@ -30,8 +31,11 @@
         },
         'description',
         { field         => 'active_date',
-          type          => 'fixed-date',
-          value         => time,
+          type          => 'input-date-field',
+          curr_value_callback => sub {
+            my ($cgi, $object) = @_;
+            $cgi->param('active_date') || $object->active_date || time;
+          },
         },
         { field         => 'agentnum',
           type          => 'select-agent',
diff --git a/httemplate/edit/deploy_zone-mobile.html b/httemplate/edit/deploy_zone-mobile.html
index 8cec298..e7f534c 100644
--- a/httemplate/edit/deploy_zone-mobile.html
+++ b/httemplate/edit/deploy_zone-mobile.html
@@ -23,8 +23,11 @@
         },
         'description',
         { field         => 'active_date',
-          type          => 'fixed-date',
-          value         => time,
+          type          => 'input-date-field',
+          curr_value_callback => sub {
+            my ($cgi, $object) = @_;
+            $cgi->param('active_date') || $object->active_date || time;
+          },
         },
         { field         => 'agentnum',
           type          => 'select-agent',
diff --git a/httemplate/edit/process/deploy_zone-fixed.html b/httemplate/edit/process/deploy_zone-fixed.html
index 0033bbe..b22e630 100644
--- a/httemplate/edit/process/deploy_zone-fixed.html
+++ b/httemplate/edit/process/deploy_zone-fixed.html
@@ -28,6 +28,10 @@ my $precheck_callback = sub {
       $i++;
     }
   }
+  if ( length $cgi->param('active_date') ) {
+    my $date = parse_datetime( $cgi->param('active_date') );
+    $cgi->param('active_date', $date);
+  }
   '';
 };
 </%init>
diff --git a/httemplate/edit/process/deploy_zone-mobile.html b/httemplate/edit/process/deploy_zone-mobile.html
index d36d5d4..9b205ab 100644
--- a/httemplate/edit/process/deploy_zone-mobile.html
+++ b/httemplate/edit/process/deploy_zone-mobile.html
@@ -21,6 +21,10 @@ my $precheck_callback = sub {
       $i++;
     }
   }
+  if ( length $cgi->param('active_date') ) {
+    my $date = parse_datetime( $cgi->param('active_date') );
+    $cgi->param('active_date', $date);
+  }
   '';
 };
 </%init>

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

Summary of changes:
 httemplate/edit/deploy_zone-fixed.html          |    8 ++++++--
 httemplate/edit/deploy_zone-mobile.html         |    7 +++++--
 httemplate/edit/process/deploy_zone-fixed.html  |    4 ++++
 httemplate/edit/process/deploy_zone-mobile.html |    4 ++++
 4 files changed, 19 insertions(+), 4 deletions(-)




More information about the freeside-commits mailing list