Allow staff to set location
This commit is contained in:
parent
836aa910e4
commit
91a25a942e
@ -272,6 +272,9 @@ if ($hesk_settings['attachments']['use'] && !empty($attachments))
|
|||||||
$tmpvar['message']=hesk_makeURL($tmpvar['message']);
|
$tmpvar['message']=hesk_makeURL($tmpvar['message']);
|
||||||
$tmpvar['message']=nl2br($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
|
// Insert ticket to database
|
||||||
$ticket = hesk_newTicket($tmpvar);
|
$ticket = hesk_newTicket($tmpvar);
|
||||||
|
|
||||||
|
@ -994,11 +994,25 @@ require_once(HESK_PATH . 'inc/show_admin_nav.inc.php');
|
|||||||
</div>
|
</div>
|
||||||
<?php
|
<?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 -->
|
<!-- Submit -->
|
||||||
<div class="form-group">
|
<div class="form-group">
|
||||||
<div class="col-sm-9 col-sm-offset-3">
|
<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>
|
||||||
</div>
|
</div>
|
||||||
</form>
|
</form>
|
||||||
@ -1006,6 +1020,16 @@ require_once(HESK_PATH . 'inc/show_admin_nav.inc.php');
|
|||||||
|
|
||||||
<?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('iserror');
|
||||||
hesk_cleanSessionVars('isnotice');
|
hesk_cleanSessionVars('isnotice');
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user