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:
nicolasconnault 2009-07-31 11:14:16 +00:00
parent e42f153c33
commit 17811cef2c

View File

@ -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')));
}