Browse Source

Closes #152 Allow user to disable bootstrap-theme.css

merge-requests/2/head
Mike Koch 7 years ago
parent
commit
f0bbff9626
  1. 15
      admin/admin_settings.php
  2. 6
      admin/admin_settings_save.php
  3. 2
      inc/header.inc.php
  4. 2
      inc/headerAdmin.inc.php
  5. 2
      language/en/text.php
  6. 5
      modsForHesk_settings.inc.php

15
admin/admin_settings.php

@ -2094,6 +2094,21 @@ if ( defined('HESK_DEMO') )
</div>
</div>
</div>
<div class="form-group">
<label for="use_bootstrap_theme" class="col-sm-4 col-xs-12 control-label">
<?php echo $hesklang['use_bootstrap_theme']; ?>
<i class="fa fa-question-circle settingsquestionmark" data-toggle="htmlpopover"
title="<?php echo $hesklang['use_bootstrap_theme']; ?>"
data-content="<?php echo $hesklang['use_bootstrap_theme_help']; ?>"></i>
</label>
<div class="col-sm-8 col-xs-12">
<div class="checkbox">
<label>
<input id="use_boostrap_theme" name="use_bootstrap_theme" type="checkbox" <?php if ($modsForHesk_settings['use_bootstrap_theme']) {echo 'checked';} ?>> <?php echo $hesklang['use_bootstrap_theme']; ?>
</label>
</div>
</div>
</div>
<div class="blankSpace"></div>
<h6 style="font-weight: bold"><?php echo $hesklang['tab_4']; ?></h6>
<div class="footerWithBorder blankSpace"></div>

6
admin/admin_settings_save.php

@ -613,6 +613,7 @@ $set['show-icons'] = empty($_POST['show-icons']) ? 0 : 1;
$set['custom-field-setting'] = empty($_POST['custom-field-setting']) ? 0 : 1;
$set['customer-email-verification-required'] = empty($_POST['email-verification']) ? 0 : 1;
$set['html_emails'] = empty($_POST['html_emails']) ? 0 : 1;
$set['use_bootstrap_theme'] = empty($_POST['use_bootstrap_theme']) ? 0 : 1;
if ($set['customer-email-verification-required'])
{
@ -663,7 +664,10 @@ $modsForHesk_settings[\'html_emails\'] = '.$set['html_emails'].';
//-- Mailgun Settings
$modsForHesk_settings[\'use_mailgun\'] = '.$set['use_mailgun'].';
$modsForHesk_settings[\'mailgun_api_key\'] = \''.$set['mailgun_api_key'].'\';
$modsForHesk_settings[\'mailgun_domain\'] = \''.$set['mailgun_domain'].'\';';
$modsForHesk_settings[\'mailgun_domain\'] = \''.$set['mailgun_domain'].'\';
//-- Set this to 1 to enable bootstrap-theme.css
$modsForHesk_settings[\'use_bootstrap_theme\'] = '.$set['use_bootstrap_theme'].';';
// Write the file
if ( ! file_put_contents(HESK_PATH . 'modsForHesk_settings.inc.php', $modsForHesk_file_content) )

2
inc/header.inc.php

@ -50,7 +50,7 @@ require(HESK_PATH . 'modsForHesk_settings.inc.php');
<?php } ?>
<link href="<?php echo HESK_PATH; ?>css/datepicker.css" type="text/css" rel="stylesheet" />
<link href="<?php echo HESK_PATH; ?>css/bootstrap.css?v=<?php echo $hesk_settings['hesk_version']; ?>" type="text/css" rel="stylesheet" />
<link href="<?php echo HESK_PATH; ?>css/bootstrap-theme.css?v=<?php echo $hesk_settings['hesk_version']; ?>" type="text/css" rel="stylesheet" />
<link href="<?php echo HESK_PATH; ?>css/bootstrap-theme.css?v=<?php echo $hesk_settings['hesk_version']; ?>" type="text/css" rel="stylesheet" <?php if ($modsForHesk_settings['use_bootstrap_theme'] == 0) {echo 'disabled';} ?>>
<?php if ($modsForHesk_settings['rtl']) { ?>
<link href="<?php echo HESK_PATH; ?>css/bootstrap-rtl.min.css?v=<?php echo $hesk_settings['hesk_version']; ?>" type="text/css" rel="stylesheet" />
<link href="<?php echo HESK_PATH; ?>css/hesk_newStyleRTL.php?v=<?php echo $hesk_settings['hesk_version']; ?>" type="text/css" rel="stylesheet" />

2
inc/headerAdmin.inc.php

@ -50,7 +50,7 @@ require(HESK_PATH . 'modsForHesk_settings.inc.php');
<?php } ?>
<link href="<?php echo HESK_PATH; ?>css/datepicker.css" type="text/css" rel="stylesheet" />
<link href="<?php echo HESK_PATH; ?>css/bootstrap.css?v=<?php echo $hesk_settings['hesk_version']; ?>" type="text/css" rel="stylesheet" />
<link href="<?php echo HESK_PATH; ?>css/bootstrap-theme.css?v=<?php echo $hesk_settings['hesk_version']; ?>" type="text/css" rel="stylesheet" />
<link href="<?php echo HESK_PATH; ?>css/bootstrap-theme.css?v=<?php echo $hesk_settings['hesk_version']; ?>" type="text/css" rel="stylesheet" <?php if ($modsForHesk_settings['use_bootstrap_theme'] == 0) {echo 'disabled';} ?>>
<?php if ($modsForHesk_settings['rtl']) { ?>
<link href="<?php echo HESK_PATH; ?>css/bootstrap-rtl.min.css?v=<?php echo $hesk_settings['hesk_version']; ?>" type="text/css" rel="stylesheet" />
<link href="<?php echo HESK_PATH; ?>css/hesk_newStyleRTL.php?v=<?php echo $hesk_settings['hesk_version']; ?>" type="text/css" rel="stylesheet" />

2
language/en/text.php

@ -24,6 +24,8 @@ $hesklang['EMAIL_HR']='------ Reply above this line ------';
// ADDED OR MODIFIED IN Mods for HESK 2.1.0
$hesklang['e_mfh_settings'] = 'You will not be able to save your settings unless this file is writable by the script (CHMOD to 666)!';
$hesklang['mfh_up_to_date'] = 'Mods for HESK is up to date';
$hesklang['use_bootstrap_theme'] = 'Use Boostrap Theme CSS';
$hesklang['use_bootstrap_theme_help'] = 'Enable this to use the <code>bootstrap-theme.css</code> file. Use this for a more 3D look and feel, or disable it for a flatter look.';
// ADDED OR MODIFIED IN Mods For HESK 2.0.0
$hesklang['saved_ticket_tpl'] = 'Saved Templates';

5
modsForHesk_settings.inc.php

@ -31,4 +31,7 @@ $modsForHesk_settings['html_emails'] = 1;
//-- Mailgun Settings
$modsForHesk_settings['use_mailgun'] = 0;
$modsForHesk_settings['mailgun_api_key'] = '';
$modsForHesk_settings['mailgun_domain'] = '';
$modsForHesk_settings['mailgun_domain'] = '';
//-- Set this to 1 to enable bootstrap-theme.css
$modsForHesk_settings['use_bootstrap_theme'] = 1;
Loading…
Cancel
Save