Merge pull request #511 from muskie9/bugfix/#510

BUGFIX EditableFormHeading doesn't properly handle numeric values
This commit is contained in:
Daniel Hensby 2016-09-23 16:15:25 +01:00 committed by GitHub
commit dec9356923

View File

@ -56,7 +56,8 @@ class EditableFormHeading extends EditableFormField {
}
public function getFormField() {
$labelField = new HeaderField($this->Name, $this->EscapedTitle, $this->Level);
$labelField = HeaderField::create($this->EscapedTitle)
->setHeadingLevel($this->Level);
$labelField->addExtraClass('FormHeading');
$labelField->setAttribute('data-id', $this->Name);
$this->doUpdateFormField($labelField);