Browse Source

Actually save the settings

tags/3.1.0
Mike Koch 2 years ago
parent
commit
cebcefe7e2

+ 12
- 12
admin/admin_settings.php View File

@@ -3725,18 +3725,18 @@ $modsForHesk_settings = mfh_getSettings();
<div class="col-sm-9 col-xs-7">
<select name="admin-color-scheme" id="admin-color-scheme" class="form-control">
<option value="SELECT"><?php echo $hesklang['select_a_preset']; ?></option>
<option value="blue">Blue</option>
<option value="blue-light">Blue (Light)</option>
<option value="yellow">Yellow</option>
<option value="yellow-light">Yellow (Light)</option>
<option value="green">Green</option>
<option value="green-light">Green (Light)</option>
<option value="purple">Purple</option>
<option value="purple-light">Purple (Light)</option>
<option value="red">Red</option>
<option value="red-light">Red (Light)</option>
<option value="black">Black</option>
<option value="black-light">Black (Light)</option>
<option value="blue"><?php echo $hesklang['preset_blue']; ?></option>
<option value="blue-light"><?php echo $hesklang['preset_blue_light']; ?></option>
<option value="yellow"><?php echo $hesklang['preset_yellow']; ?></option>
<option value="yellow-light"><?php echo $hesklang['preset_yellow_light']; ?></option>
<option value="green"><?php echo $hesklang['preset_green']; ?></option>
<option value="green-light"><?php echo $hesklang['preset_green_light']; ?></option>
<option value="purple"><?php echo $hesklang['preset_purple']; ?></option>
<option value="purple-light"><?php echo $hesklang['preset_purple_light']; ?></option>
<option value="red"><?php echo $hesklang['preset_red']; ?></option>
<option value="red-light"><?php echo $hesklang['preset_red_light']; ?></option>
<option value="black"><?php echo $hesklang['preset_black']; ?></option>
<option value="black-light"><?php echo $hesklang['preset_black_light']; ?></option>
</select>
</div>
<script>

+ 30
- 1
admin/admin_settings_save.php View File

@@ -495,7 +495,21 @@ $set['dropdownItemTextColor'] = hesk_input(hesk_POST('dropdownItemTextColor'));
$set['dropdownItemTextHoverColor'] = hesk_input(hesk_POST('dropdownItemTextHoverColor'));
$set['questionMarkColor'] = hesk_input(hesk_POST('questionMarkColor'));
$set['dropdownItemTextHoverBackgroundColor'] = hesk_input(hesk_POST('dropdownItemTextHoverBackgroundColor'));
$set['admin_color_scheme'] = hesk_input(hesk_POST('admin-color-scheme'));
$set['admin_navbar_background'] = hesk_input(hesk_POST('admin-navbar-background-color'));
$set['admin_navbar_background_hover'] = hesk_input(hesk_POST('admin-navbar-background-hover-color'));
$set['admin_navbar_brand_background'] = hesk_input(hesk_POST('admin-navbar-brand-background-color'));
$set['admin_navbar_brand_background_hover'] = hesk_input(hesk_POST('admin-navbar-brand-background-hover-color'));
$set['admin_navbar_brand_text'] = hesk_input(hesk_POST('admin-navbar-brand-text-color'));
$set['admin_navbar_brand_text_hover'] = hesk_input(hesk_POST('admin-navbar-brand-text-hover-color'));
$set['admin_navbar_text'] = hesk_input(hesk_POST('admin-navbar-text-color'));
$set['admin_navbar_text_hover'] = hesk_input(hesk_POST('admin-navbar-text-hover-color'));
$set['admin_sidebar_background'] = hesk_input(hesk_POST('admin-sidebar-background-color'));
$set['admin_sidebar_background_hover'] = hesk_input(hesk_POST('admin-sidebar-header-background-color'));
$set['admin_sidebar_font_weight'] = hesk_input(hesk_POST('admin-sidebar-font-weight'));
$set['admin_sidebar_header_background'] = hesk_input(hesk_POST('admin-sidebar-header-background-color'));
$set['admin_sidebar_header_text'] = hesk_input(hesk_POST('admin-sidebar-header-text-color'));
$set['admin_sidebar_text'] = hesk_input(hesk_POST('admin-sidebar-text-color'));
$set['admin_sidebar_text_hover'] = hesk_input(hesk_POST('admin-sidebar-text-hover-color'));

$set['login_background_type'] = hesk_input(hesk_POST('login-background'));
$set['login_box_header'] = hesk_input(hesk_POST('login-box-header'));
@@ -615,6 +629,21 @@ mfh_updateSetting('dropdownItemTextColor', $set['dropdownItemTextColor'], true);
mfh_updateSetting('dropdownItemTextHoverColor', $set['dropdownItemTextHoverColor'], true);
mfh_updateSetting('questionMarkColor', $set['questionMarkColor'], true);
mfh_updateSetting('dropdownItemTextHoverBackgroundColor', $set['dropdownItemTextHoverBackgroundColor'], true);
mfh_updateSetting('admin_navbar_background', $set['admin_navbar_background'], true);
mfh_updateSetting('admin_navbar_background_hover', $set['admin_navbar_background_hover'], true);
mfh_updateSetting('admin_navbar_brand_background', $set['admin_navbar_brand_background'], true);
mfh_updateSetting('admin_navbar_brand_background_hover', $set['admin_navbar_brand_background_hover'], true);
mfh_updateSetting('admin_navbar_brand_text', $set['admin_navbar_brand_text'], true);
mfh_updateSetting('admin_navbar_brand_text_hover', $set['admin_navbar_brand_text_hover'], true);
mfh_updateSetting('admin_navbar_text', $set['admin_navbar_text'], true);
mfh_updateSetting('admin_navbar_text_hover', $set['admin_navbar_text_hover'], true);
mfh_updateSetting('admin_sidebar_background', $set['admin_sidebar_background'], true);
mfh_updateSetting('admin_sidebar_background_hover', $set['admin_sidebar_background_hover'], true);
mfh_updateSetting('admin_sidebar_font_weight', $set['admin_sidebar_font_weight'], true);
mfh_updateSetting('admin_sidebar_header_background', $set['admin_sidebar_header_background'], true);
mfh_updateSetting('admin_sidebar_header_text', $set['admin_sidebar_header_text'], true);
mfh_updateSetting('admin_sidebar_text', $set['admin_sidebar_text'], true);
mfh_updateSetting('admin_sidebar_text_hover', $set['admin_sidebar_text_hover'], true);
mfh_updateSetting('display_user_agent_information', $set['display_user_agent_information']);
mfh_updateSetting('navbar_title_url', $set['navbar_title_url'], true);
if ($set['use_mailgun'] == 1) {

+ 1
- 7
install/mods-for-hesk/sql/installSql.php View File

@@ -1013,7 +1013,7 @@ function execute310Scripts() {
executeQuery("INSERT INTO `" . hesk_dbEscape($hesk_settings['db_pfix']) . "settings` (`Key`, `Value`) VALUES ('login_background', '#d2d6de')");
executeQuery("INSERT INTO `" . hesk_dbEscape($hesk_settings['db_pfix']) . "settings` (`Key`, `Value`) VALUES ('login_box_header', 'helpdesk-title')");
executeQuery("INSERT INTO `" . hesk_dbEscape($hesk_settings['db_pfix']) . "settings` (`Key`, `Value`) VALUES ('login_box_header_image', '')");
executeQuery("DELETE FROM `" . hesk_dbEscape($hesk_settings['db_pfix']) . "settings` WHERE `Key` = 'rtl'");
executeQuery("DELETE FROM `" . hesk_dbEscape($hesk_settings['db_pfix']) . "settings` WHERE `Key` IN ('rtl', 'admin_color_scheme')");

// Copy over color presets to the custom values
$theme_preset_rs = executeQuery("SELECT `Value` FROM `" . hesk_dbEscape($hesk_settings['db_pfix']) . "settings` WHERE `Key` = 'admin_color_scheme'");
@@ -1047,8 +1047,6 @@ function execute310Scripts() {
$sidebar_header = array(
'background' => $light_theme ? '#f9fafc' : '#1a2226',
'text' => $light_theme ? '#848484' : '#4b646f',
'text_hover' => $light_theme ? '#848484' : '#4b646f',
'background_hover' => $light_theme ? '#f9fafc': '#1e282c'
);
if (preg_match('/skin-blue.*/g', $theme)) {
$navbar['background'] = '#3c8dbc';
@@ -1116,12 +1114,8 @@ function execute310Scripts() {
VALUES ('admin_sidebar_font_weight', '{$sidebar['font_weight']}')");
executeQuery("INSERT INTO `" . hesk_dbEscape($hesk_settings['db_pfix']) . "settings` (`Key`, `Value`)
VALUES ('admin_sidebar_header_background', '{$sidebar_header['background']}')");
executeQuery("INSERT INTO `" . hesk_dbEscape($hesk_settings['db_pfix']) . "settings` (`Key`, `Value`)
VALUES ('admin_sidebar_header_background_hover', '{$sidebar_header['background_hover']}')");
executeQuery("INSERT INTO `" . hesk_dbEscape($hesk_settings['db_pfix']) . "settings` (`Key`, `Value`)
VALUES ('admin_sidebar_header_text', '{$sidebar_header['text']}')");
executeQuery("INSERT INTO `" . hesk_dbEscape($hesk_settings['db_pfix']) . "settings` (`Key`, `Value`)
VALUES ('admin_sidebar_header_text_hover', '{$sidebar_header['text_hover']}')");

updateVersion('3.1.0');
}

+ 12
- 1
language/en/text.php View File

@@ -2156,7 +2156,18 @@ $hesklang['bold'] = 'Bold';
$hesklang['color_preset'] = 'Color Preset';
$hesklang['color_preset_help'] = 'Select a color preset for the backend, or define custom colors below.';
$hesklang['select_a_preset'] = '-- Select a Preset --';
;
$hesklang['preset_blue'] = 'Blue';
$hesklang['preset_blue_light'] = 'Blue (light)';
$hesklang['preset_yellow'] = 'Yellow';
$hesklang['preset_yellow_light'] = 'Yellow (light)';
$hesklang['preset_green'] = 'Green';
$hesklang['preset_green_light'] = 'Green (light)';
$hesklang['preset_purple'] = 'Purple';
$hesklang['preset_purple_light'] = 'Purple (light)';
$hesklang['preset_red'] = 'Red';
$hesklang['preset_red_light'] = 'Red (light)';
$hesklang['preset_black'] = 'Black';
$hesklang['preset_black_light'] = 'Black (light)';

// DO NOT CHANGE BELOW
if (!defined('IN_SCRIPT')) die('PHP syntax OK!');

Loading…
Cancel
Save