elofgren: BUGFIX: Fix trac ticket: #1411 'Layout problems with search box in IE' http://open.silverstripe.com/ticket/1411

by only creating a 'label' tag if a 'Title' is set in FormField?->FieldHolder?() 
(merged from branches/gsoc)


git-svn-id: svn://svn.silverstripe.com/silverstripe/open/modules/sapphire/trunk@42031 467b73ca-7a2a-4603-9d3b-597d59a354a9
This commit is contained in:
Ingo Schommer 2007-09-16 01:59:33 +00:00
parent 3c7bcfe813
commit 265a853c2a

View File

@ -244,7 +244,7 @@ class FormField extends ViewableData {
$Name = $this->XML_val('Name'); $Name = $this->XML_val('Name');
$Field = $this->XML_val('Field'); $Field = $this->XML_val('Field');
$titleBlock = "<label class=\"left\" for=\"{$this->id()}\">$Title</label>"; $titleBlock = (!empty($Title)) ? "<label class=\"left\" for=\"{$this->id()}\">$Title</label>" : "";
$messageBlock = (!empty($Message)) ? "<span class=\"message $MessageType\">$Message</span>" : ""; $messageBlock = (!empty($Message)) ? "<span class=\"message $MessageType\">$Message</span>" : "";
$rightTitleBlock = (!empty($rightTitle)) ? "<label class=\"right\" for=\"{$this->id()}\">$RightTitle</label>" : ""; $rightTitleBlock = (!empty($rightTitle)) ? "<label class=\"right\" for=\"{$this->id()}\">$RightTitle</label>" : "";