Commit da72c989 authored by Moreau Elise's avatar Moreau Elise
Browse files

add hidden field to get location information

parent 92c3f3f7
......@@ -46,6 +46,8 @@
</input>
</div>
</div>
<input type="hidden" name="longitude" id="longitude-input">
<input type="hidden" name="latitude" id="latitude-input">
<div class="field col o6">
<input type="submit" class="ui submit button">
</div>
......@@ -56,7 +58,8 @@
if (!navigator.geolocation) { return; }
navigator.geolocation.getCurrentPosition(function(position) {
console.log(position.coords.latitude, position.coords.longitude);
$('#latitude-input').val(position.coords.latitude);
$('#longitude-input').val(position.coords.longitude);
});
});
</script>
......
......@@ -16,6 +16,11 @@
<button type="submit" class="ui button"><i class="edit icon"></i></button>
</form>
<button class="ui button" id="delete_user_button"><i class="trash icon"></i></button>
<form action="/account/location" method="post">
<input type="hidden" name="longitude" id="longitude-input">
<input type="hidden" name="latitude" id="latitude-input">
<button type="submit" class="ui disabled button" id="location-button"><i class="street view icon"></i></button>
</form>
{% endif %}
</div>
</div>
......@@ -26,7 +31,7 @@
<div class="col s12 m12 l12 xl12 ">
<h2> Groups </h2>
<div class="ui relaxed divided list" style="overflow:scroll">
<div class="ui relaxed divided list" style="overflow:scroll; min-height: 300px;">
{% for group in user.getGroups %}
{% if not group.isPrivate %}
<div class="item">
......
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