3 require_once $CFG->libdir
.'/formslib.php';
5 class mod_glossary_comment_form
extends moodleform
{
6 function definition() {
7 $mform =& $this->_form
;
10 $mform->addElement('htmleditor', 'entrycomment',get_string('comment', 'glossary'));
11 $mform->addRule('entrycomment', get_string('required'), 'required', null, 'client');
12 $mform->setType('entrycomment', PARAM_RAW
); // processed by trusttext or cleaned before the display
13 $mform->setHelpButton('entrycomment', array('writing', 'richtext'), false, 'editorhelpbutton');
15 $mform->addElement('format', 'format', get_string('format'));
16 $mform->setHelpButton('format', array('textformat', get_string('helpformatting')));
18 // hidden optional params
19 $mform->addElement('hidden', 'cid', 0);
20 $mform->setType('cid', PARAM_INT
);
22 $mform->addElement('hidden', 'eid', 0);
23 $mform->setType('eid', PARAM_INT
);
25 $mform->addElement('hidden', 'action', '');
26 $mform->setType('action', PARAM_ACTION
);
28 //-------------------------------------------------------------------------------
30 $this->add_action_buttons(false);