added autofocus on first error and moved formslib include to inside request_form.php

This commit is contained in:
jamiesensei 2006-10-24 11:43:51 +00:00
parent 6cd72677f6
commit 45ca9e8e2d
2 changed files with 3 additions and 3 deletions

View File

@ -3,7 +3,6 @@
/// this allows a student to request a course be created for them.
require_once('../config.php');
include_once $CFG->libdir.'/formslib.php';
require_login();
@ -17,15 +16,15 @@
error(get_string('courserequestdisabled'));
}
$requestform = new course_request_form('request.php');
$strtitle = get_string('courserequest');
print_header($strtitle,$strtitle,$strtitle);
print_header($strtitle,$strtitle,$strtitle, $requestform->focus());
print_simple_box_start("center");
print_string('courserequestintro');
print_simple_box_end();
$requestform = new course_request_form('request.php');
if (($data = $requestform->data_submitted())) {

View File

@ -1,4 +1,5 @@
<?php
include_once $CFG->libdir.'/formslib.php';
class course_request_form extends moodleform {
function definition() {
$mform =& $this->_form;