Browse Source

Add some button classes to attendance buttons to improve display.

MOODLE_33_STABLE
Dan Marsden 8 years ago
parent
commit
a69bdf1d26
  1. 11
      renderer.php

11
renderer.php

@ -166,6 +166,7 @@ class mod_attendance_renderer extends plugin_renderer_base {
$params = array( $params = array(
'title' => get_string('calshow', 'attendance'), 'title' => get_string('calshow', 'attendance'),
'id' => 'show', 'id' => 'show',
'class' => 'btn btn-secondary',
'type' => 'button'); 'type' => 'button');
$buttonform = html_writer::tag('button', $fcontrols->curdatetxt, $params); $buttonform = html_writer::tag('button', $fcontrols->curdatetxt, $params);
foreach ($fcontrols->url_params(array('curdate' => '')) as $name => $value) { foreach ($fcontrols->url_params(array('curdate' => '')) as $name => $value) {
@ -375,6 +376,7 @@ class mod_attendance_renderer extends plugin_renderer_base {
$attributes = array( $attributes = array(
'type' => 'submit', 'type' => 'submit',
'name' => 'deletehiddensessions', 'name' => 'deletehiddensessions',
'class' => 'btn btn-secondary',
'value' => get_string('deletehiddensessions', 'attendance')); 'value' => get_string('deletehiddensessions', 'attendance'));
$table->data[1][] = html_writer::empty_tag('input', $attributes); $table->data[1][] = html_writer::empty_tag('input', $attributes);
} }
@ -386,7 +388,8 @@ class mod_attendance_renderer extends plugin_renderer_base {
$attributes = array( $attributes = array(
'type' => 'submit', 'type' => 'submit',
'name' => 'ok', 'name' => 'ok',
'value' => get_string('ok')); 'value' => get_string('ok'),
'class' => 'btn btn-secondary');
$controls .= html_writer::empty_tag('input', $attributes); $controls .= html_writer::empty_tag('input', $attributes);
} else { } else {
$controls = get_string('youcantdo', 'attendance'); // You can't do anything. $controls = get_string('youcantdo', 'attendance'); // You can't do anything.
@ -415,6 +418,7 @@ class mod_attendance_renderer extends plugin_renderer_base {
$table .= html_writer::end_div(); $table .= html_writer::end_div();
$params = array( $params = array(
'type' => 'submit', 'type' => 'submit',
'class' => 'btn btn-primary',
'value' => get_string('save', 'attendance')); 'value' => get_string('save', 'attendance'));
$table .= html_writer::tag('center', html_writer::empty_tag('input', $params)); $table .= html_writer::tag('center', html_writer::empty_tag('input', $params));
$table = html_writer::tag('form', $table, array('method' => 'post', 'action' => $takedata->url_path(), $table = html_writer::tag('form', $table, array('method' => 'post', 'action' => $takedata->url_path(),
@ -1146,7 +1150,9 @@ class mod_attendance_renderer extends plugin_renderer_base {
$output .= html_writer::empty_tag('input', array('name' => 'returnto', 'type' => 'hidden', 'value' => s(me()))); $output .= html_writer::empty_tag('input', array('name' => 'returnto', 'type' => 'hidden', 'value' => s(me())));
$output .= html_writer::table($table).html_writer::tag('div', get_string('users').': '.count($reportdata->users));; $output .= html_writer::table($table).html_writer::tag('div', get_string('users').': '.count($reportdata->users));;
$output .= html_writer::tag('div', $output .= html_writer::tag('div',
html_writer::empty_tag('input', array('type' => 'submit', 'value' => get_string('messageselectadd'))), html_writer::empty_tag('input', array('type' => 'submit',
'value' => get_string('messageselectadd'),
'class' => 'btn btn-secondary')),
array('class' => 'buttons')); array('class' => 'buttons'));
$url = new moodle_url('/user/action_redir.php'); $url = new moodle_url('/user/action_redir.php');
return html_writer::tag('form', $output, array('action' => $url->out(), 'method' => 'post')); return html_writer::tag('form', $output, array('action' => $url->out(), 'method' => 'post'));
@ -1816,6 +1822,7 @@ class mod_attendance_renderer extends plugin_renderer_base {
$attributes = array( $attributes = array(
'type' => 'submit', 'type' => 'submit',
'value' => $text, 'value' => $text,
'class' => 'btn btn-secondary',
'onclick' => 'M.mod_attendance.set_preferences_action('.$action.')'); 'onclick' => 'M.mod_attendance.set_preferences_action('.$action.')');
return html_writer::empty_tag('input', $attributes); return html_writer::empty_tag('input', $attributes);
} }

Loading…
Cancel
Save