mirror of
https://github.com/moodle/moodle.git
synced 2025-01-31 12:45:04 +01:00
MDL-19756 Outputting a debugging message if $OUTPUT->form() is called without $contents but with a $form->button set. Should use $OUTPUT->button($form) instead
This commit is contained in:
parent
e42f153c33
commit
17811cef2c
@ -2536,7 +2536,9 @@ class moodle_core_renderer extends moodle_renderer_base {
|
||||
|
||||
$this->prepare_event_handlers($form);
|
||||
|
||||
if (empty($contents)) {
|
||||
if (empty($contents) && !empty($form->button)) {
|
||||
debugging("You probably want to use \$OUTPUT->button(\$form), please read that function's documentation", DEBUG_DEVELOPER);
|
||||
} else if (empty($contents)) {
|
||||
$contents = $this->output_empty_tag('input', array('type' => 'submit', 'value' => get_string('ok')));
|
||||
}
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user