Commit c26a5860 authored by Lisa Seeto's avatar Lisa Seeto Committed by Robert Lyon
Browse files

Bug 1742590: Text/Note/Annotation Maxlength rule is unnecesary



increased the maxLength property of textfields to 1000000 chars.

behatnotneeded

Change-Id: I7b9307de6f588aa841355500282f24b32c5ede85
Signed-off-by: default avatarLisa Seeto <lisaseeto@catalyst.net.nz>
parent 597fdaac
......@@ -59,7 +59,7 @@ $form = pieform(array(
'title' => get_string('pagetext', 'admin'),
'defaultvalue' => $pagecontents[DEFAULTPAGE],
'rules' => array(
'maxlength' => 65536,
'maxlength' => 1000000,
'required' => true
)
),
......
......@@ -66,7 +66,7 @@ if ($versionid) {
'title' => get_string('pagetext', 'admin'),
'defaultvalue' => $pageoptions->content,
'rules' => array(
'maxlength' => 65536,
'maxlength' => 1000000,
'required' => true
)
),
......
......@@ -91,7 +91,7 @@ $form = pieform(array(
'title' => get_string('pagetext', 'admin'),
'defaultvalue' => $pagecontents[DEFAULTPAGE],
'rules' => array(
'maxlength' => 65536,
'maxlength' => 1000000,
'required' => true
)
),
......
......@@ -109,7 +109,7 @@ if ($versionid !== null) {
'title' => get_string('pagetext', 'admin'),
'defaultvalue' => $pageoptions ? $pageoptions->content : '',
'rules' => array(
'maxlength' => 65536,
'maxlength' => 1000000,
'required' => true
)
),
......
......@@ -205,7 +205,7 @@ class PluginBlocktypeAnnotation extends MaharaCoreBlocktype {
'height' => $height . 'px',
'defaultvalue' => $text,
'rules' => array(
'maxlength' => 65536,
'maxlength' => 1000000,
'required' => true
),
),
......
......@@ -56,7 +56,7 @@ $elements['message'] = array(
'rows' => 5,
'cols' => 80,
'defaultvalue' => $annotationfeedback->get('description'),
'rules' => array('maxlength' => 8192),
'rules' => array('maxlength' => 1000000),
);
$elements['ispublic'] = array(
'type' => 'switchbox',
......
......@@ -1268,7 +1268,7 @@ class ArtefactTypeAnnotationfeedback extends ArtefactType {
'title' => get_string('Annotationfeedback', 'artefact.annotation'),
'rows' => 5,
'cols' => 80,
'rules' => array('maxlength' => 8192),
'rules' => array('maxlength' => 1000000),
);
$collection = $view->get('collection');
......
......@@ -80,7 +80,7 @@ $form = array(
'title' => get_string('blogdesc', 'artefact.blog'),
'description' => get_string('blogdescdesc', 'artefact.blog'),
'rules' => array(
'maxlength' => 65536,
'maxlength' => 1000000,
'required' => false
),
),
......
......@@ -132,7 +132,7 @@ $form = pieform(array(
'title' => get_string('postbody', 'artefact.blog'),
'description' => get_string('postbodydesc', 'artefact.blog'),
'rules' => array(
'maxlength' => 65536,
'maxlength' => 1000000,
'required' => true
),
'defaultvalue' => $description,
......
......@@ -77,7 +77,7 @@ $form = pieform(array(
'title' => get_string('blogdesc', 'artefact.blog'),
'description' => get_string('blogdescdesc', 'artefact.blog'),
'rules' => array(
'maxlength' => 65536,
'maxlength' => 1000000,
'required' => false
),
'defaultvalue' => $blog->get('description')
......
......@@ -53,7 +53,7 @@ $elements['message'] = array(
'rows' => 5,
'cols' => 80,
'defaultvalue' => $comment->get('description'),
'rules' => array('maxlength' => 8192),
'rules' => array('maxlength' => 1000000),
);
if (get_config_plugin('artefact', 'comment', 'commentratings')) {
$elements['rating'] = array(
......
......@@ -953,7 +953,7 @@ class ArtefactTypeComment extends ArtefactType {
'class' => ($USER->is_logged_in() ? 'hide-label' : ''),
'rows' => 5,
'cols' => 80,
'rules' => array('maxlength' => 8192),
'rules' => array('maxlength' => 1000000),
);
if (get_config_plugin('artefact', 'comment', 'commentratings')) {
$form['elements']['rating'] = array(
......
......@@ -1702,7 +1702,7 @@ class ArtefactTypeFile extends ArtefactTypeFileBase {
'rows' => 10,
'cols' => 80,
'defaultvalue' => get_field('site_content', 'content', 'name', 'uploadcopyright', 'institution', 'mahara'),
'rules' => array('maxlength' => 65536),
'rules' => array('maxlength' => 1000000),
),
),
'collapsible' => true,
......
......@@ -267,7 +267,7 @@ class PluginBlocktypeProfileinfo extends MaharaCoreBlocktype {
'defaultvalue' => (isset($configdata['introtext'])) ? $configdata['introtext'] : '',
'width' => '100%',
'height' => '150px',
'rules' => array('maxlength' => 65536),
'rules' => array('maxlength' => 1000000),
);
return $form;
......
......@@ -381,7 +381,7 @@ EOF;
'width' => '100%',
'height' => $height . 'px',
'defaultvalue' => $text,
'rules' => array('maxlength' => 65536),
'rules' => array('maxlength' => 1000000),
),
'textreadonly' => array(
'type' => 'html',
......
......@@ -71,6 +71,9 @@ $form = array(
'rows' => 10,
'cols' => 70,
'defaultvalue' => $artefact->get('description'),
'rules' => array(
'maxlength' => 1000000
)
),
'tags' => array(
'type' => 'tags',
......
......@@ -94,7 +94,7 @@ foreach ( $element_list as $element => $type ) {
if ($type == 'wysiwyg') {
$items[$element]['rows'] = 10;
$items[$element]['cols'] = 50;
$items[$element]['rules'] = array('maxlength' => 65536);
$items[$element]['rules'] = array('maxlength' => 1000000);
}
if ($type == 'textarea') {
$items[$element]['rows'] = 4;
......
......@@ -117,7 +117,7 @@ class PluginBlocktypePeerassessment extends MaharaCoreBlocktype {
'width' => '100%',
'height' => $height . 'px',
'defaultvalue' => $instructions,
'rules' => array('maxlength' => 65536),
'rules' => array('maxlength' => 1000000),
),
);
return $elements;
......
......@@ -53,7 +53,7 @@ $elements['message'] = array(
'rows' => 5,
'cols' => 80,
'defaultvalue' => $assessment->get('description'),
'rules' => array('maxlength' => 8192),
'rules' => array('maxlength' => 1000000),
);
$elements['ispublic'] = array(
'type' => 'switchbox',
......
......@@ -689,7 +689,7 @@ class ArtefactTypePeerassessment extends ArtefactType {
'class' => 'hide-label',
'rows' => 5,
'cols' => 80,
'rules' => array('maxlength' => 8192),
'rules' => array('maxlength' => 1000000),
);
$form['elements']['block'] = array(
'type' => 'hidden',
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment