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);
}
<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>
<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>
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);
} 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>';
}
}
$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;
$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>';
}
$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')
$class = str_replace(']', '', $class);
$attributes['class'] = $class;
}
- $attributes['class'] = 'select custom-select ' . $attributes['class']; // Add 'select' selector always
+ $attributes['class'] = 'select custom-select ' . $attributes['class']; // Add 'select' selector always.
$attributes['name'] = $name;
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">';
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();
$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');
'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.
echo html_writer::select($readers, 'logreader', $reportlog->selectedlogreader, false);
}
echo html_writer::empty_tag('input', array('type' => 'submit', 'value' => get_string('gettheselogs'),
- 'class' => 'btn btn-primary'));
+ 'class' => 'btn btn-secondary'));
}
echo html_writer::end_div();
echo html_writer::end_tag('form');
$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 '<div class="form-group">'."\n";
echo '<label for="menuinstanceid">'.get_string('activitymodule').'</label>'."\n";
echo html_writer::select($instanceoptions, 'instanceid', $instanceid);
- echo '</div>'."\n";
- echo '<div class="form-group form-inline">'."\n";
- echo '<div class="form-group">'."\n";
echo '<label for="menutimefrom">'.get_string('lookback').'</label>'."\n";
echo html_writer::select($timeoptions,'timefrom',$timefrom);
- echo '</div>'."\n";
- echo '<div class="form-group">'."\n";
echo '<label for="menuroleid">'.get_string('showonly').'</label>'."\n";
echo html_writer::select($roleoptions,'roleid',$roleid,false);
- echo '</div>'."\n";
- echo '<div class="form-group">'."\n";
echo '<label for="menuaction">'.get_string('showactions').'</label>'."\n";
- echo html_writer::select($actionoptions,'action',$action,false);
- echo '</div>'."\n";
- echo '</div>'."\n";
- echo '<input type="submit" value="'.get_string('go').'" class="btn btn-primary" />'."\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";
}
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;
+}
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();
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"
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;
}
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;
}