Replace custom html button with OUTPUT->single_button #172.

This commit is contained in:
Mikhail Golenkov
2020-02-05 14:09:34 +11:00
parent d438027a18
commit c724e1abe4

View File

@@ -30,6 +30,7 @@ use auth_outage\dml\outagedb;
defined('MOODLE_INTERNAL') || die();
global $OUTPUT;
$urlnew = new moodle_url('/auth/outage/edit.php');
echo $viewbag['warning'];
@@ -50,9 +51,7 @@ echo $viewbag['warning'];
<?php endif; ?>
<?php $outage = outagedb::get_ongoing(); ?>
<?php if (is_null($outage)): ?>
<input type="button" class="form-submit"
value="<?php echo get_string('outagecreate', 'auth_outage'); ?>"
onclick="location.href='<?php echo $urlnew; ?>';"/>
<?php echo $OUTPUT->single_button($urlnew, get_string('outagecreate', 'auth_outage')); ?>
<?php endif; ?>
</section>