From 2660e38faf78c69d9cea55c0ed1769e2d8338438 Mon Sep 17 00:00:00 2001 From: Damyon Wiese Date: Mon, 23 Jul 2018 16:16:14 +0800 Subject: [PATCH] MDL-62581 backup: CSS fixes Sanitise the CSS for backup and restore. Main fixes are to sanitise the form-inline styles and set a fixed width for the search forms within the restore form. --- backup/util/ui/renderer.php | 4 ++-- theme/boost/scss/moodle/forms.scss | 5 +++++ theme/boost/style/moodle.css | 4 ++++ 3 files changed, 11 insertions(+), 2 deletions(-) diff --git a/backup/util/ui/renderer.php b/backup/util/ui/renderer.php index f656577bc78..2bea83c2c3f 100644 --- a/backup/util/ui/renderer.php +++ b/backup/util/ui/renderer.php @@ -632,7 +632,7 @@ class core_backup_renderer extends plugin_renderer_base { $url = $component->get_url(); $output = html_writer::start_tag('div', array('class' => 'restore-course-search form-inline m-b-1')); - $output .= html_writer::start_tag('div', array('class' => 'rcs-results')); + $output .= html_writer::start_tag('div', array('class' => 'rcs-results w-75')); $table = new html_table(); $table->head = array('', get_string('shortnamecourse'), get_string('fullnamecourse')); @@ -792,7 +792,7 @@ class core_backup_renderer extends plugin_renderer_base { $url = $component->get_url(); $output = html_writer::start_tag('div', array('class' => 'restore-course-search form-inline m-b-1')); - $output .= html_writer::start_tag('div', array('class' => 'rcs-results w-100')); + $output .= html_writer::start_tag('div', array('class' => 'rcs-results w-75')); $table = new html_table(); $table->head = array('', get_string('name'), get_string('description')); diff --git a/theme/boost/scss/moodle/forms.scss b/theme/boost/scss/moodle/forms.scss index 36cb2b3f9de..987b5b202d1 100644 --- a/theme/boost/scss/moodle/forms.scss +++ b/theme/boost/scss/moodle/forms.scss @@ -36,6 +36,11 @@ } } +.unresponsive.mform .form-inline, +.unresponsive.mform .form-inline label { + display: inline-flex; +} + #jump-to-activity.custom-select { width: 100%; } diff --git a/theme/boost/style/moodle.css b/theme/boost/style/moodle.css index 75d8bfaff8e..7e63ad84a27 100644 --- a/theme/boost/style/moodle.css +++ b/theme/boost/style/moodle.css @@ -14872,6 +14872,10 @@ body.path-question-type .mform fieldset.hidden { justify-content: flex-start; width: 100%; } +.unresponsive.mform .form-inline, +.unresponsive.mform .form-inline label { + display: inline-flex; } + #jump-to-activity.custom-select { width: 100%; }