mirror of
https://github.com/moodle/moodle.git
synced 2025-01-17 21:49:15 +01:00
added autofocus on first error and moved formslib include to inside request_form.php
This commit is contained in:
parent
6cd72677f6
commit
45ca9e8e2d
@ -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())) {
|
||||
|
||||
|
@ -1,4 +1,5 @@
|
||||
<?php
|
||||
include_once $CFG->libdir.'/formslib.php';
|
||||
class course_request_form extends moodleform {
|
||||
function definition() {
|
||||
$mform =& $this->_form;
|
||||
|
Loading…
x
Reference in New Issue
Block a user