mirror of
https://github.com/moodle/moodle.git
synced 2025-01-17 13:38:32 +01:00
Merge branch 'MDL-80488' of https://github.com/paulholden/moodle
This commit is contained in:
commit
f3f514ace1
@ -1355,8 +1355,9 @@ abstract class lesson_add_page_form_base extends moodleform {
|
||||
$mform->addElement('hidden', 'qtype');
|
||||
$mform->setType('qtype', PARAM_INT);
|
||||
|
||||
$mform->addElement('text', 'title', get_string('pagetitle', 'lesson'), array('size'=>70));
|
||||
$mform->addElement('text', 'title', get_string('pagetitle', 'lesson'), ['size' => 70, 'maxlength' => 255]);
|
||||
$mform->addRule('title', get_string('required'), 'required', null, 'client');
|
||||
$mform->addRule('title', get_string('maximumchars', '', 255), 'maxlength', 255, 'client');
|
||||
if (!empty($CFG->formatstringstriptags)) {
|
||||
$mform->setType('title', PARAM_TEXT);
|
||||
} else {
|
||||
|
@ -339,8 +339,9 @@ class lesson_add_page_form_branchtable extends lesson_add_page_form_base {
|
||||
$mform->addElement('hidden', 'qtype');
|
||||
$mform->setType('qtype', PARAM_INT);
|
||||
|
||||
$mform->addElement('text', 'title', get_string("pagetitle", "lesson"), array('size'=>70));
|
||||
$mform->addRule('title', null, 'required', null, 'server');
|
||||
$mform->addElement('text', 'title', get_string("pagetitle", "lesson"), ['size' => 70, 'maxlength' => 255]);
|
||||
$mform->addRule('title', null, 'required', null, 'client');
|
||||
$mform->addRule('title', get_string('maximumchars', '', 255), 'maxlength', 255, 'client');
|
||||
if (!empty($CFG->formatstringstriptags)) {
|
||||
$mform->setType('title', PARAM_TEXT);
|
||||
} else {
|
||||
|
@ -131,7 +131,8 @@ class lesson_add_page_form_cluster extends lesson_add_page_form_base {
|
||||
$mform->addElement('hidden', 'qtype');
|
||||
$mform->setType('qtype', PARAM_TEXT);
|
||||
|
||||
$mform->addElement('text', 'title', get_string("pagetitle", "lesson"), array('size'=>70));
|
||||
$mform->addElement('text', 'title', get_string("pagetitle", "lesson"), ['size' => 70, 'maxlength' => 255]);
|
||||
$mform->addRule('title', get_string('maximumchars', '', 255), 'maxlength', 255, 'client');
|
||||
if (!empty($CFG->formatstringstriptags)) {
|
||||
$mform->setType('title', PARAM_TEXT);
|
||||
} else {
|
||||
|
@ -159,7 +159,8 @@ class lesson_add_page_form_endofbranch extends lesson_add_page_form_base {
|
||||
$mform->addElement('hidden', 'qtype');
|
||||
$mform->setType('qtype', PARAM_TEXT);
|
||||
|
||||
$mform->addElement('text', 'title', get_string("pagetitle", "lesson"), array('size'=>70));
|
||||
$mform->addElement('text', 'title', get_string("pagetitle", "lesson"), ['size' => 70, 'maxlength' => 255]);
|
||||
$mform->addRule('title', get_string('maximumchars', '', 255), 'maxlength', 255, 'client');
|
||||
if (!empty($CFG->formatstringstriptags)) {
|
||||
$mform->setType('title', PARAM_TEXT);
|
||||
} else {
|
||||
|
@ -139,7 +139,8 @@ class lesson_add_page_form_endofcluster extends lesson_add_page_form_base {
|
||||
$mform->addElement('hidden', 'qtype');
|
||||
$mform->setType('qtype', PARAM_TEXT);
|
||||
|
||||
$mform->addElement('text', 'title', get_string("pagetitle", "lesson"), array('size'=>70));
|
||||
$mform->addElement('text', 'title', get_string("pagetitle", "lesson"), ['size' => 70, 'maxlength' => 255]);
|
||||
$mform->addRule('title', get_string('maximumchars', '', 255), 'maxlength', 255, 'client');
|
||||
if (!empty($CFG->formatstringstriptags)) {
|
||||
$mform->setType('title', PARAM_TEXT);
|
||||
} else {
|
||||
|
Loading…
x
Reference in New Issue
Block a user