mirror of
https://github.com/moodle/moodle.git
synced 2025-08-05 00:46:50 +02:00
MDL-69401 book: Limit character length in chapter title
This commit is contained in:
parent
a0fc902eb1
commit
0a9bc0cdfe
1 changed files with 3 additions and 1 deletions
|
@ -55,9 +55,11 @@ class book_chapter_edit_form extends moodleform {
|
|||
);
|
||||
}
|
||||
|
||||
$mform->addElement('text', 'title', get_string('chaptertitle', 'mod_book'), array('size'=>'30'));
|
||||
$mform->addElement('text', 'title', get_string('chaptertitle', 'mod_book'),
|
||||
['size' => '30', 'maxlength' => '255']);
|
||||
$mform->setType('title', PARAM_RAW);
|
||||
$mform->addRule('title', null, 'required', null, 'client');
|
||||
$mform->addRule('title', get_string('maximumchars', '', 255), 'maxlength', 255, 'client');
|
||||
|
||||
$mform->addElement('advcheckbox', 'subchapter', get_string('subchapter', 'mod_book'), $disabledmsg);
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue