mirror of
https://github.com/moodle/moodle.git
synced 2025-02-13 12:34:28 +01:00
FIx fileareas being sent to mform for forum post
This commit is contained in:
parent
c0fa8cbaa6
commit
03efef4a7e
@ -23,7 +23,7 @@ class mod_forum_post_form extends moodleform {
|
|||||||
$mform->addRule('subject', get_string('required'), 'required', null, 'client');
|
$mform->addRule('subject', get_string('required'), 'required', null, 'client');
|
||||||
$mform->addRule('subject', get_string('maximumchars', '', 255), 'maxlength', 255, 'client');
|
$mform->addRule('subject', get_string('maximumchars', '', 255), 'maxlength', 255, 'client');
|
||||||
|
|
||||||
$mform->addElement('htmleditor', 'message', get_string('message', 'forum'), array('cols'=>50, 'rows'=>30));
|
$mform->addElement('htmleditor', 'message', get_string('message', 'forum'), array('cols'=>50, 'rows'=>30, 'filearea'=>'forumpost'));
|
||||||
$mform->setType('message', PARAM_RAW);
|
$mform->setType('message', PARAM_RAW);
|
||||||
$mform->addRule('message', get_string('required'), 'required', null, 'client');
|
$mform->addRule('message', get_string('required'), 'required', null, 'client');
|
||||||
$mform->setHelpButton('message', array('reading', 'writing', 'questions', 'richtext'), false, 'editorhelpbutton');
|
$mform->setHelpButton('message', array('reading', 'writing', 'questions', 'richtext'), false, 'editorhelpbutton');
|
||||||
@ -53,7 +53,7 @@ class mod_forum_post_form extends moodleform {
|
|||||||
}
|
}
|
||||||
|
|
||||||
if ($forum->maxbytes != 1 && has_capability('mod/forum:createattachment', $modcontext)) { // 1 = No attachments at all
|
if ($forum->maxbytes != 1 && has_capability('mod/forum:createattachment', $modcontext)) { // 1 = No attachments at all
|
||||||
$mform->addElement('filepicker', 'attachment', get_string('attachment', 'forum'), 'forum_submission');
|
$mform->addElement('filepicker', 'attachment', get_string('attachment', 'forum'), 'forumpost');
|
||||||
$mform->setHelpButton('attachment', array('attachment', get_string('attachment', 'forum'), 'forum'));
|
$mform->setHelpButton('attachment', array('attachment', get_string('attachment', 'forum'), 'forum'));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user