Allow staff to set location

merge-requests/2/head
Mike Koch 9 years ago
parent 836aa910e4
commit 91a25a942e

@ -272,6 +272,9 @@ if ($hesk_settings['attachments']['use'] && !empty($attachments))
$tmpvar['message']=hesk_makeURL($tmpvar['message']);
$tmpvar['message']=nl2br($tmpvar['message']);
$tmpvar['latitude'] = hesk_POST('latitude', 'E-4');
$tmpvar['longitude'] = hesk_POST('longitude', 'E-4');
// Insert ticket to database
$ticket = hesk_newTicket($tmpvar);

@ -994,11 +994,25 @@ require_once(HESK_PATH . 'inc/show_admin_nav.inc.php');
</div>
<?php
}
if ($modsForHesk_settings['request_location']):
?>
<div class="form-group">
<label for="location" class="col-md-3 control-label"><?php echo $hesklang['location_colon']; ?></label>
<div class="col-sm-9">
<p id="console"><?php echo $hesklang['requesting_location_ellipsis']; ?></p>
<div id="map" style="height: 300px">
</div>
</div>
</div>
<?php endif; ?>
<!-- Submit -->
<div class="form-group">
<div class="col-sm-9 col-sm-offset-3">
<input type="hidden" name="token" value="<?php hesk_token_echo(); ?>" /><input type="submit" value="<?php echo $hesklang['sub_ticket']; ?>" class="btn btn-default" />
<input type="hidden" id="latitude" name="latitude" value="E-0">
<input type="hidden" id="longitude" name="longitude" value="E-0">
<input type="hidden" name="token" value="<?php hesk_token_echo(); ?>">
<input type="submit" value="<?php echo $hesklang['sub_ticket']; ?>" class="btn btn-default">
</div>
</div>
</form>
@ -1006,6 +1020,16 @@ require_once(HESK_PATH . 'inc/show_admin_nav.inc.php');
<?php
// Request for the users location if enabled
if ($modsForHesk_settings['request_location'])
{
echo '
<script>
requestUserLocation("'.$hesklang['your_current_location'].'", "'.$hesklang['unable_to_determine_location'].'");
</script>
';
}
hesk_cleanSessionVars('iserror');
hesk_cleanSessionVars('isnotice');

Loading…
Cancel
Save