FIX: Ensure display rules work correctly for EditableFormHeading (#712)

This commit is contained in:
Scott Hutchinson 2018-02-05 12:08:24 +13:00 committed by Robbie Averill
parent 7db0b1d24a
commit 96cde0f04c

View File

@ -74,10 +74,15 @@ class EditableFormHeading extends EditableFormField
// Since this field expects raw html, safely escape the user data prior
$field->setRightTitle(Convert::raw2xml($this->RightTitle));
}
// if this field has an extra class
if ($this->ExtraClass) {
$field->addExtraClass($this->ExtraClass);
}
if (!$this->ShowOnLoad) {
$field->addExtraClass($this->ShowOnLoadNice());
}
}
public function showInReports()
@ -95,6 +100,11 @@ class EditableFormHeading extends EditableFormField
return "$(\":header[data-id='{$this->Name}']\")";
}
public function getSelectorOnly()
{
return "[data-id={$this->Name}]";
}
public function getLevel()
{
return $this->getField('Level') ?: 3;