mirror of
https://github.com/moodle/moodle.git
synced 2025-08-04 16:36:37 +02:00
MDL-33885 Blog: Added maxlength rule to subject field
This commit is contained in:
parent
2cbdaa77ea
commit
3e0ce6079c
1 changed files with 2 additions and 1 deletions
|
@ -38,11 +38,12 @@ class blog_edit_form extends moodleform {
|
||||||
|
|
||||||
$mform->addElement('header', 'general', get_string('general', 'form'));
|
$mform->addElement('header', 'general', get_string('general', 'form'));
|
||||||
|
|
||||||
$mform->addElement('text', 'subject', get_string('entrytitle', 'blog'), 'size="60"');
|
$mform->addElement('text', 'subject', get_string('entrytitle', 'blog'), array('size' => 60, 'maxlength' => 128));
|
||||||
$mform->addElement('editor', 'summary_editor', get_string('entrybody', 'blog'), null, $summaryoptions);
|
$mform->addElement('editor', 'summary_editor', get_string('entrybody', 'blog'), null, $summaryoptions);
|
||||||
|
|
||||||
$mform->setType('subject', PARAM_TEXT);
|
$mform->setType('subject', PARAM_TEXT);
|
||||||
$mform->addRule('subject', get_string('emptytitle', 'blog'), 'required', null, 'client');
|
$mform->addRule('subject', get_string('emptytitle', 'blog'), 'required', null, 'client');
|
||||||
|
$mform->addRule('subject', get_string('maximumchars', '', 128), 'maxlength', 128, 'client');
|
||||||
|
|
||||||
$mform->setType('summary_editor', PARAM_RAW);
|
$mform->setType('summary_editor', PARAM_RAW);
|
||||||
$mform->addRule('summary_editor', get_string('emptybody', 'blog'), 'required', null, 'client');
|
$mform->addRule('summary_editor', get_string('emptybody', 'blog'), 'required', null, 'client');
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue