MDL-66874 mod_data: Explicitly add btn-secondary class to select all
authorJun Pataleta <jun@moodle.com>
Tue, 8 Oct 2019 06:32:06 +0000 (14:32 +0800)
committerJun Pataleta <jun@moodle.com>
Mon, 14 Oct 2019 03:27:19 +0000 (11:27 +0800)
* Plus use correct option attribute 'classes' for the slave
  checkboxes

mod/data/lib.php
mod/data/view.php

index d140593..bd562c9 100644 (file)
@@ -1444,7 +1444,7 @@ function data_print_template($template, $records, $data, $search='', $page=0, $r
             $checkbox = new \core\output\checkbox_toggleall('listview-entries', false, [
                 'id' => "entry_{$record->id}",
                 'name' => 'delcheck[]',
-                'class' => 'recordcheckbox',
+                'classes' => 'recordcheckbox',
                 'value' => $record->id,
             ]);
             $replacement[] = $OUTPUT->render($checkbox);
index 0812fb8..5f7800e 100644 (file)
@@ -516,7 +516,7 @@ if ($showactivity) {
                     'name' => $selectallid,
                     'value' => 1,
                     'label' => get_string('selectall'),
-                    'classes' => 'mr-1',
+                    'classes' => 'btn-secondary mr-1',
                 ], true);
                 echo $OUTPUT->render($mastercheckbox);