From 78fb3bf3df852f468bbac1e4b598c10bcae7353b Mon Sep 17 00:00:00 2001 From: poltawski Date: Wed, 9 Jan 2008 10:49:05 +0000 Subject: [PATCH] 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. --- course/editcategory.php | 2 +- course/editcategory_form.php | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/course/editcategory.php b/course/editcategory.php index 026e368c997..0b60a3d69fb 100644 --- a/course/editcategory.php +++ b/course/editcategory.php @@ -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); } diff --git a/course/editcategory_form.php b/course/editcategory_form.php index 78b76c910ce..37efa02b629 100644 --- a/course/editcategory_form.php +++ b/course/editcategory_form.php @@ -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')); } } ?>