mirror of
https://github.com/silverstripe/silverstripe-userforms.git
synced 2024-10-22 17:05:42 +02:00
FIX: Ensure display rules work correctly for EditableFormHeading (#712)
This commit is contained in:
parent
7db0b1d24a
commit
96cde0f04c
@ -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;
|
||||
|
Loading…
Reference in New Issue
Block a user