Bug fix for geocoding in add events.
authorSteve Sutton <steve@gaslightmedia.com>
Thu, 22 Dec 2016 19:59:54 +0000 (14:59 -0500)
committerSteve Sutton <steve@gaslightmedia.com>
Thu, 22 Dec 2016 19:59:54 +0000 (14:59 -0500)
Need to pull the value of the select field and not the text label in
option selected to get the state for the geolocation to work correctly.

index.php
views/admin/events/edit.html

index fe6b5e6..6da2450 100644 (file)
--- a/index.php
+++ b/index.php
@@ -3,7 +3,7 @@
  * Plugin Name: GLM Members Database Events
  * Plugin URI: http://www.gaslightmedia.com/
  * Description: Gaslight Media Members Database.
- * Version: 1.5.9
+ * Version: 1.5.10
  * Author: Chuck Scott
  * Author URI: http://www.gaslightmedia.com/
  * License: GPL2
@@ -20,7 +20,7 @@
  * @package glmMembersDatabaseEventsAddOn
  * @author Chuck Scott <cscott@gaslightmedia.com>
  * @license http://www.gaslightmedia.com Gaslightmedia
- * @version 1.5.9
+ * @version 1.5.10
  */
 
 /*
@@ -38,7 +38,7 @@
  *  so that we're sure the other add-ons see an up to date
  *  version from this plugin.
  */
-define('GLM_MEMBERS_EVENTS_PLUGIN_VERSION', '1.5.9');
+define('GLM_MEMBERS_EVENTS_PLUGIN_VERSION', '1.5.10');
 define('GLM_MEMBERS_EVENTS_PLUGIN_DB_VERSION', '0.1.1');
 
 // This is the minimum version of the GLM Members DB plugin require for this plugin.
index c0a2477..040ce5c 100644 (file)
                 var geoAddr1 = $('#address_' + locID ).val().trim();
                 var geoAddr2 = '';  // $('#addr2').val().trim();
                 var geoCity = $('#city_' + locID).find('option:selected').text().trim();
-                var geoState = $('#state_' + locID).find('option:selected').text().trim();
+                var geoState = $('#state_' + locID).val();
                 var geoZIP = $('#zip_' + locID).val().trim();
                 var geoCountry = $('#country_' + locID).find('option:selected').text().trim();