Skip to content

Commit

Permalink
MDL-62581 backup: CSS fixes
Browse files Browse the repository at this point in the history
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.
  • Loading branch information
Damyon Wiese committed Jul 23, 2018
1 parent 0180369 commit 2660e38
Show file tree
Hide file tree
Showing 3 changed files with 11 additions and 2 deletions.
4 changes: 2 additions & 2 deletions backup/util/ui/renderer.php
Original file line number Diff line number Diff line change
Expand Up @@ -632,7 +632,7 @@ public function render_restore_course_search(restore_course_search $component) {
$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'));
Expand Down Expand Up @@ -792,7 +792,7 @@ public function render_restore_category_search(restore_category_search $componen
$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'));
Expand Down
5 changes: 5 additions & 0 deletions theme/boost/scss/moodle/forms.scss
Original file line number Diff line number Diff line change
Expand Up @@ -36,6 +36,11 @@
}
}

.unresponsive.mform .form-inline,
.unresponsive.mform .form-inline label {
display: inline-flex;
}

#jump-to-activity.custom-select {
width: 100%;
}
Expand Down
4 changes: 4 additions & 0 deletions theme/boost/style/moodle.css
Original file line number Diff line number Diff line change
Expand Up @@ -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%; }

Expand Down

0 comments on commit 2660e38

Please sign in to comment.