-
Notifications
You must be signed in to change notification settings - Fork 3
/
alt_form.php
37 lines (26 loc) · 1.14 KB
/
alt_form.php
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
<?php
require_once $CFG->libdir . '/formslib.php';
class quickmail_alternate_form extends moodleform {
function definition() {
$m =& $this->_form;
$course = $this->_customdata['course'];
$m->addElement('header', 'alt_header', $course->fullname);
$m->addElement('text', 'address', get_string('email'));
$m->setType('address', PARAM_NOTAGS);
$m->addRule('address', get_string('missingemail'), 'required', null, 'server');
$m->addElement('hidden', 'valid', 0);
$m->setType('valid',PARAM_INT);
$m->addElement('hidden', 'courseid', $course->id);
$m->setType('courseid',PARAM_INT);
$m->addElement('hidden', 'id', '');
$m->setType('id',PARAM_INT);
$m->addElement('hidden', 'action', $this->_customdata['action']);
$m->setType('action',PARAM_ALPHA);
$buttons = array(
$m->createElement('submit', 'submit', get_string('savechanges')),
$m->createElement('cancel')
);
$m->addGroup($buttons, 'buttons', '', array(' '), false);
$m->closeHeaderBefore('buttons');
}
}