diff --git a/classes/pref/prefs.php b/classes/pref/prefs.php
index e66052657..b00c4c83f 100644
--- a/classes/pref/prefs.php
+++ b/classes/pref/prefs.php
@@ -1132,12 +1132,18 @@ class Pref_Prefs extends Handler_Protected {
print_hidden("method", "setpref");
print_hidden("key", "USER_STYLESHEET");
+ print "
";
+ print_warning(__("User CSS has been applied, you might need to reload the page to see all changes."));
+ print "
";
+
print "";
print "";
diff --git a/include/functions.php b/include/functions.php
index b4e91fe9c..153a96698 100644
--- a/include/functions.php
+++ b/include/functions.php
@@ -1584,7 +1584,7 @@
$value = get_pref('USER_STYLESHEET');
if ($value) {
- print "";
}
diff --git a/js/PrefHelpers.js b/js/PrefHelpers.js
index 6a62cb593..4b908204c 100644
--- a/js/PrefHelpers.js
+++ b/js/PrefHelpers.js
@@ -150,6 +150,12 @@ define(["dojo/_base/declare"], function (declare) {
id: "cssEditDlg",
title: __("Customize stylesheet"),
style: "width: 600px",
+ apply: function() {
+ xhrPost("backend.php", this.attr('value'), () => {
+ new Effect.Appear("css_edit_apply_msg");
+ $("user_css_style").innerText = this.attr('value');
+ });
+ },
execute: function () {
Notify.progress('Saving data...', true);