diff --git a/classes/local/outagelib.php b/classes/local/outagelib.php index cf591c7..1aebd11 100644 --- a/classes/local/outagelib.php +++ b/classes/local/outagelib.php @@ -129,15 +129,13 @@ class outagelib { * @return mixed[] Default configuration. */ public static function get_config_defaults() { - global $CFG; - return [ 'default_autostart' => '0', 'default_duration' => (string)(60 * 60), 'default_warning_duration' => (string)(60 * 60), 'default_title' => get_string('defaulttitlevalue', 'auth_outage'), 'default_description' => get_string('defaultdescriptionvalue', 'auth_outage'), - 'css' => file_get_contents($CFG->dirroot.'/auth/outage/views/warningbar/warningbar.css'), + 'css' => '', ]; } diff --git a/lang/en/auth_outage.php b/lang/en/auth_outage.php index f290968..886dace 100644 --- a/lang/en/auth_outage.php +++ b/lang/en/auth_outage.php @@ -61,7 +61,7 @@ $string['clioutagecreated'] = 'Outage created, id: {$a->id}'; $string['clone'] = 'Clone'; $string['datetimeformat'] = '%a %d %h %Y at %I:%M%P %Z'; $string['defaultlayoutcss'] = 'Layout CSS'; -$string['defaultlayoutcssdescription'] = 'This CSS code will be used to display the Outage Warning Bar.'; +$string['defaultlayoutcssdescription'] = 'This CSS code can be used to override the Outage Warning Bar CSS.'; $string['defaultoutageautostart'] = 'Outage auto start'; $string['defaultoutageautostartdescription'] = 'If the outage should automatically trigger maintenance mode once it starts, locking down the whole site.'; $string['defaultoutageduration'] = 'Outage duration'; diff --git a/views/warningbar/warningbar.php b/views/warningbar/warningbar.php index 86382ae..ec2d9fe 100644 --- a/views/warningbar/warningbar.php +++ b/views/warningbar/warningbar.php @@ -59,9 +59,13 @@ if (!$viewbag['static']) { $title .= ' '.html_writer::span(html_writer::link($url, $text, $attr), '', ['id' => 'auth_outage_warningbar_button']); } } - -echo html_writer::tag('style', outagelib::get_config()->css); ?> +