Reorganize warning and buttons for Edit form #172.

This commit is contained in:
Mikhail Golenkov
2020-02-05 12:51:43 +11:00
parent 587bd3a311
commit d438027a18
2 changed files with 12 additions and 21 deletions

View File

@@ -38,15 +38,11 @@ $PAGE->set_url(new moodle_url('/auth/outage/manage.php'));
$mform = new edit();
if ($mform->is_submitted()) {
$mform->is_validated();
if ($mform->is_cancelled()) {
redirect(new moodle_url('/auth/outage/manage.php'));
} else if ($outage = $mform->get_data()) {
$id = outagedb::save($outage);
redirect(new moodle_url('/auth/outage/manage.php'));
}
if ($mform->is_cancelled()) {
redirect(new moodle_url('/auth/outage/manage.php'));
} else if ($outage = $mform->get_data()) {
$id = outagedb::save($outage);
redirect(new moodle_url('/auth/outage/manage.php'));
}
$clone = optional_param('clone', 0, PARAM_INT);