Commit 5ab17cdf authored by Leonidas Poulopoulos's avatar Leonidas Poulopoulos
Browse files

Added a check to keep existing address name in corresponding field

parent 10e9ee83
...@@ -31,7 +31,7 @@ ...@@ -31,7 +31,7 @@
var map = ''; var map = '';
var marker = ''; var marker = '';
var getOnce = false; var getOnce = false;
function setPositionValues(position) { function setPositionValues(position) {
$("#id_longitude").val(''); $("#id_longitude").val('');
$("#id_latitude").val(''); $("#id_latitude").val('');
...@@ -181,7 +181,9 @@ ...@@ -181,7 +181,9 @@
}); });
marker.setMap(map); marker.setMap(map);
{% if not form.instance.latitude %}
setPositionValues(latlng); setPositionValues(latlng);
{% endif %}
} }
google.maps.event.addListener(map, 'idle', function() { google.maps.event.addListener(map, 'idle', function() {
...@@ -207,7 +209,7 @@ ...@@ -207,7 +209,7 @@
$(document).ready(function() { $(document).ready(function() {
initialize(); initialize();
$("div.controls > ul").addClass('unstyled'); $("div.controls > ul").addClass('unstyled');
$("#updatemap").click(function(){ $("#updatemap").click(function(){
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment