#204 Reset button group when closing w/out saving
This commit is contained in:
parent
1efb9b69b5
commit
73264a6af0
@ -913,7 +913,7 @@ require_once(HESK_PATH . 'inc/show_admin_nav.inc.php');
|
||||
<input type="submit" class="btn btn-success"
|
||||
value="<?php echo $hesklang['save_location']; ?>">
|
||||
<button class="btn btn-default" data-dismiss="modal"
|
||||
onclick="resetLatLon(<?php echo $ticket['latitude']; ?>, <?php echo $ticket['longitude']; ?>)">
|
||||
onclick="closeAndReset(<?php echo $ticket['latitude']; ?>, <?php echo $ticket['longitude']; ?>)">
|
||||
<?php echo $hesklang['close_modal_without_saving']; ?>
|
||||
</button>
|
||||
</div>
|
||||
|
@ -143,6 +143,12 @@ function resetLatLon(lat, lon) {
|
||||
marker.setLatLng(L.latLng(lat, lon));
|
||||
}
|
||||
|
||||
function closeAndReset(lat, lon) {
|
||||
$('#save-group').hide();
|
||||
$('#close-button').show();
|
||||
resetLatLon(lat, lon);
|
||||
}
|
||||
|
||||
function initializeMapForStaff(latitude, longitude, usersLocationText) {
|
||||
map = L.map('map').setView([latitude, longitude], 15);
|
||||
L.tileLayer('http://{s}.tile.osm.org/{z}/{x}/{y}.png', {
|
||||
|
Loading…
x
Reference in New Issue
Block a user