default census_year to 2012 going forward, for 2010 census tracts
[freeside.git] / httemplate / edit / cust_main / bottomfixup.js
index 2f7839a..bcddd7e 100644 (file)
@@ -2,7 +2,7 @@ function bottomfixup(what) {
 
 %# ../cust_main.cgi
   var layervars = new Array(
-    'payauto',
+    'payauto', 'billday',
     'payinfo', 'payinfo1', 'payinfo2', 'payinfo3', 'paytype',
     'payname', 'paystate', 'exp_month', 'exp_year', 'paycvv',
     'paystart_month', 'paystart_year', 'payissue',
@@ -37,11 +37,11 @@ function post_geocode() {
   var cf = document.CustomerForm;
   var state_el = cf.elements['ship_state'];
   var census_data = new Array(
-    'year',   <% $conf->config('census_year') || '2011' %>,
-    'address', cf.elements['ship_address1'].value,
-    'city',    cf.elements['ship_city'].value,
-    'state',   state_el.options[ state_el.selectedIndex ].value,
-    'zip',     cf.elements['ship_zip'].value
+    'year',     <% $conf->config('census_year') || '2012' %>,
+    'address1', cf.elements['ship_address1'].value,
+    'city',     cf.elements['ship_city'].value,
+    'state',    state_el.options[ state_el.selectedIndex ].value,
+    'zip',      cf.elements['ship_zip'].value
   );
 
   censustract( census_data, update_censustract );
@@ -62,16 +62,17 @@ function update_censustract(arg) {
 
   var cf = document.CustomerForm;
 
-  var msacode    = argsHash['msacode'];
+/*  var msacode    = argsHash['msacode'];
   var statecode  = argsHash['statecode'];
   var countycode = argsHash['countycode'];
   var tractcode  = argsHash['tractcode'];
-  var error      = argsHash['error'];
   
   var newcensus = 
     new String(statecode)  +
     new String(countycode) +
-    new String(tractcode).replace(/\s$/, '');  // JSON 1 workaround
+    new String(tractcode).replace(/\s$/, '');  // JSON 1 workaround */
+  var error      = argsHash['error'];
+  var newcensus  = argsHash['censustract'];
 
   set_censustract = function () {
 
@@ -89,12 +90,12 @@ function update_censustract(arg) {
     var choose_censustract =
       '<CENTER><BR><B>Confirm censustract</B><BR>' +
       '<A href="http://maps.ffiec.gov/FFIECMapper/TGMapSrv.aspx?' +
-      'census_year=<% $conf->config('census_year') || '2008' %>' +
+      'census_year=<% $conf->config('census_year') || '2012' %>' +
       '&latitude=' + cf.elements['latitude'].value +
       '&longitude=' + cf.elements['longitude'].value +
       '" target="_blank">Map service module location</A><BR>' +
       '<A href="http://maps.ffiec.gov/FFIECMapper/TGMapSrv.aspx?' +
-      'census_year=<% $conf->config('census_year') || '2008' %>' +
+      'census_year=<% $conf->config('census_year') || '2012' %>' +
       '&zip_code=' + cf.elements['ship_zip'].value +
       '" target="_blank">Map zip code center</A><BR><BR>' +
       '<TABLE>';