Browse Source

Use html_writer for HTML generation

SABERES_37_STABLE
Johannes Burk 9 years ago
committed by test
parent
commit
d2f1347812
  1. 37
      manage.php

37
manage.php

@ -89,19 +89,32 @@ $table->define_headers($headers);
$table->sortable(true, 'id'); $table->sortable(true, 'id');
echo '<form id="frmenrol" method="post" action="manage.php?id=' . $id . '">'; echo html_writer::start_tag('form', array('id' => 'enrol_apply_manage_form', 'method' => 'post', 'action' => $manageurl->out()));
echo '<input type="hidden" id="type" name="type" value="confirm">'; echo html_writer::empty_tag('input', array('type' => 'hidden', 'id' => 'type', 'name' => 'type', 'value' => 'confirm'));
$table->out(50, true); $table->out(50, true);
echo '<p align="center">'; echo html_writer::start_tag('p', array('align' => 'center'));
echo '<input type="button" value="' . get_string ( 'btnconfirm', 'enrol_apply' ) . '" onclick="doSubmit(\'confirm\');">'; echo html_writer::empty_tag('input', array(
echo '<input type="button" value="' . get_string ( 'btnwait', 'enrol_apply' ) . '" onclick="doSubmit(\'wait\');">'; 'type' => 'button',
echo '<input type="button" value="' . get_string ( 'btncancel', 'enrol_apply' ) . '" onclick="doSubmit(\'cancel\');">'; 'onclick' => 'doSubmit("confirm");',
echo '</p>'; 'value' => get_string('btnconfirm', 'enrol_apply')));
echo '</form>'; echo html_writer::empty_tag('input', array(
echo '<script>function doSubmit(type){ 'type' => 'button',
document.getElementById("type").value=type; 'onclick' => 'doSubmit("wait");',
document.getElementById("frmenrol").submit(); 'value' => get_string('btnwait', 'enrol_apply')));
}</script>'; 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 (); echo $OUTPUT->footer ();

Loading…
Cancel
Save