public function substage_buttons($haserrors) {
        $output  = html_writer::start_tag('div', array('continuebutton'));
        if (!$haserrors) {
            $attrs = array('type' => 'submit', 'value' => get_string('continue'), 'class' => 'btn btn-primary');
            $output .= html_writer::empty_tag('input', $attrs);
        }
        $attrs = array('type' => 'submit', 'name' => 'cancel', 'value' => get_string('cancel'), 'class' => 'btn btn-secondary');
        $output .= html_writer::empty_tag('input', $attrs);
        $output .= html_writer::end_tag('div');
        return $output;
    }