mirror of
https://github.com/moodle/moodle.git
synced 2025-04-22 08:55:15 +02:00
Merge branch 'MDL-56988-master' of git://github.com/lameze/moodle
This commit is contained in:
commit
a954685767
@ -77,7 +77,7 @@ class renderer extends \plugin_renderer_base {
|
||||
protected function render_add_button($courseid) {
|
||||
global $CFG;
|
||||
|
||||
$button = \html_writer::tag('button', get_string('addrule', 'tool_monitor'));
|
||||
$button = \html_writer::tag('button', get_string('addrule', 'tool_monitor'), ['class' => 'btn btn-primary']);
|
||||
$addurl = new \moodle_url($CFG->wwwroot. '/admin/tool/monitor/edit.php', array('courseid' => $courseid));
|
||||
return \html_writer::link($addurl, $button);
|
||||
}
|
||||
|
@ -96,12 +96,12 @@ echo $OUTPUT->box_start(); // The forms section at the top
|
||||
|
||||
<div class="mdl-align">
|
||||
|
||||
<form method="post" action="index.php">
|
||||
<form method="post" action="index.php" class="form-inline spamcleanerform">
|
||||
<div>
|
||||
<label class="accesshide" for="keyword_el"><?php print_string('spamkeyword', 'tool_spamcleaner') ?></label>
|
||||
<input type="text" name="keyword" id="keyword_el" value="<?php p($keyword) ?>" />
|
||||
<input type="text" class="form-control" name="keyword" id="keyword_el" value="<?php p($keyword) ?>" />
|
||||
<input type="hidden" name="sesskey" value="<?php echo sesskey();?>" />
|
||||
<input type="submit" value="<?php echo get_string('spamsearch', 'tool_spamcleaner')?>" />
|
||||
<input type="submit" class="btn btn-primary" value="<?php echo get_string('spamsearch', 'tool_spamcleaner')?>" />
|
||||
</div>
|
||||
</form>
|
||||
<p><?php echo get_string('spameg', 'tool_spamcleaner');?></p>
|
||||
@ -110,7 +110,8 @@ echo $OUTPUT->box_start(); // The forms section at the top
|
||||
|
||||
<form method="post" action="index.php">
|
||||
<div>
|
||||
<input type="submit" name="autodetect" value="<?php echo get_string('spamauto', 'tool_spamcleaner');?>" />
|
||||
<input type="submit" class="btn btn-primary" name="autodetect"
|
||||
value="<?php echo get_string('spamauto', 'tool_spamcleaner');?>" />
|
||||
</div>
|
||||
</form>
|
||||
|
||||
@ -256,7 +257,9 @@ function print_user_list($users_rs, $keywords) {
|
||||
foreach ($users_rs as $rs){
|
||||
foreach ($rs as $user) {
|
||||
if (!$count) {
|
||||
echo '<table border="1" width="100%" id="data-grid"><tr><th> </th><th>'.get_string('user','admin').'</th><th>'.get_string('spamdesc', 'tool_spamcleaner').'</th><th>'.get_string('spamoperation', 'tool_spamcleaner').'</th></tr>';
|
||||
echo '<table class="table table-bordered" border="1" width="100%" id="data-grid"><tr><th> </th>
|
||||
<th>'.get_string('user', 'admin').'</th><th>'.get_string('spamdesc', 'tool_spamcleaner').'</th>
|
||||
<th>'.get_string('spamoperation', 'tool_spamcleaner').'</th></tr>';
|
||||
}
|
||||
$count++;
|
||||
filter_user($user, $keywords, $count);
|
||||
@ -269,7 +272,7 @@ function print_user_list($users_rs, $keywords) {
|
||||
} else {
|
||||
echo '</table>';
|
||||
echo '<div class="mld-align">
|
||||
<button id="removeall_btn">'.get_string('spamdeleteall', 'tool_spamcleaner').'</button>
|
||||
<button id="removeall_btn" class="btn btn-secondary">'.get_string('spamdeleteall', 'tool_spamcleaner').'</button>
|
||||
</div>';
|
||||
}
|
||||
}
|
||||
@ -357,8 +360,10 @@ function print_user_entry($user, $keywords, $count) {
|
||||
|
||||
$html .= '<td align="left">'.format_text($user->description, $user->descriptionformat, array('overflowdiv'=>true)).'</td>';
|
||||
$html .= '<td width="100px" align="center">';
|
||||
$html .= '<button onclick="M.tool_spamcleaner.del_user(this,'.$user->id.')">'.get_string('deleteuser', 'admin').'</button><br />';
|
||||
$html .= '<button onclick="M.tool_spamcleaner.ignore_user(this,'.$user->id.')">'.get_string('ignore', 'admin').'</button>';
|
||||
$html .= '<button class="btn btn-primary" onclick="M.tool_spamcleaner.del_user(this,'.$user->id.')">'.
|
||||
get_string('deleteuser', 'admin').'</button><br />';
|
||||
$html .= '<button class="btn btn-secondary" onclick="M.tool_spamcleaner.ignore_user(this,'.$user->id.')">'.
|
||||
get_string('ignore', 'admin').'</button>';
|
||||
$html .= '</td>';
|
||||
$html .= '</tr>';
|
||||
return $html;
|
||||
|
@ -88,7 +88,8 @@ if (empty($action)) {
|
||||
$return = $manager->print_comments($page);
|
||||
// if no comments available, $return will be false
|
||||
if ($return) {
|
||||
echo '<input type="submit" id="comments_delete" name="batchdelete" value="'.get_string('delete').'" />';
|
||||
echo '<input type="submit" class="btn btn-primary" id="comments_delete" name="batchdelete"
|
||||
value="'.get_string('delete').'" />';
|
||||
}
|
||||
echo '</form>';
|
||||
}
|
||||
|
@ -157,7 +157,8 @@ class comment_manager {
|
||||
|
||||
$table = new html_table();
|
||||
$table->head = array (
|
||||
html_writer::checkbox('selectall', '', false, get_string('selectall'), array('id'=>'comment_select_all', 'class'=>'comment-report-selectall')),
|
||||
html_writer::checkbox('selectall', '', false, get_string('selectall'), array('id' => 'comment_select_all',
|
||||
'class' => 'm-r-1')),
|
||||
get_string('author', 'search'),
|
||||
get_string('content'),
|
||||
get_string('action')
|
||||
|
@ -1680,7 +1680,7 @@ class html_writer {
|
||||
$class = str_replace(']', '', $class);
|
||||
$attributes['class'] = $class;
|
||||
}
|
||||
$attributes['class'] = 'select ' . $attributes['class']; // Add 'select' selector always
|
||||
$attributes['class'] = 'select custom-select ' . $attributes['class']; // Add 'select' selector always.
|
||||
|
||||
$attributes['name'] = $name;
|
||||
|
||||
|
@ -311,7 +311,8 @@ if (!$csv) {
|
||||
exit;
|
||||
}
|
||||
|
||||
print '<table id="completion-progress" class="generaltable flexible boxaligncenter completionreport" style="text-align: left" cellpadding="5" border="1">';
|
||||
print '<table id="completion-progress" class="table table-bordered generaltable flexible boxaligncenter
|
||||
completionreport" style="text-align: left" cellpadding="5" border="1">';
|
||||
|
||||
// Print criteria group names
|
||||
print PHP_EOL.'<thead><tr style="vertical-align: top">';
|
||||
|
@ -70,7 +70,7 @@ if (empty($timeoptions)) {
|
||||
print_error('nostatstodisplay', 'error', $CFG->wwwroot.'/course/view.php?id='.$course->id);
|
||||
}
|
||||
|
||||
echo html_writer::start_tag('form', array('action' => 'index.php', 'method' => 'post'));
|
||||
echo html_writer::start_tag('form', array('action' => 'index.php', 'method' => 'post', 'class' => 'form-inline'));
|
||||
echo html_writer::start_tag('div');
|
||||
|
||||
$table = new html_table();
|
||||
@ -85,8 +85,11 @@ $timeoptionsmenu .= html_writer::select($timeoptions,'time',$time, false);
|
||||
$table->data[] = array(get_string('statsreporttype'),$reporttypemenu,
|
||||
get_string('statstimeperiod'),$timeoptionsmenu,
|
||||
html_writer::label(get_string('numberofcourses'), 'numcourses', false, array('class' => 'accesshide')) .
|
||||
html_writer::empty_tag('input', array('type' => 'text', 'id' => 'numcourses', 'name' => 'numcourses', 'size' => '3', 'maxlength' => '2', 'value' => $numcourses)),
|
||||
html_writer::empty_tag('input', array('type' => 'submit', 'value' => get_string('view'))));
|
||||
html_writer::empty_tag('input', array('type' => 'text', 'class' => 'form-control',
|
||||
'id' => 'numcourses', 'name' => 'numcourses', 'size' => '3', 'maxlength' => '2',
|
||||
'value' => $numcourses)),
|
||||
html_writer::empty_tag('input', array('type' => 'submit', 'class' => 'btn btn-secondary',
|
||||
'value' => get_string('view'))));
|
||||
|
||||
echo html_writer::table($table);
|
||||
echo html_writer::end_tag('div');
|
||||
|
@ -147,7 +147,9 @@ class report_log_renderer extends plugin_renderer_base {
|
||||
'id' => $selectedcourseid, 'date' => $reportlog->date, 'modid' => $reportlog->modid,
|
||||
'showusers' => 1, 'showcourses' => $reportlog->showcourses));
|
||||
$a->url = $a->url->out(false);
|
||||
echo html_writer::start_span('m-x-1');
|
||||
print_string('logtoomanyusers', 'moodle', $a);
|
||||
echo html_writer::end_span();
|
||||
}
|
||||
|
||||
// Add date selector.
|
||||
@ -186,7 +188,8 @@ class report_log_renderer extends plugin_renderer_base {
|
||||
array('class' => 'accesshide'));
|
||||
echo html_writer::select($readers, 'logreader', $reportlog->selectedlogreader, false);
|
||||
}
|
||||
echo html_writer::empty_tag('input', array('type' => 'submit', 'value' => get_string('gettheselogs')));
|
||||
echo html_writer::empty_tag('input', array('type' => 'submit', 'value' => get_string('gettheselogs'),
|
||||
'class' => 'btn btn-secondary'));
|
||||
}
|
||||
echo html_writer::end_div();
|
||||
echo html_writer::end_tag('form');
|
||||
|
@ -90,7 +90,8 @@ class report_loglive_renderer extends plugin_renderer_base {
|
||||
public function toggle_liveupdate_button(report_loglive_renderable $reportloglive) {
|
||||
// Add live log controls.
|
||||
if ($reportloglive->page == 0 && $reportloglive->selectedlogreader) {
|
||||
echo html_writer::tag('button' , get_string('pause', 'report_loglive'), array('id' => 'livelogs-pause-button'));
|
||||
echo html_writer::tag('button' , get_string('pause', 'report_loglive'),
|
||||
array('id' => 'livelogs-pause-button', 'class' => 'btn btn-secondary'));
|
||||
$icon = new pix_icon('i/loading_small', 'loading', 'moodle', array('class' => 'spinner'));
|
||||
return html_writer::tag('span', $this->output->render($icon), array('class' => 'spinner'));
|
||||
}
|
||||
|
@ -370,19 +370,20 @@ if (!empty($instanceid) && !empty($roleid)) {
|
||||
}
|
||||
|
||||
if (!empty($CFG->messaging)) {
|
||||
echo '<div class="selectbuttons">';
|
||||
echo '<input type="button" id="checkall" value="'.get_string('selectall').'" /> '."\n";
|
||||
echo '<input type="button" id="checknone" value="'.get_string('deselectall').'" /> '."\n";
|
||||
$buttonclasses = 'btn btn-secondary';
|
||||
echo '<div class="selectbuttons btn-group">';
|
||||
echo '<input type="button" id="checkall" value="'.get_string('selectall').'" class="'. $buttonclasses .'"> '."\n";
|
||||
echo '<input type="button" id="checknone" value="'.get_string('deselectall').'" class="'. $buttonclasses .'"> '."\n";
|
||||
if ($perpage >= $matchcount) {
|
||||
echo '<input type="button" id="checknos" value="'.get_string('selectnos').'" />'."\n";
|
||||
echo '<input type="button" id="checknos" value="'.get_string('selectnos').'" class="'. $buttonclasses .'">'."\n";
|
||||
}
|
||||
echo '</div>';
|
||||
echo '<div>';
|
||||
echo '<div class="p-y-1">';
|
||||
echo html_writer::label(get_string('withselectedusers'), 'formactionselect');
|
||||
$displaylist['messageselect.php'] = get_string('messageselectadd');
|
||||
echo html_writer::select($displaylist, 'formaction', '', array('' => 'choosedots'), array('id' => 'formactionselect'));
|
||||
echo $OUTPUT->help_icon('withselectedusers');
|
||||
echo '<input type="submit" value="' . get_string('ok') . '" />'."\n";
|
||||
echo '<input type="submit" value="' . get_string('ok') . '" class="'. $buttonclasses .'"/>'."\n";
|
||||
echo '</div>';
|
||||
echo '</div>'."\n";
|
||||
echo '</form>'."\n";
|
||||
|
@ -220,7 +220,7 @@ function report_participation_print_filter_form($course, $timefrom, $minlog, $ac
|
||||
$instanceoptions[] = array(get_string('modulenameplural', $module->name)=>$instances);
|
||||
}
|
||||
|
||||
echo '<form class="participationselectform" action="index.php" method="get"><div>'."\n".
|
||||
echo '<form class="participationselectform form-inline" action="index.php" method="get"><div>'."\n".
|
||||
'<input type="hidden" name="id" value="'.$course->id.'" />'."\n";
|
||||
echo '<label for="menuinstanceid">'.get_string('activitymodule').'</label>'."\n";
|
||||
echo html_writer::select($instanceoptions, 'instanceid', $instanceid);
|
||||
@ -229,6 +229,6 @@ function report_participation_print_filter_form($course, $timefrom, $minlog, $ac
|
||||
echo '<label for="menuroleid">'.get_string('showonly').'</label>'."\n";
|
||||
echo html_writer::select($roleoptions,'roleid',$roleid,false);
|
||||
echo '<label for="menuaction">'.get_string('showactions').'</label>'."\n";
|
||||
echo html_writer::select($actionoptions,'action',$action,false);
|
||||
echo '<input type="submit" value="'.get_string('go').'" />'."\n</div></form>\n";
|
||||
echo html_writer::select($actionoptions, 'action', $action, false, ['class' => 'm-r-1']);
|
||||
echo '<input type="submit" value="'.get_string('go').'" class="btn btn-primary"/>'."\n</div></form>\n";
|
||||
}
|
||||
|
@ -6,3 +6,8 @@
|
||||
margin-left: 15px;
|
||||
margin-right: 5px;
|
||||
}
|
||||
|
||||
/* Die to css conflicts with form-inline, we have to create a specific class to fix submit button alignment on clean */
|
||||
#page-report-participation-index .participationselectform input[type="submit"] {
|
||||
margin-bottom: 0;
|
||||
}
|
||||
|
@ -52,7 +52,7 @@ echo '<p id="intro">', get_string('intro', 'report_questioninstances') , '</p>';
|
||||
echo '<p><label for="menuqtype"> ' . get_string('questiontype', 'admin') . '</label> ';
|
||||
echo html_writer::select($qtypechoices, 'qtype', $requestedqtype, array('_all_'=>get_string('all')));
|
||||
echo '</p>';
|
||||
echo '<p><input type="submit" id="settingssubmit" value="' .
|
||||
echo '<p><input type="submit" class="btn btn-secondary" id="settingssubmit" value="' .
|
||||
get_string('getreport', 'report_questioninstances') . '" /></p>';
|
||||
echo '</div></form>';
|
||||
echo $OUTPUT->box_end();
|
||||
|
@ -138,18 +138,18 @@ function report_stats_report($course, $report, $mode, $user, $roleid, $time) {
|
||||
html_writer::label(get_string('users'), 'menuuserid'), html_writer::select($users, 'userid', $userid, false),
|
||||
html_writer::label(get_string('statsreporttype'), 'menureport'), html_writer::select($reportoptions, 'report', ($report == 5) ? $report.$roleid : $report, false),
|
||||
html_writer::label(get_string('statstimeperiod'), 'menutime'), html_writer::select($timeoptions, 'time', $time, false),
|
||||
'<input type="submit" value="'.get_string('view').'" />') ;
|
||||
'<input type="submit" class="btn btn-secondary" value="'.get_string('view').'" />');
|
||||
} else if ($mode == STATS_MODE_RANKED) {
|
||||
$table->align = array('left','left','left','left','left','left');
|
||||
$table->data[] = array(html_writer::label(get_string('statsreporttype'), 'menureport'), html_writer::select($reportoptions, 'report', ($report == 5) ? $report.$roleid : $report, false),
|
||||
html_writer::label(get_string('statstimeperiod'), 'menutime'), html_writer::select($timeoptions, 'time', $time, false),
|
||||
'<input type="submit" value="'.get_string('view').'" />') ;
|
||||
'<input type="submit" class="btn btn-secondary" value="'.get_string('view').'" />');
|
||||
} else if ($mode == STATS_MODE_GENERAL) {
|
||||
$table->align = array('left','left','left','left','left','left','left');
|
||||
$table->data[] = array(html_writer::label(get_string('course'), 'menucourse'), html_writer::select($courseoptions, 'course', $course->id, false),
|
||||
html_writer::label(get_string('statsreporttype'), 'menureport'), html_writer::select($reportoptions, 'report', ($report == 5) ? $report.$roleid : $report, false),
|
||||
html_writer::label(get_string('statstimeperiod'), 'menutime'), html_writer::select($timeoptions, 'time', $time, false),
|
||||
'<input type="submit" value="'.get_string('view').'" />') ;
|
||||
'<input type="submit" class="btn btn-secondary" value="'.get_string('view').'" />');
|
||||
}
|
||||
|
||||
echo '<form action="index.php" method="post">'."\n"
|
||||
|
@ -155,7 +155,9 @@ img.iconsmall {
|
||||
margin-left: auto;
|
||||
margin-right: auto;
|
||||
}
|
||||
|
||||
#page-admin-tool-spamcleaner-index .spamcleanerform input[type="submit"] {
|
||||
margin-bottom: 0;
|
||||
}
|
||||
.path-admin-roles .capabilitysearchui input[type="button"] {
|
||||
margin-bottom: 0;
|
||||
}
|
||||
|
@ -2751,6 +2751,9 @@ img.iconsmall {
|
||||
margin-left: auto;
|
||||
margin-right: auto;
|
||||
}
|
||||
#page-admin-tool-spamcleaner-index .spamcleanerform input[type="submit"] {
|
||||
margin-bottom: 0;
|
||||
}
|
||||
.path-admin-roles .capabilitysearchui input[type="button"] {
|
||||
margin-bottom: 0;
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user