diff --git a/manage.php b/manage.php index 2995525..2373cb1 100644 --- a/manage.php +++ b/manage.php @@ -89,19 +89,32 @@ $table->define_headers($headers); $table->sortable(true, 'id'); -echo '
'; -echo ''; +echo html_writer::start_tag('form', array('id' => 'enrol_apply_manage_form', 'method' => 'post', 'action' => $manageurl->out())); +echo html_writer::empty_tag('input', array('type' => 'hidden', 'id' => 'type', 'name' => 'type', 'value' => 'confirm')); $table->out(50, true); -echo '

'; -echo ''; -echo ''; -echo ''; -echo '

'; -echo '
'; -echo ''; +echo html_writer::start_tag('p', array('align' => 'center')); +echo html_writer::empty_tag('input', array( + 'type' => 'button', + 'onclick' => 'doSubmit("confirm");', + 'value' => get_string('btnconfirm', 'enrol_apply'))); +echo html_writer::empty_tag('input', array( + 'type' => 'button', + 'onclick' => 'doSubmit("wait");', + 'value' => get_string('btnwait', 'enrol_apply'))); +echo html_writer::empty_tag('input', array( + 'type' => 'button', + 'onclick' => 'doSubmit("cancel");', + 'value' => get_string('btncancel', 'enrol_apply'))); +echo html_writer::end_tag('p'); +echo html_writer::end_tag('form'); + +$js = " + function doSubmit(type){ + document.getElementById('type').value=type; + document.getElementById('enrol_apply_manage_form').submit(); + }"; +echo html_writer::tag('script', $js, array('type' => 'text/javascript')); + echo $OUTPUT->footer ();