From: Chuck Scott Date: Thu, 6 Dec 2018 21:06:28 +0000 (-0500) Subject: Fixed SQL error when submitting member info after a failed submit when no counties... X-Git-Tag: v2.11.0^2~46 X-Git-Url: http://cvs2.gaslightmedia.com/gitweb/?a=commitdiff_plain;h=5df8b83486fcaa4f3b832316d6774080cd384710;p=WP-Plugins%2Fglm-member-db.git Fixed SQL error when submitting member info after a failed submit when no counties listed. --- diff --git a/views/admin/member/memberInfo/editProfileAddress.html b/views/admin/member/memberInfo/editProfileAddress.html index d4dba382..409183ab 100755 --- a/views/admin/member/memberInfo/editProfileAddress.html +++ b/views/admin/member/memberInfo/editProfileAddress.html @@ -53,6 +53,7 @@

County:

@@ -147,13 +148,13 @@ /* * Map operations */ - + var startLat = $('#glmLat').val(); var startLon = $('#glmLng').val(); var defZoom = Number({$settings.maps_default_zoom}); - - {if $settings.selected_map_interface == 1} - + + {if $settings.selected_map_interface == 1} + /* * Leaflet Map * API reference: https://leafletjs.com/reference-1.3.2.html @@ -168,7 +169,7 @@ var leafletMinZoom = 5; var leafletMaxZoom = 18; var geocoder; - + // Tile server L.tileLayer(leafletTileServer, { attribution: 'Map data © OpenStreetMap contributors, CC-BY-SA, Imagery © Gaslight Media', @@ -176,20 +177,20 @@ maxZoom: leafletMaxZoom, id: 'nothot' }).addTo(leafletMap); - + // Marker var leafletMarker = L.marker([startLat, startLon], { draggable: true }).addTo(leafletMap); - + // Marker Drag/Drop action leafletMarker.on('dragend', function(event){ var marker = event.target; var position = marker.getLatLng(); - + marker.setLatLng(new L.LatLng(position.lat, position.lng),{ draggable:'true' }); leafletMap.panTo(new L.LatLng(position.lat, position.lng)) - + // Assign it to the lat/lon fields for submission $('#glmLat').val(position.lat.toFixed(6)); $('#glmLng').val(position.lng.toFixed(6)); @@ -238,15 +239,15 @@ if( !data[0] || !data[0].lat || !data[0].lon ) { alert(addressMapFail); } else { - assignNewPosition(data); + assignNewPosition(data); alert('We were unable to match all of your address data but did find this location.\n\n' + data[0].display_name + '\n\nPlease check that it is correct and adjust as needed by dragging the map pointer.\nYou may also want to check the city selected in the address.'); } }); } else { - assignNewPosition(data); + assignNewPosition(data); } - }); - + }); + }); // Assign a position found by the Nominatim search above @@ -276,8 +277,8 @@ {/if} - {if $settings.selected_map_interface == 2} - + {if $settings.selected_map_interface == 2} + /* * Google Maps * API reference: https://developers.google.com/maps/documentation/javascript/reference @@ -404,7 +405,7 @@ } }); } - + {/if} @@ -412,7 +413,7 @@ $(window).load(function(){ initMap(); }); - + });