]> git.mjollnir.org Git - moodle.git/commitdiff
MDL-21198 used new simple_button class when doing OUTPUT->confirm() - more consistent...
authorPetr Skoda <skodak@moodle.org>
Sun, 3 Jan 2010 20:47:13 +0000 (20:47 +0000)
committerPetr Skoda <skodak@moodle.org>
Sun, 3 Jan 2010 20:47:13 +0000 (20:47 +0000)
24 files changed:
admin/delete.php
admin/filters.php
admin/innodb.php
admin/mnet/index.php
admin/roles/manage.php
admin/user/user_bulk_confirm.php
admin/user/user_bulk_delete.php
admin/user/user_bulk_forcepasswordchange.php
admin/user/user_bulk_message.php
admin/webservice/service.php
admin/webservice/service_functions.php
course/mod.php
grade/edit/tree/index.php
grade/export/key.php
grade/import/key.php
group/delete.php
group/group.php
group/grouping.php
mod/lesson/pagetypes/branchtable.php
mod/lesson/view.php
portfolio/add.php
repository/manage_instances.php
user/policy.php
user/profile/index.php

index d025c8b841ec1b6d30febdcb07ea9ce1724d1c86..6f7f86d341ffd0ce8ee427593cd24f412626a551 100644 (file)
@@ -23,8 +23,8 @@
     if (empty($sure)) {
         $optionsyes = array('sure'=>'yes', 'sesskey'=>sesskey());
 
-        $formcontinue = html_form::make_button('delete.php', $optionsyes, get_string('yes'));
-        $formcancel = html_form::make_button('index.php', null, get_string('no'), 'get');
+        $formcontinue = new single_button(new moodle_url('delete.php', $optionsyes), get_string('yes'));
+        $formcancel = new single_button('index.php', get_string('no'), 'get');
         echo $OUTPUT->confirm('Are you completely sure you want to delete everything inside the directory '. $deletedir .' ?', $formcontinue, $formcancel);
         echo $OUTPUT->footer();
         exit;
@@ -32,8 +32,8 @@
 
     if (!data_submitted() or empty($reallysure)) {
         $optionsyes = array('sure'=>'yes', 'sesskey'=>sesskey(), 'reallysure'=>'yes');
-        $formcontinue = html_form::make_button('delete.php', $optionsyes, get_string('yes'));
-        $formcancel = html_form::make_button('index.php', null, get_string('no'), 'get');
+        $formcontinue = new single_button(new moodle_url('delete.php', $optionsyes), get_string('yes'));
+        $formcancel = new signle_button('index.php', get_string('no'), 'get');
         echo $OUTPUT->confirm('Are you REALLY REALLY completely sure you want to delete everything inside the directory '.
                 $deletedir .' (this includes all user images, and any other course files that have been created) ?',
                 $formcontinue, $formcancel);
index 4cd44867147106914e7599a765ae59e15b72d713..aee822176d097a9f61d37cf9a74d998438945f73 100644 (file)
             echo $OUTPUT->heading($title);
 
             $linkcontinue = new moodle_url($returnurl, array('action' => 'delete', 'filterpath' => $filterpath, 'confirm' => 1));
-            $formcancel = html_form::make_button($returnurl, null, get_string('no'), 'get');
+            $formcancel = new single_button($returnurl, get_string('no'), 'get');
             echo $OUTPUT->confirm(get_string('deletefilterareyousuremessage', 'admin', $filtername), $linkcontinue, $formcancel);
             echo $OUTPUT->footer();
             exit;
index c1dda3c672fa14c7e06fd05d651540c49133503f..5715641c5dc08f14a634264e482688c9cd301ec2 100644 (file)
@@ -36,8 +36,8 @@
 
     } else {
         $optionsyes = array('confirm'=>'1', 'sesskey'=>sesskey());
-        $formcontinue = html_form::make_button('innodb.php', $optionsyes, get_string('yes'));
-        $formcancel = html_form::make_button('index.php', null, get_string('no'), 'get');
+        $formcontinue = new single_button(new moodle_url('innodb.php', $optionsyes), get_string('yes'));
+        $formcancel = new single_button('index.php', get_string('no'), 'get');
         echo $OUTPUT->confirm('Are you sure you want convert all your tables to the InnoDB format?', $formcontinue, $formcancel);
         echo $OUTPUT->footer();
     }
index 32378c864a6ee6318f36b26b72d9ac2a8aa65f2b..2dc12e35a6b1332199e41f0d5947647a2cada9bd 100644 (file)
@@ -45,8 +45,8 @@
             $MNET->get_private_key();
             $SESSION->mnet_confirm_delete_key = md5(sha1($MNET->keypair['keypair_PEM'])).':'.time();
 
-            $formcontinue = html_form::make_button('index.php', array('confirm' => md5($MNET->public_key)), get_string('yes'));
-            $formcancel = html_form::make_button('index.php', null, get_string('no'), 'get');
+            $formcontinue = new single_button(new moodle_url('index.php', array('confirm' => md5($MNET->public_key))), get_string('yes'));
+            $formcancel = new single_button('index.php', get_string('no'), 'get');
             echo $OUTPUT->confirm(get_string("deletekeycheck", "mnet"), $formcontinue, $formcancel);
             exit;
         } else {
index ed160fae539e20c6401dbb58e843ea08cfff3189..1aeaf6130d2fcd8332841052f96c82e321fe52df 100755 (executable)
@@ -90,8 +90,8 @@
                 $a->shortname = $roles[$roleid]->shortname;
                 $a->count = $DB->count_records('role_assignments', array('roleid'=>$roleid));
 
-                $formcontinue = html_form::make_button($baseurl, array('confirm' => 1, 'msg' => $msg), get_string('yes'));
-                $formcancel = html_form::make_button($baseurl, $optionsno, get_string('no'), 'get');
+                $formcontinue = new single_button(new moodle_url($baseurl, $optionsyes), get_string('yes'));
+                $formcancel = new single_button($baseurl, get_string('no'), 'get');
                 echo $OUTPUT->confirm(get_string('deleterolesure', 'role', $a), $formcontinue, $formcancel);
                 echo $OUTPUT->footer();
                 die;
                 } else {
                     $warning = get_string('resetrolesure', 'role', $a);
                 }
-                $formcontinue = html_form::make_button('manage.php', array('confirm' => 1, 'msg' => $msg), get_string('yes'));
-                $formcancel = html_form::make_button('manage.php', $optionsno, get_string('no'), 'get');
+                $formcontinue = new single_button(new moodle_url('manage.php', $optionsyes), get_string('yes'));
+                $formcancel = new single_button(new moodle_url('manage.php', $optionsno), get_string('no'), 'get');
                 echo $OUTPUT->confirm(get_string('confirmmessage', 'bulkusers', $usernames), $formcontinue, $formcancel);
                 echo $OUTPUT->footer();
                 die;
index f6603a05b1f10c8a8bf4df825220bab8e160b6b4..a129b8595398f5bb8053ee529fb4a549b3edb324 100755 (executable)
@@ -44,8 +44,8 @@ if ($confirm and confirm_sesskey()) {
     $userlist = $DB->get_records_select_menu('user', "id $in", $params, 'fullname', 'id,'.$DB->sql_fullname().' AS fullname');
     $usernames = implode(', ', $userlist);
     echo $OUTPUT->heading(get_string('confirmation', 'admin'));
-    $formcontinue = html_form::make_button('user_bulk_confirm.php', array('confirm' => 1), get_string('yes'));
-    $formcancel = html_form::make_button('user_bulk.php', $optionsno, get_string('no'), 'get');
+    $formcontinue = new single_button(new moodle_url('user_bulk_confirm.php', array('confirm' => 1)), get_string('yes'));
+    $formcancel = new single_button('user_bulk.php', get_string('no'), 'get');
     echo $OUTPUT->confirm(get_string('confirmcheckfull', '', $usernames), $formcontinue, $formcancel);
 }
 
index 0b398668f5acb11c0feaa2778a174c74cb087c66..a30b3fe179c1e803a31462b12864af8f75d2aa91 100755 (executable)
@@ -44,8 +44,8 @@ if ($confirm and confirm_sesskey()) {
     $userlist = $DB->get_records_select_menu('user', "id $in", $params, 'fullname', 'id,'.$DB->sql_fullname().' AS fullname');
     $usernames = implode(', ', $userlist);
     echo $OUTPUT->heading(get_string('confirmation', 'admin'));
-    $formcontinue = html_form::make_button('user_bulk_delete.php', array('confirm' => 1), get_string('yes'));
-    $formcancel = html_form::make_button('user_bulk.php', $optionsno, get_string('no'), 'get');
+    $formcontinue = new single_button(new moodle_url('user_bulk_delete.php', array('confirm' => 1)), get_string('yes'));
+    $formcancel = new single_button('user_bulk.php', get_string('no'), 'get');
     echo $OUTPUT->confirm(get_string('deletecheckfull', '', $usernames), $formcontinue, $formcancel);
 }
 
index e32e6169e10194f40917415876c5433b7dd8756e..9af2050b6cc35cbf73e4144f680a10840a72a32f 100644 (file)
@@ -60,8 +60,8 @@ if ($confirm and confirm_sesskey()) {
         $usernames .= ', ...';
     }
     echo $OUTPUT->heading(get_string('confirmation', 'admin'));
-    $formcontinue = html_form::make_button('user_bulk_forcepasswordchange.php', array('confirm' => 1), get_string('yes'));
-    $formcancel = html_form::make_button('user_bulk.php', array(), get_string('no'), 'get');
+    $formcontinue = new single_button(new moodle_url('user_bulk_forcepasswordchange.php', array('confirm' => 1)), get_string('yes'));
+    $formcancel = new single_button('user_bulk.php', get_string('no'), 'get');
     echo $OUTPUT->confirm(get_string('forcepasswordchangecheckfull', '', $usernames), $formcontinue, $formcancel);
 }
 
index 67819be736b1a9c16e963dcc83fe44e77eec0ded..21d8d7f459cf795b9c5f58da54283a99594bb950 100755 (executable)
@@ -59,8 +59,8 @@ if ($msgform->is_cancelled()) {
     echo $OUTPUT->heading(get_string('confirmation', 'admin'));
     echo $OUTPUT->box($msg, 'boxwidthnarrow boxaligncenter generalbox', 'preview');
 
-    $formcontinue = html_form::make_button('user_bulk_message.php', array('confirm' => 1, 'msg' => $msg), get_string('yes'));
-    $formcancel = html_form::make_button('user_bulk.php', $optionsno, get_string('no'), 'get');
+    $formcontinue = new single_button(new moodle_url('user_bulk_message.php', array('confirm' => 1, 'msg' => $msg)), get_string('yes'));
+    $formcancel = new single_button('user_bulk.php', get_string('no'), 'get');
     echo $OUTPUT->confirm(get_string('confirmmessage', 'bulkusers', $usernames), $formcontinue, $formcancel);
     echo $OUTPUT->footer();
     die;
index 5ce40846ea0ac04f85a3a0f72776b67cf7101607..8abde5c75f00b9aa3ac15d5913d0ff536dc9a4d6 100644 (file)
@@ -48,8 +48,8 @@ if ($action == 'delete' and confirm_sesskey() and $service and empty($service->c
         admin_externalpage_print_header();
         $optionsyes = array('id'=>$id, 'action'=>'delete', 'confirm'=>1, 'sesskey'=>sesskey());
         $optionsno  = array('section'=>'externalservices');
-        $formcontinue = html_form::make_button('service.php', $optionsyes, get_string('delete'), 'post');
-        $formcancel = html_form::make_button("$CFG->wwwroot/$CFG->admin/settings.php", $optionsno, get_string('cancel'), 'get');
+        $formcontinue = new single_button(new moodle_url('service.php', $optionsyes), get_string('delete'), 'post');
+        $formcancel = new single_button(new moodle_url("$CFG->wwwroot/$CFG->admin/settings.php", $optionsno), get_string('cancel'), 'get');
         echo $OUTPUT->confirm(get_string('deleteserviceconfirm', 'webservice', $service->name), $formcontinue, $formcancel);
         echo $OUTPUT->footer();
         die;
index f2153a4f5ec686bd163b13360283e9512391b62f..9c20ee309d20394f96184df5e41c753ded50aaa2 100644 (file)
@@ -48,8 +48,8 @@ if ($action === 'delete' and confirm_sesskey() and $service and empty($service->
         admin_externalpage_print_header();
         $optionsyes = array('id'=>$id, 'action'=>'delete', 'confirm'=>1, 'sesskey'=>sesskey(), 'fid'=>$function->id);
         $optionsno  = array('id'=>$id);
-        $formcontinue = html_form::make_button('service_functions.php', $optionsyes, get_string('delete'), 'post');
-        $formcancel = html_form::make_button('service_functions.php', $optionsno, get_string('cancel'), 'get');
+        $formcontinue = new single_button(new moodle_url('service_functions.php', $optionsyes), get_string('delete'));
+        $formcancel = new single_button(new moodle_url('service_functions.php', $optionsno), get_string('cancel'), 'get');
         echo $OUTPUT->confirm(get_string('removefunctionconfirm', 'webservice', (object)array('service'=>$service->name, 'function'=>$function->name)), $formcontinue, $formcancel);
         echo $OUTPUT->footer();
         die;
index 2233f0b94810d8c3f98ea007eb8c239c03bdbbec..ef70af60e9559a69319948d2027ab05fe79551bf 100644 (file)
@@ -112,8 +112,8 @@ if (!empty($add)) {
 
         // print_simple_box_start('center', '60%', '#FFAAAA', 20, 'noticebox');
         echo $OUTPUT->box_start('noticebox');
-        $formcontinue = html_form::make_button("$CFG->wwwroot/course/mod.php", $optionsyes, get_string('yes'));
-        $formcancel = html_form::make_button($return, $optionsno, get_string('no'), 'get');
+        $formcontinue = new single_button(new moodle_url("$CFG->wwwroot/course/mod.php", $optionsyes), get_string('yes'));
+        $formcancel = new single_button(new moodle_url($return, $optionsno), get_string('no'), 'get');
         echo $OUTPUT->confirm($strdeletecheckfull, $formcontinue, $formcancel);
         echo $OUTPUT->box_end();
         echo $OUTPUT->footer();
index d3a6b389fdbe9afc42a31bc4e7c410d7fa478773..d35bafad4bd073869ff337a2ce8492e1b239111a 100644 (file)
@@ -164,8 +164,8 @@ switch ($action) {
                 $strdeletecheckfull = get_string('deletecheck', '', $object->get_name());
                 $optionsyes = array('eid'=>$eid, 'confirm'=>1, 'sesskey'=>sesskey(), 'id'=>$course->id, 'action'=>'delete');
                 $optionsno  = array('id'=>$course->id);
-                $formcontinue = html_form::make_button('index.php', $optionsyes, get_string('yes'));
-                $formcancel = html_form::make_button('index.php', $optionsno, get_string('no'), 'get');
+                $formcontinue = new single_button(new moodle_url('index.php', $optionsyes), get_string('yes'));
+                $formcancel = new signle_button(new moodle_url('index.php', $optionsno), get_string('no'), 'get');
                 echo $OUTPUT->confirm($strdeletecheckfull, $formcontinue, $formcancel);
                 echo $OUTPUT->footer();
                 die;
index 962b3714f933bab37938cbac8d629e5a1231a8da..0bfc0196600f90c98d814ff9cf83dc0a34a81e71 100644 (file)
@@ -76,8 +76,8 @@ if ($id and $delete) {
         echo $OUTPUT->header();
         $optionsyes = array('id'=>$id, 'delete'=>1, 'courseid'=>$courseid, 'sesskey'=>sesskey(), 'confirm'=>1);
         $optionsno  = array('id'=>$courseid);
-        $formcontinue = html_form::make_button('key.php', $optionsyes, get_string('yes'), 'get');
-        $formcancel = html_form::make_button('keymanager.php', $optionsno, get_string('no'), 'get');
+        $formcontinue = new single_button(new moodle_url('key.php', $optionsyes), get_string('yes'), 'get');
+        $formcancel = new single_button(new moodle_url('keymanager.php', $optionsno), get_string('no'), 'get');
         echo $OUTPUT->confirm(get_string('deletekeyconfirm', 'userkey', $key->value), $formcontinue, $formcancel);
         echo $OUTPUT->footer();
         die;
index 93f3b358691c899f81df7b45ac609ecc8c809f77..ddf135bc2b27e029e285559f1c789a3f09b418ce 100644 (file)
@@ -76,8 +76,8 @@ if ($id and $delete) {
         echo $OUTPUT->header();
         $optionsyes = array('id'=>$id, 'delete'=>1, 'courseid'=>$courseid, 'sesskey'=>sesskey(), 'confirm'=>1);
         $optionsno  = array('id'=>$courseid);
-        $formcontinue = html_form::make_button('key.php', $optionsyes, get_string('yes'), 'get');
-        $formcancel = html_form::make_button('keymanager.php', $optionsno, get_string('no'), 'get');
+        $formcontinue = new single_button(new moodle_url('key.php', $optionsyes), get_string('yes'), 'get');
+        $formcancel = new single_button(new moodle_url('keymanager.php', $optionsno), get_string('no'), 'get');
         echo $OUTPUT->confirm(get_string('deletekeyconfirm', 'userkey', $key->value), $formcontinue, $formcancel);
         echo $OUTPUT->footer();
         die;
index 7fa0ec66ec790a145d667fa80950d73e214f929c..c953e2cf56397670e75c247278c85d78825cc2d4 100644 (file)
@@ -70,8 +70,8 @@ if ($confirm && data_submitted()) {
         }
         $message.='</ul>';
     }
-    $formcontinue = html_form::make_button('delete.php', $optionsyes, get_string('yes'), 'post');
-    $formcancel = html_form::make_button('index.php', $optionsno, get_string('no'), 'get');
+    $formcontinue = new single_button(new moodle_url('delete.php', $optionsyes), get_string('yes'), 'post');
+    $formcancel = new single_button(new moodle_url('index.php', $optionsno), get_string('no'), 'get');
     echo $OUTPUT->confirm($message, $formcontinue, $formcancel);
     echo $OUTPUT->footer();
 }
index 4e355482461ec156b96ace6613306e3709ae73e7..d8924ffe764ad1cb9b0941d2098ced40e0f36898 100644 (file)
@@ -67,8 +67,8 @@ if ($id and $delete) {
         echo $OUTPUT->header();
         $optionsyes = array('id'=>$id, 'delete'=>1, 'courseid'=>$courseid, 'sesskey'=>sesskey(), 'confirm'=>1);
         $optionsno  = array('id'=>$courseid);
-        $formcontinue = html_form::make_button('group.php', $optionsyes, get_string('yes'), 'get');
-        $formcancel = html_form::make_button($baseurl, $optionsno, get_string('no'), 'get');
+        $formcontinue = new single_button(new moodle_url('group.php', $optionsyes), get_string('yes'), 'get');
+        $formcancel = new single_button(new moodle_url($baseurl, $optionsno), get_string('no'), 'get');
         echo $OUTPUT->confirm(get_string('deletegroupconfirm', 'group', $group->name), $formcontinue, $formcancel);
         echo $OUTPUT->footer();
         die;
index 7890ab00492baa56fd29f62e83591e73869e5ff9..e56d720c0d5c991f2b406ce01d69293f89badd9c 100644 (file)
@@ -62,8 +62,8 @@ if ($id and $delete) {
         echo $OUTPUT->header();
         $optionsyes = array('id'=>$id, 'delete'=>1, 'courseid'=>$courseid, 'sesskey'=>sesskey(), 'confirm'=>1);
         $optionsno  = array('id'=>$courseid);
-        $formcontinue = html_form::make_button('grouping.php', $optionsyes, get_string('yes'), 'get');
-        $formcancel = html_form::make_button('groupings.php', $optionsno, get_string('no'), 'get');
+        $formcontinue = new single_button(new moodle_url('grouping.php', $optionsyes), get_string('yes'), 'get');
+        $formcancel = new single_button(new moodle_url('groupings.php', $optionsno), get_string('no'), 'get');
         echo $OUTPUT->confirm(get_string('deletegroupingconfirm', 'group', $grouping->name), $formcontinue, $formcancel);
         echo $OUTPUT->footer();
         die;
index ce8d63a4b40f8f35996775641c5d8d40daaeaf58..c059c75570daaf2bc69f9820186e822a09f2bc44 100644 (file)
@@ -92,7 +92,7 @@ class lesson_page_type_branchtable extends lesson_page {
             $params['pageid'] = $this->properties->id;
             $params['sesskey'] = sesskey();
             $params['jumpto'] = $answer->jumpto;
-            $buttons[] = $renderer->button(html_form::make_button($CFG->wwwroot.'/mod/lesson/continue.php', $params, strip_tags(format_text($answer->answer, FORMAT_MOODLE, $options))));
+            $buttons[] = $renderer->button(new single_button(new moodle_url($CFG->wwwroot.'/mod/lesson/continue.php', $params), strip_tags(format_text($answer->answer, FORMAT_MOODLE, $options))));
             $i++;
         }
         // Set the orientation
index 56830f66a460d87ec3502b781ad35409c053fc9c..fe21fa9562f116d36009fd94ad64b8ca0c376187 100644 (file)
@@ -218,10 +218,10 @@ if (empty($pageid)) {
         echo $lessonoutput->header($lesson, $cm);
         if ($lesson->timed) {
             if ($lesson->retake) {
-                $continuelink = html_form::make_button($CFG->wwwroot.'/mod/lesson/view.php', array('id'=>$cm->id, 'pageid'=>$lesson->firstpageid, 'startlastseen'=>'no'), get_string('continue', 'lesson'), 'get');
+                $continuelink = new single_button(new moodle_url($CFG->wwwroot.'/mod/lesson/view.php', array('id'=>$cm->id, 'pageid'=>$lesson->firstpageid, 'startlastseen'=>'no')), get_string('continue', 'lesson'), 'get');
                 echo $lessonoutput->message(get_string('leftduringtimed', 'lesson'), $continuelink);
             } else {
-                $courselink = html_form::make_button($CFG->wwwroot.'/course/view.php', array('id'=>$PAGE->course->id), get_string('returntocourse', 'lesson'), 'get');
+                $courselink = new single_button(new moodle_url($CFG->wwwroot.'/course/view.php', array('id'=>$PAGE->course->id)), get_string('returntocourse', 'lesson'), 'get');
                 echo $lessonoutput->message(get_string('leftduringtimednoretake', 'lesson'), $courselink);
             }
         } else {
@@ -234,7 +234,7 @@ if (empty($pageid)) {
     if ($attemptflag) {
         if (!$lesson->retake) {
             echo $lessonoutput->header($lesson, $cm, 'view');
-            $courselink = html_form::make_button($CFG->wwwroot.'/course/view.php', array('id'=>$PAGE->course->id), get_string('returntocourse', 'lesson'), 'get');
+            $courselink = new single_button(new moodle_url($CFG->wwwroot.'/course/view.php', array('id'=>$PAGE->course->id)), get_string('returntocourse', 'lesson'), 'get');
             echo $lessonoutput->message(get_string("noretake", "lesson"), $courselink);
             echo $lessonoutput->footer();
             exit();
index e9a7f1b080e42ea41b6967c7c2008dc7e2d9f8c2..ec0c9293f01918f79f617870e13817be98dee49b 100644 (file)
@@ -94,8 +94,8 @@ if (!empty($dataid)) {
         } else {
             $exporter->print_header('confirmcancel');
             echo $OUTPUT->box_start();
-            $yesbutton = html_form::make_button($CFG->wwwroot . '/portfolio/add.php', array('id' => $dataid, 'cancel' => 1, 'cancelsure' => 1, 'logreturn' => $logreturn));
-            $nobutton  = html_form::make_button($CFG->wwwroot . '/portfolio/add.php', array('id' => $dataid), get_string('no'));
+            $yesbutton = new single_button(new moodle_url($CFG->wwwroot . '/portfolio/add.php', array('id' => $dataid, 'cancel' => 1, 'cancelsure' => 1, 'logreturn' => $logreturn)). get_string('yes'));
+            $nobutton  = new single_button(new moodle_url($CFG->wwwroot . '/portfolio/add.php', array('id' => $dataid)), get_string('no'));
             if ($logreturn) {
                 $nobutton->url = $CFG->wwwroot . '/user/portfoliologs.php';
             }
index ac823dac0dd89b729f6b3a50140aec1ee154650f..db1d5c9beb4e2b0b28a9d6275d5eebd03c10cd8c 100644 (file)
@@ -220,8 +220,8 @@ if (!empty($edit) || !empty($new)) {
         }
         exit;
     }
-    $formcontinue = html_form::make_button($baseurl, array('delete' => $delete, 'sure' => 'yes'), get_string('yes'));
-    $formcancel = html_form::make_button($baseurl, array(), get_string('no'));
+    $formcontinue = new single_button(new moodle_url($baseurl, array('delete' => $delete, 'sure' => 'yes')), get_string('yes'));
+    $formcancel = new single_button($baseurl, get_string('no'));
     echo $OUTPUT->confirm(get_string('confirmdelete', 'repository', $instance->name), $formcontinue, $formcancel);
     $return = false;
 } else {
index 5a6b551523e3c69e98c0f9777985750eef8b7577..1509d2313ddeb1befcee080ff40201225fd5cca3 100644 (file)
@@ -81,8 +81,8 @@ echo '<object id="policyframe" data="'.$CFG->sitepolicy.'" type="'.$mimetype.'">
 echo '<a href="'.$CFG->sitepolicy.'" onclick="this.target=\'_blank\'">'.$strpolicyagreementclick.'</a>';
 echo '</object></div>';
 
-$formcontinue = html_form::make_button('policy.php', array('agree'=>1), get_string('yes'));
-$formcancel = html_form::make_button($CFG->wwwroot.'/login/logout.php', array(), get_string('no'));
+$formcontinue = new single_button(new moodle_url('policy.php', array('agree'=>1)), get_string('yes'));
+$formcancel = new single_button($CFG->wwwroot.'/login/logout.php', get_string('no'));
 echo $OUTPUT->confirm($strpolicyagree, $formcontinue, $formcancel);
 
 echo $OUTPUT->footer();
index 6b5bdc5f4e6aaee86e0564119aaedda309814b69..e6457fd723608a3dc8fa7613a880832a6ed7f6a5 100644 (file)
@@ -54,8 +54,8 @@ switch ($action) {
         admin_externalpage_print_header();
         echo $OUTPUT->heading('profiledeletecategory', 'admin');
 
-        $formcontinue = html_form::make_button($redirect, $optionsyes, get_string('yes'), 'post');
-        $formcancel = html_form::make_button($redirect, array(), get_string('no'), 'get');
+        $formcontinue = new single_button(new moodle_url($redirect, $optionsyes), get_string('yes'), 'post');
+        $formcancel = new single_button($redirect, get_string('no'), 'get');
         echo $OUTPUT->confirm(get_string('profileconfirmcategorydeletion', 'admin', $fieldcount), $formcontinue, $formcancel);
         echo $OUTPUT->footer();
         die;
@@ -76,8 +76,8 @@ switch ($action) {
         $PAGE->navbar->add($strheading);
         admin_externalpage_print_header();
         echo $OUTPUT->heading($strheading);
-        $formcontinue = html_form::make_button($redirect, $optionsyes, get_string('yes'), 'post');
-        $formcancel = html_form::make_button($redirect, array(), get_string('no'), 'get');
+        $formcontinue = new single_button(new moodle_url($redirect, $optionsyes), get_string('yes'), 'post');
+        $formcancel = new single_button($redirect, get_string('no'), 'get');
         echo $OUTPUT->confirm(get_string('profileconfirmfielddeletion', 'admin', $datacount), $formcontinue, $formcancel);
         echo $OUTPUT->footer();
         die;