From 1f1aa4452503d2bc7e40083844fc0c66a8024810 Mon Sep 17 00:00:00 2001 From: nicolasconnault Date: Fri, 28 Aug 2009 08:00:15 +0000 Subject: [PATCH] MDL-19756 Corrected an incorrect default text for the "cancel" button of a confirm dialog --- admin/index.php | 5 ++++- lib/outputrenderers.php | 1 + 2 files changed, 5 insertions(+), 1 deletion(-) diff --git a/admin/index.php b/admin/index.php index 1b5be55960..b545108317 100644 --- a/admin/index.php +++ b/admin/index.php @@ -191,7 +191,10 @@ if ($version > $CFG->version) { // upgrade $continueform = new html_form(); $continueform->method = 'get'; $continueform->url = new moodle_url('index.php', array('confirmupgrade' => 1)); - echo $OUTPUT->confirm(get_string('upgradesure', 'admin', $a->newversion), $continueform, 'index.php'); + $cancelform = new html_form(); + $cancelform->url = new moodle_url('index.php'); + $cancelform->button->text = get_string('no'); + echo $OUTPUT->confirm(get_string('upgradesure', 'admin', $a->newversion), $continueform, $cancelform); echo $OUTPUT->footer(); exit; diff --git a/lib/outputrenderers.php b/lib/outputrenderers.php index 51b78f0eee..09ef445963 100644 --- a/lib/outputrenderers.php +++ b/lib/outputrenderers.php @@ -1114,6 +1114,7 @@ class moodle_core_renderer extends moodle_renderer_base { $cancel = $cancelform; } else if ($cancel instanceof moodle_url) { $cancelform = new html_form(); + $cancelform->button->text = get_string('cancel'); $cancelform->url = $cancel; $cancel = $cancelform; } else { -- 2.39.5