mirror of
https://github.com/moodle/moodle.git
synced 2025-08-06 17:36:38 +02:00
MDL-65950 core_user: Use new core/checkbox-toggleall
This commit is contained in:
parent
8e9e9a5f7e
commit
df92be9d67
7 changed files with 177 additions and 162 deletions
|
@ -280,16 +280,7 @@ if ($bulkoperations) {
|
|||
$label = get_string('selectalluserswithcount', 'moodle', $participanttable->totalrows);
|
||||
echo html_writer::tag('input', "", array('type' => 'button', 'id' => 'checkall', 'class' => 'btn btn-secondary',
|
||||
'value' => $label, 'data-showallink' => $showalllink));
|
||||
// Select all users, mark all users on page as selected.
|
||||
echo html_writer::tag('input', "", array('type' => 'button', 'id' => 'checkallonpage', 'class' => 'btn btn-secondary',
|
||||
'value' => get_string('selectallusersonpage')));
|
||||
} else {
|
||||
echo html_writer::tag('input', "", array('type' => 'button', 'id' => 'checkallonpage', 'class' => 'btn btn-secondary',
|
||||
'value' => get_string('selectall')));
|
||||
}
|
||||
|
||||
echo html_writer::tag('input', "", array('type' => 'button', 'id' => 'checknone', 'class' => 'btn btn-secondary',
|
||||
'value' => get_string('deselectall')));
|
||||
echo html_writer::end_tag('div');
|
||||
$displaylist = array();
|
||||
if (!empty($CFG->messaging)) {
|
||||
|
@ -339,10 +330,17 @@ if ($bulkoperations) {
|
|||
}
|
||||
}
|
||||
|
||||
$selectactionparams = array(
|
||||
'id' => 'formactionid',
|
||||
'class' => 'ml-2',
|
||||
'data-action' => 'toggle',
|
||||
'data-togglegroup' => 'participants-table',
|
||||
'data-toggle' => 'action',
|
||||
'disabled' => empty($selectall)
|
||||
);
|
||||
echo html_writer::tag('div', html_writer::tag('label', get_string("withselectedusers"),
|
||||
array('for' => 'formactionid', 'class' => 'col-form-label d-inline')) .
|
||||
html_writer::select($displaylist, 'formaction', '', array('' => 'choosedots'), array('id' => 'formactionid')),
|
||||
array('class' => 'ml-2'));
|
||||
html_writer::select($displaylist, 'formaction', '', array('' => 'choosedots'), $selectactionparams));
|
||||
|
||||
echo '<input type="hidden" name="id" value="'.$course->id.'" />';
|
||||
echo '<noscript style="display:inline">';
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue