Permalink
Find file
Fetching contributors…
Cannot retrieve contributors at this time
34 lines (23 sloc) 1.2 KB
<?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('htmleditor', '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();
}
}