Browse Source

#204 Add setting for location tracking

merge-requests/2/head
Mike Koch 7 years ago
parent
commit
4300bf03fd
  1. 20
      admin/admin_settings.php
  2. 6
      admin/admin_settings_save.php
  3. 7
      install/mods-for-hesk/sql/installSql.php
  4. 3
      language/en/text.php
  5. 5
      modsForHesk_settings.inc.php

20
admin/admin_settings.php

@ -902,6 +902,26 @@ if ( defined('HESK_DEMO') )
?>
</div>
</div>
<div class="form-group">
<label for="request_location" class="col-sm-6 control-label">
<span class="label label-primary"
data-toggle="tooltip"
title="<?php echo $hesklang['added_in_mods_for_hesk']; ?>"><?php echo $hesklang['mods_for_hesk_acronym']; ?></span>
<?php echo $hesklang['request_user_location']; ?>
<i class="fa fa-question-circle settingsquestionmark" data-toggle="htmlpopover"
title="<?php echo $hesklang['request_user_location']; ?>"
data-content="<?php echo $hesklang['request_user_location_help']; ?>"></i>
</label>
<div class="col-sm-6 form-inline">
<?php
$on = $modsForHesk_settings['request_location'] ? 'checked' : '';
$off = $modsForHesk_settings['request_location'] ? '' : 'checked';
echo '
<div class="radio"><label><input type="radio" name="request_location" value="0" '.$off.' /> '.$hesklang['off'].'</label></div>&nbsp;&nbsp;&nbsp;
<div class="radio"><label><input type="radio" name="request_location" value="1" '.$on.' /> '.$hesklang['on'].'</label></div>';
?>
</div>
</div>
<div class="form-group">
<label class="col-sm-6 control-label"><?php echo $hesklang['select']; ?> <a href="Javascript:void(0)" onclick="Javascript:hesk_window('<?php echo $help_folder; ?>helpdesk.html#65','400','500')"><i class="fa fa-question-circle settingsquestionmark"></i></a></label>
<div class="col-sm-6">

6
admin/admin_settings_save.php

@ -506,6 +506,7 @@ $set['use_bootstrap_theme'] = empty($_POST['use_bootstrap_theme']) ? 0 : 1;
$set['new_kb_article_visibility'] = hesk_checkMinMax( intval( hesk_POST('new_kb_article_visibility') ) , 0, 2, 2);
$set['mfh_attachments'] = empty($_POST['email_attachments']) ? 0 : 1;
$set['show_number_merged'] = empty($_POST['show_number_merged']) ? 0 : 1;
$set['request_location'] = empty($_POST['request_location']) ? 0 : 1;
if ($set['customer-email-verification-required'])
{
@ -568,7 +569,10 @@ $modsForHesk_settings[\'new_kb_article_visibility\'] = '.$set['new_kb_article_vi
$modsForHesk_settings[\'attachments\'] = '.$set['mfh_attachments'].';
//-- Setting for showing number of merged tickets in the ticket search screen. 0 = Disable, 1 = Enable
$modsForHesk_settings[\'show_number_merged\'] = '.$set['show_number_merged'].';';
$modsForHesk_settings[\'show_number_merged\'] = '.$set['show_number_merged'].';
//-- Setting for requesting user\'s location. 0 = Disable, 1 = Enable
$modsForHesk_settings[\'request_location\'] = '.$set['request_location'].';';
// Write the file
if ( ! file_put_contents(HESK_PATH . 'modsForHesk_settings.inc.php', $modsForHesk_file_content) )

7
install/mods-for-hesk/sql/installSql.php

@ -464,6 +464,13 @@ function execute230FileUpdate() {
//-- Setting for showing number of merged tickets in the ticket search screen. 0 = Disable, 1 = Enable
$modsForHesk_settings[\'show_number_merged\'] = 1;';
}
if (strpos($file, '$modsForHesk_settings[\'request_location\']') === false)
{
$file .= '
//-- Setting for requesting user\'s location. 0 = Disable, 1 = Enable
$modsForHesk_settings[\'request_location\'] = 0';
}
return file_put_contents(HESK_PATH.'modsForHesk_settings.inc.php', $file);
}

3
language/en/text.php

@ -46,6 +46,9 @@ $hesklang['latest_top_on_home_help'] = 'Select YES to display the top and latest
Otherwise, a link to the knowledgebase will appear on the home page.';
$hesklang['location_unavailable'] = "Customer's location is unavailable. Click the crosshair for more information.";
$hesklang['click_for_map'] = "Click the crosshair to see a map of the ticket's location";
$hesklang['request_user_location'] = "Request Location";
$hesklang['request_user_location_help'] = "If enabled, the help desk will ask for the customer's location, allowing staff to
see a map of the customer's location when they created the ticket.";
// 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 (:)

5
modsForHesk_settings.inc.php

@ -43,4 +43,7 @@ $modsForHesk_settings['new_kb_article_visibility'] = 0;
$modsForHesk_settings['attachments'] = 0;
//-- Setting for showing number of merged tickets in the ticket search screen. 0 = Disable, 1 = Enable
$modsForHesk_settings['show_number_merged'] = 1;
$modsForHesk_settings['show_number_merged'] = 1;
//-- Setting for requesting user's location. 0 = Disable, 1 = Enable
$modsForHesk_settings['request_location'] = 0;
Loading…
Cancel
Save