MDL-56677 cohort: Fix cohort search box misalignment

This commit is contained in:
David Monllao 2016-11-03 14:20:25 +08:00
parent 5d0299e275
commit 18bb2883ce
3 changed files with 34 additions and 1 deletions

View File

@ -103,7 +103,7 @@ if ($editcontrols = cohort_edit_controls($context, $baseurl)) {
}
// Add search form.
$search = html_writer::start_tag('form', array('id'=>'searchcohortquery', 'method'=>'get', 'class' => 'form-inline'));
$search = html_writer::start_tag('form', array('id'=>'searchcohortquery', 'method'=>'get', 'class' => 'form-inline search-cohort'));
$search .= html_writer::start_div('m-b-1');
$search .= html_writer::label(get_string('searchcohort', 'cohort'), 'cohort_search_q', true,
array('class' => 'm-r-1')); // No : in form labels!

View File

@ -78,6 +78,25 @@ input[type="reset"] {
.btn-lineup;
}
// The above buttons rules are really dumb and muck things up for simple pages using bootstrap correctly.
// e.g. cohort search form.
// Undo the above silly rules one by one for pages we know to be broken by them.
form.search-cohort input[type="text"],
form.search-cohort input[type="submit"],
form.search-cohort label {
.m-t-1
}
form.search-cohort label {
margin-bottom: 0;
vertical-align: middle;
}
form.search-cohort input[type="submit"] {
margin-bottom: 0;
margin-left: 0;
}
button {
&.yui3-button {
&.closebutton {

View File

@ -15818,6 +15818,20 @@ input[type="submit"],
input[type="reset"] {
margin: 0 0 10px 5px;
}
form.search-cohort input[type="text"],
form.search-cohort input[type="submit"],
form.search-cohort label {
margin-top: 14px !important;
/* stylelint-disable-line declaration-no-important */
}
form.search-cohort label {
margin-bottom: 0;
vertical-align: middle;
}
form.search-cohort input[type="submit"] {
margin-bottom: 0;
margin-left: 0;
}
button.yui3-button.closebutton {
background-position: 0 0;
}