#204 Allow staff to see "friendly" street name

merge-requests/2/head
Mike Koch 9 years ago
parent cbdb8e9f12
commit 259e8d79a0

@ -903,6 +903,12 @@ require_once(HESK_PATH . 'inc/show_admin_nav.inc.php');
<div class="modal-body"> <div class="modal-body">
<?php if ($hasLocation): ?> <?php if ($hasLocation): ?>
<div id="map" style="height: 500px"></div><br> <div id="map" style="height: 500px"></div><br>
<address id="friendly-location" style="font-size: 13px"></address>
<p id="save-for-address" style="font-size: 13px;display:none"><?php echo $hesklang['save_to_see_updated_address']; ?></p>
<script>
getFriendlyLocation(<?php echo $ticket['latitude']; ?>,
<?php echo $ticket['longitude']; ?>);
</script>
<div class="row"> <div class="row">
<form action="admin_ticket.php" method="post" role="form"> <form action="admin_ticket.php" method="post" role="form">
<input type="hidden" name="track" value="<?php echo $trackingID; ?>"> <input type="hidden" name="track" value="<?php echo $trackingID; ?>">

@ -182,6 +182,8 @@ function initializeMapForStaff(latitude, longitude, usersLocationText) {
setLatLon(event.target.getLatLng().lat, event.target.getLatLng().lng); setLatLon(event.target.getLatLng().lat, event.target.getLatLng().lng);
$('#save-group').show(); $('#save-group').show();
$('#close-button').hide(); $('#close-button').hide();
$('#friendly-location').hide();
$('#save-for-address').show();
}); });
$('#map-modal').on('shown.bs.modal', function(){ $('#map-modal').on('shown.bs.modal', function(){
@ -191,4 +193,11 @@ function initializeMapForStaff(latitude, longitude, usersLocationText) {
}); });
} }
function getFriendlyLocation(latitude, longitude) {
var URL = 'http://nominatim.openstreetmap.org/reverse?format=json&lat='+ latitude +'&lon='+ longitude +'&zoom=15&addressdetails=1';
$.getJSON(URL, function(data) {
$('#friendly-location').text(data.display_name);
});
}
jQuery(document).ready(loadJquery); jQuery(document).ready(loadJquery);

@ -65,6 +65,7 @@ $hesklang['location_colon'] = 'Location:';
$hesklang['your_current_location'] = 'Your location'; $hesklang['your_current_location'] = 'Your location';
$hesklang['requesting_location_ellipsis'] = 'Requesting location...'; $hesklang['requesting_location_ellipsis'] = 'Requesting location...';
$hesklang['unable_to_determine_location'] = 'Unable to determine your location, or you declined to share it.'; $hesklang['unable_to_determine_location'] = 'Unable to determine your location, or you declined to share it.';
$hesklang['save_to_see_updated_address'] = 'Save the new location to see the updated address';
// ADDED OR MODIFIED IN Mods for HESK 2.2.1 // ADDED OR MODIFIED IN Mods for HESK 2.2.1
$hesklang['popart_no_colon']='Top Knowledgebase Articles'; // same as $hesklang['popart'] but without a colon (:) $hesklang['popart_no_colon']='Top Knowledgebase Articles'; // same as $hesklang['popart'] but without a colon (:)

Loading…
Cancel
Save