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.
This commit is contained in:
Damyon Wiese 2018-07-23 16:16:14 +08:00
parent 0180369b27
commit 2660e38faf
3 changed files with 11 additions and 2 deletions

View File

@ -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'));

View File

@ -36,6 +36,11 @@
}
}
.unresponsive.mform .form-inline,
.unresponsive.mform .form-inline label {
display: inline-flex;
}
#jump-to-activity.custom-select {
width: 100%;
}

View File

@ -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%; }