mirror of
https://github.com/silverstripe/silverstripe-framework
synced 2024-06-28 23:49:26 +02:00
MINOR: Removed notice-level errors from form field construction.
This commit is contained in:
parent
7c6050b407
commit
6a08a82c9c
|
@ -107,7 +107,7 @@ class DateField extends TextField {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
parent::__construct($name, $title, $value, $form, $rightTitle);
|
parent::__construct($name, $title, $value);
|
||||||
}
|
}
|
||||||
|
|
||||||
function FieldHolder() {
|
function FieldHolder() {
|
||||||
|
|
|
@ -106,7 +106,6 @@ class FormField extends RequestHandler {
|
||||||
$this->title = ($title === null) ? $name : $title;
|
$this->title = ($title === null) ? $name : $title;
|
||||||
|
|
||||||
if($value !== NULL) $this->setValue($value);
|
if($value !== NULL) $this->setValue($value);
|
||||||
if($form) $this->setForm($form);
|
|
||||||
|
|
||||||
parent::__construct();
|
parent::__construct();
|
||||||
}
|
}
|
||||||
|
|
|
@ -7,7 +7,7 @@ class TextareaFieldTest extends SapphireTest {
|
||||||
*/
|
*/
|
||||||
function testTextEncoding() {
|
function testTextEncoding() {
|
||||||
$inputText = "This is my <text>These are some unicodes: äöü&<>";
|
$inputText = "This is my <text>These are some unicodes: äöü&<>";
|
||||||
$field = new TextareaField("Test", "Test", 5, 20);
|
$field = new TextareaField("Test", "Test");
|
||||||
$field->setValue($inputText);
|
$field->setValue($inputText);
|
||||||
$this->assertContains('This is my <text>These are some unicodes: äöü&<>', $field->Field());
|
$this->assertContains('This is my <text>These are some unicodes: äöü&<>', $field->Field());
|
||||||
}
|
}
|
||||||
|
@ -17,7 +17,7 @@ class TextareaFieldTest extends SapphireTest {
|
||||||
*/
|
*/
|
||||||
function testReadonlyTextEncoding() {
|
function testReadonlyTextEncoding() {
|
||||||
$inputText = "This is my <text>These are some unicodes: äöü&<>";
|
$inputText = "This is my <text>These are some unicodes: äöü&<>";
|
||||||
$field = new TextareaField("Test", "Test", 5, 20);
|
$field = new TextareaField("Test", "Test");
|
||||||
$field = $field->performReadonlyTransformation();
|
$field = $field->performReadonlyTransformation();
|
||||||
$field->setValue($inputText);
|
$field->setValue($inputText);
|
||||||
$this->assertContains('This is my <text>These are some unicodes: äöü&<>', $field->Field());
|
$this->assertContains('This is my <text>These are some unicodes: äöü&<>', $field->Field());
|
||||||
|
|
Loading…
Reference in New Issue
Block a user