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;
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);
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;
} 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();
}
$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 {
$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;
$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);
}
$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);
}
$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);
}
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;
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;
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;
// 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();
$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;
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;
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;
}
$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();
}
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;
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;
$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
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 {
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();
} 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';
}
}
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 {
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();
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;
$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;