Merge branch 'MDL-56677_master-fix' of git://github.com/dmonllao/moodle
authorAndrew Nicols <andrew@nicols.co.uk>
Thu, 3 Nov 2016 06:56:32 +0000 (14:56 +0800)
committerAndrew Nicols <andrew@nicols.co.uk>
Thu, 3 Nov 2016 06:56:32 +0000 (14:56 +0800)
cohort/index.php
theme/bootstrapbase/less/moodle/buttons.less
theme/bootstrapbase/style/moodle.css

index cf0a4f0..da05664 100644 (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!
index cbf7f20..5f7ee4b 100644 (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 {
index 1f29861..7213d63 100644 (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;
 }