]> git.mjollnir.org Git - moodle.git/commitdiff
MDL-10886 - Category edit: use 'save changes', enable cancel button to allow us
authorpoltawski <poltawski>
Wed, 9 Jan 2008 10:49:59 +0000 (10:49 +0000)
committerpoltawski <poltawski>
Wed, 9 Jan 2008 10:49:59 +0000 (10:49 +0000)
to get back from where we came from & refine where we are returned to when cancelled.
merged from MOODLE_19_STABLE

course/editcategory.php
course/editcategory_form.php

index 026e368c997f2c308b1198d33c942d3a06f8a7ab..0b60a3d69fb744411ee5942e3e31be00eeb7fa3d 100644 (file)
@@ -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);
     } 
index 78b76c910ceb1e265f5a8e24681e33edd23c61fc..37efa02b629629892a8b39c74928154a494863ad 100644 (file)
@@ -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'));
     }
 } 
 ?>