Browse Source

Use renderer for edit page.

SABERES_37_STABLE
Johannes Burk 9 years ago
committed by test
parent
commit
256c3e1b67
  1. 6
      edit.php
  2. 7
      renderer.php

6
edit.php

@ -78,7 +78,5 @@ if ($mform->is_cancelled()) {
$PAGE->set_heading(format_string($course->fullname));
$PAGE->set_title(get_string('pluginname', 'enrol_apply'));
echo $OUTPUT->header();
echo $OUTPUT->heading(get_string('pluginname', 'enrol_apply'));
$mform->display();
echo $OUTPUT->footer();
$renderer = $PAGE->get_renderer('enrol_apply');
$renderer->edit_page($mform);

7
renderer.php

@ -34,6 +34,13 @@ class enrol_apply_renderer extends plugin_renderer_base {
echo $this->footer();
}
public function edit_page($mform) {
echo $this->header();
echo $this->heading(get_string('pluginname', 'enrol_apply'));
$mform->display();
echo $this->footer();
}
public function manage_form($table, $manageurl) {
echo html_writer::start_tag('form', array('id' => 'enrol_apply_manage_form', 'method' => 'post', 'action' => $manageurl->out()));

Loading…
Cancel
Save