2009-11-01 10:42:45 +00:00
|
|
|
<?php
|
2007-08-07 07:26:58 +00:00
|
|
|
|
|
|
|
require_once($CFG->libdir.'/formslib.php');
|
|
|
|
|
|
|
|
class user_message_form extends moodleform {
|
|
|
|
|
|
|
|
function definition() {
|
2007-11-13 08:43:20 +00:00
|
|
|
$mform =& $this->_form;
|
2007-08-07 07:26:58 +00:00
|
|
|
$mform->addElement('header', 'general', get_string('message', 'message'));
|
|
|
|
|
2007-11-13 08:43:20 +00:00
|
|
|
|
|
|
|
$mform->addElement('textarea', 'messagebody', get_string('messagebody'), array('rows'=>15, 'cols'=>60));
|
2007-08-07 07:26:58 +00:00
|
|
|
$mform->addRule('messagebody', '', 'required', null, 'client');
|
2008-09-25 10:04:01 +00:00
|
|
|
$mform->setHelpButton('messagebody', array('writing', 'reading', 'questions', 'richtext2'), false, 'editorhelpbutton');
|
2007-08-07 07:26:58 +00:00
|
|
|
$mform->addElement('format', 'format', get_string('format'));
|
|
|
|
|
2007-11-13 08:43:20 +00:00
|
|
|
$this->add_action_buttons();
|
2007-08-07 07:26:58 +00:00
|
|
|
}
|
|
|
|
}
|