-
Notifications
You must be signed in to change notification settings - Fork 13
/
sitenotice_form.php
33 lines (23 loc) · 1.2 KB
/
sitenotice_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
<?php
require_once "$CFG->dirroot/lib/formslib.php";
require_once "$CFG->dirroot/mod/facetoface/lib.php";
class mod_facetoface_sitenotice_form extends moodleform {
function definition()
{
$mform =& $this->_form;
$mform->addElement('header', 'general', get_string('general', 'form'));
$mform->addElement('hidden', 'id', $this->_customdata['id']);
$mform->addElement('text', 'name', get_string('name'), 'maxlength="255" size="50"');
$mform->addRule('name', null, 'required', null, 'client');
$mform->setType('name', PARAM_MULTILANG);
$mform->addElement('editor', 'text', get_string('noticetext', 'facetoface'), array('rows' => 10, 'cols' => 64));
$mform->setType('text', PARAM_RAW);
$mform->addRule('text', null, 'required', null, 'client');
$mform->addElement('header', 'conditions', get_string('conditions', 'facetoface'));
$mform->addElement('html', get_string('conditionsexplanation', 'facetoface'));
// Show all custom fields
$customfields = $this->_customdata['customfields'];
facetoface_add_customfields_to_form($mform, $customfields, true);
$this->add_action_buttons();
}
}