From: poltawski Date: Wed, 9 Jan 2008 10:49:59 +0000 (+0000) Subject: MDL-10886 - Category edit: use 'save changes', enable cancel button to allow us X-Git-Url: http://git.mjollnir.org/gw?a=commitdiff_plain;h=f62cb19d89a997359797aa632c6e1465745e8a22;p=moodle.git 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 --- diff --git a/course/editcategory.php b/course/editcategory.php index 026e368c99..0b60a3d69f 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 78b76c910c..37efa02b62 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')); } } ?>