mirror of
https://github.com/silverstripe/silverstripe-framework
synced 2024-10-22 12:05:37 +00:00
Fix empty $messageBlock on CheckboxFields
From 2.4.13 the Message attribute is set to Text, so every checkbox now show an empty $messageBlock, See https://github.com/silverstripe/silverstripe-framework/issues/2489 or http://www.silverstripe.org/general-questions/show/25254
This commit is contained in:
parent
011ea99f3f
commit
b29b49e7d7
@ -47,7 +47,7 @@ class CheckboxField extends FormField {
|
||||
} else {
|
||||
extract($this->getXMLValues(array( 'Name', 'Field', 'Title', 'Message', 'MessageType' )),
|
||||
EXTR_SKIP);
|
||||
$messageBlock = isset($Message) ? "<span class=\"message $MessageType\">$Message</span>" : '';
|
||||
$messageBlock = empty($Message) ? '' : "<span class=\"message $MessageType\">$Message</span>";
|
||||
$Type = $this->XML_val('Type');
|
||||
$extraClass = $this->XML_val('extraClass');
|
||||
return <<<HTML
|
||||
@ -134,4 +134,4 @@ class CheckboxField_Disabled extends CheckboxField {
|
||||
return $this->createTag('input', $attributes);
|
||||
}
|
||||
}
|
||||
?>
|
||||
?>
|
||||
|
Loading…
x
Reference in New Issue
Block a user