Skip to content

Commit 9067e38

Browse files
authored
Merge pull request #146 from catalyst/table-boxes
Issue #141: Added border class to divs for tables
2 parents 16637fd + 8395c9a commit 9067e38

File tree

3 files changed

+8
-8
lines changed

3 files changed

+8
-8
lines changed

classes/local/admin_setting_managemfa.php

+1-1
Original file line numberDiff line numberDiff line change
@@ -193,7 +193,7 @@ public function define_factor_combinations_table() {
193193
$txt = get_strings(array('combination', 'totalweight'), 'tool_mfa');
194194
$table = new \html_table();
195195
$table->id = 'managemfatable';
196-
$table->attributes['class'] = 'admintable generaltable';
196+
$table->attributes['class'] = 'admintable generaltable table table-bordered';
197197
$table->head = array($txt->combination, $txt->totalweight);
198198
$table->colclasses = array('leftalign', 'centeralign');
199199
$table->data = array();

classes/manager.php

+4-4
Original file line numberDiff line numberDiff line change
@@ -42,8 +42,7 @@ public static function display_debug_notification() {
4242
if (!get_config('tool_mfa', 'debugmode')) {
4343
return;
4444
}
45-
46-
$output = $OUTPUT->heading(get_string('debugmode:heading', 'tool_mfa'), 3);
45+
$html = $OUTPUT->heading(get_string('debugmode:heading', 'tool_mfa'), 3);
4746

4847
$table = new \html_table();
4948
$table->head = array(
@@ -53,7 +52,7 @@ public static function display_debug_notification() {
5352
get_string('achievedweight', 'tool_mfa'),
5453
get_string('status'),
5554
);
56-
$table->attributes['class'] = 'admintable generaltable';
55+
$table->attributes['class'] = 'admintable generaltable table table-bordered';
5756
$table->colclasses = array(
5857
'text-right',
5958
'',
@@ -131,7 +130,8 @@ public static function display_debug_notification() {
131130
$OUTPUT->get_state_badge($finalstate),
132131
);
133132

134-
echo \html_writer::table($table);
133+
$html .= \html_writer::table($table);
134+
echo $html;
135135
}
136136

137137
/**

renderer.php

+3-3
Original file line numberDiff line numberDiff line change
@@ -91,6 +91,7 @@ public function setup_factor($factor) {
9191
$html .= $OUTPUT->single_button($setupurl, $factor->get_setup_string());
9292
$html .= html_writer::end_tag('div');
9393
$html .= html_writer::end_tag('div');
94+
$html .= '<br>';
9495

9596
return $html;
9697
}
@@ -117,7 +118,7 @@ public function active_factors() {
117118

118119
$table = new \html_table();
119120
$table->id = 'active_factors';
120-
$table->attributes['class'] = 'generaltable';
121+
$table->attributes['class'] = 'generaltable table table-bordered';
121122
$table->head = array(
122123
$headers->factor,
123124
$headers->devicename,
@@ -176,9 +177,8 @@ public function active_factors() {
176177
if (count($table->data) == 0) {
177178
return '';
178179
}
179-
$html .= $OUTPUT->box_start('generalbox');
180180
$html .= \html_writer::table($table);
181-
$html .= $OUTPUT->box_end();
181+
$html .= '<br>';
182182

183183
return $html;
184184
}

0 commit comments

Comments
 (0)