mirror of
https://github.com/moodle/moodle.git
synced 2025-01-18 05:58:34 +01:00
MDL-19756 fixing incorrect parameter objects
This commit is contained in:
parent
926987ab5e
commit
da65c538cd
@ -2555,6 +2555,7 @@ function print_single_button($link, $options, $label='OK', $method='get', $notus
|
||||
$options = (array) $options;
|
||||
$form = new html_form();
|
||||
$form->url = new moodle_url($link, $options);
|
||||
$form->button = new html_button();
|
||||
$form->button->label = $label;
|
||||
$form->button->disabled = $disabled;
|
||||
$form->button->title = $tooltip;
|
||||
@ -2957,14 +2958,19 @@ function notice_yesno($message, $linkyes, $linkno, $optionsyes=NULL, $optionsno=
|
||||
|
||||
global $OUTPUT;
|
||||
|
||||
$buttoncontinue = new html_button();
|
||||
$buttoncontinue->url = new moodle_url($linkyes, $optionsyes);
|
||||
$buttoncontinue->method = $methodyes;
|
||||
$buttoncancel = new html_button();
|
||||
$buttoncancel->url = new moodle_url($linkno, $optionsno);
|
||||
$buttoncancel->method = $methodno;
|
||||
$formcontinue = new html_form();
|
||||
$formcontinue->url = new moodle_url($linkyes, $optionsyes);
|
||||
$formcontinue->button = new html_button();
|
||||
$formcontinue->button->label = get_string('yes');
|
||||
$formcontinue->method = $methodyes;
|
||||
|
||||
echo $OUTPUT->confirm($message, $buttoncontinue, $buttoncancel);
|
||||
$formcancel = new html_form();
|
||||
$formcancel->url = new moodle_url($linkno, $optionsno);
|
||||
$formcancel->button = new html_button();
|
||||
$formcancel->button->label = get_string('no');
|
||||
$formcancel->method = $methodno;
|
||||
|
||||
echo $OUTPUT->confirm($message, $formcontinue, $formcancel);
|
||||
}
|
||||
|
||||
/**
|
||||
|
Loading…
x
Reference in New Issue
Block a user