MDL-10886 - Category edit: use 'save changes', enable cancel button to allow us
to get back from where we came from & refine where we are returned to when cancelled. merged from MOODLE_19_STABLE
This commit is contained in:
@@ -50,7 +50,7 @@ if (!empty($category)) {
|
||||
|
||||
if ($mform->is_cancelled()){
|
||||
if (empty($category)) {
|
||||
redirect($CFG->wwwroot);
|
||||
redirect($CFG->wwwroot .'/course/index.php?categoryedit=on');
|
||||
} else {
|
||||
redirect($CFG->wwwroot.'/course/category.php?categoryedit=on&id='.$category->id);
|
||||
}
|
||||
|
||||
@@ -28,7 +28,7 @@ class editcategory_form extends moodleform {
|
||||
$mform->addElement('hidden', 'id', null);
|
||||
$mform->addElement('hidden', 'categoryadd', 0);
|
||||
$mform->setType('id', PARAM_INT);
|
||||
$this->add_action_buttons(false, get_string('submit'));
|
||||
$this->add_action_buttons(true, get_string('savechanges'));
|
||||
}
|
||||
}
|
||||
?>
|
||||
|
||||
Reference in New Issue
Block a user