Browse Source

Getting started on adding login background customizations

tags/3.1.0
Mike Koch 2 years ago
parent
commit
0956496b99

+ 13
- 0
admin/admin_settings.php View File

@@ -3791,6 +3791,19 @@ $modsForHesk_settings = mfh_getSettings();
</div>
</div>
</div>
<div class="row">
<div class="col-xs-12">
<div class="form-group">
<label for="login-background" class="col-sm-3 col-xs-5 control-label">
LOGIN BACKGROUND [!]
</label>
<div class="col-sm-9 col-xs-7">
<input type="text" name="login-background" class="form-control" placeholder="LOGIN BACKGROUND [!]"
value="<?php echo $modsForHesk_settings['login_background']; ?>">
</div>
</div>
</div>
</div>
</div>
</div>
<div class="form-group" style="margin-left: 10px">

+ 2
- 0
admin/admin_settings_save.php View File

@@ -495,6 +495,7 @@ $set['dropdownItemTextHoverColor'] = hesk_input(hesk_POST('dropdownItemTextHover
$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['login_background'] = hesk_input(hesk_POST('login-background'));
mfh_updateSetting('rtl', $set['rtl']);
mfh_updateSetting('show_icons', $set['show-icons']);
mfh_updateSetting('custom_field_setting', $set['custom-field-setting']);
@@ -532,6 +533,7 @@ mfh_updateSetting('enable_calendar', $set['enable_calendar'], false);
mfh_updateSetting('first_day_of_week', $set['first_day_of_week'], false);
mfh_updateSetting('default_calendar_view', $set['default_view'], true);
mfh_updateSetting('admin_color_scheme', $set['admin_color_scheme'], true);
mfh_updateSetting('login_background', $set['login_background'], true);

// Prepare settings file and save it
$settings_file_content = '<?php

+ 1
- 1
inc/headerAdmin.inc.php View File

@@ -92,7 +92,7 @@ $modsForHesk_settings = mfh_getSettings();

<?php if (defined('PAGE_TITLE') && PAGE_TITLE == 'LOGIN'): ?>
body {
background: #d2d6de;
background: <?php echo $modsForHesk_settings['login_background']; ?>;
}
<?php endif; ?>
</style>

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

@@ -1009,6 +1009,7 @@ function execute310Scripts() {
executeQuery("ALTER TABLE `" . hesk_dbEscape($hesk_settings['db_pfix']) . "categories` ADD COLUMN `foreground_color` VARCHAR(7) NOT NULL DEFAULT 'AUTO'");
executeQuery("ALTER TABLE `" . hesk_dbEscape($hesk_settings['db_pfix']) . "categories` ADD COLUMN `display_border_outline` ENUM('0','1') NOT NULL DEFAULT '0'");
executeQuery("ALTER TABLE `" . hesk_dbEscape($hesk_settings['db_pfix']) . "categories` CHANGE `color` `background_color` VARCHAR(7) NOT NULL DEFAULT '#FFFFFF'");
executeQuery("INSERT INTO `" . hesk_dbEscape($hesk_settings['db_pfix']) . "settings` (`Key`, `Value`) VALUES ('login_background', '#d2d6de')");

updateVersion('3.1.0');
}

Loading…
Cancel
Save