mirror of
https://github.com/silverstripe/silverstripe-userforms.git
synced 2024-10-22 17:05:42 +02:00
Added check for a blank title in the HTML Block/EditableLiteralField so we don't print empty labels.
This commit is contained in:
parent
7dc2bd9675
commit
68bc428fe2
@ -35,9 +35,12 @@ class EditableLiteralField extends EditableFormField {
|
||||
}
|
||||
|
||||
public function getFormField() {
|
||||
$label = $this->Title ? "<label class='left'>$this->Title</label>":"";
|
||||
$classes = $this->Title ? "" : " nolabel";
|
||||
|
||||
return new LiteralField("LiteralField[$this->ID]",
|
||||
"<div id='$this->Name' class='field text'>
|
||||
<label class='left'>$this->Title</label>
|
||||
"<div id='$this->Name' class='field text$classes'>
|
||||
$label
|
||||
<div class='middleColumn literalFieldArea'>". $this->getSetting('Content') ."</div>".
|
||||
"</div>"
|
||||
);
|
||||
|
Loading…
Reference in New Issue
Block a user