BUGFIX Removed for attribute on FieldGroup->FieldHolder() since there's no ID of any input fields to match the label to.

BUGFIX Changed the FieldHolder method to use explicit functionality instead of statically calling FormField::FieldHolder()

git-svn-id: svn://svn.silverstripe.com/silverstripe/open/modules/sapphire/branches/2.3@70127 467b73ca-7a2a-4603-9d3b-597d59a354a9
This commit is contained in:
Sean Harvey 2009-01-14 00:32:08 +00:00 committed by Sam Minnee
parent 2c9ed2dfcc
commit b839d2c2c1

View File

@ -83,7 +83,22 @@ class FieldGroup extends CompositeField {
}
function FieldHolder() {
return FormField::FieldHolder();
$Title = $this->XML_val('Title');
$Message = $this->XML_val('Message');
$MessageType = $this->XML_val('MessageType');
$RightTitle = $this->XML_val('RightTitle');
$Type = $this->XML_val('Type');
$extraClass = $this->XML_val('extraClass');
$Name = $this->XML_val('Name');
$Field = $this->XML_val('Field');
$titleBlock = (!empty($Title)) ? "<label class=\"left\">$Title</label>" : "";
$messageBlock = (!empty($Message)) ? "<span class=\"message $MessageType\">$Message</span>" : "";
$rightTitleBlock = (!empty($RightTitle)) ? "<label class=\"right\">$RightTitle</label>" : "";
return <<<HTML
<div id="$Name" class="field $Type $extraClass">$titleBlock<div class="middleColumn">$Field</div>$rightTitleBlock$messageBlock</div>
HTML;
}
function Message() {