mirror of
https://github.com/silverstripe/silverstripe-userforms.git
synced 2024-10-22 17:05:42 +02:00
ADD Add report visibility setting to EditableFormHeading
Same as already existing setting on EditableLiteralField.
This commit is contained in:
parent
e92551b2da
commit
d1b6ec224d
@ -25,7 +25,7 @@ class EditableFormHeading extends EditableFormField {
|
||||
$label = _t('EditableFormHeading.LEVEL', 'Select Heading Level');
|
||||
|
||||
$options = parent::getFieldConfiguration();
|
||||
|
||||
|
||||
$options->push(
|
||||
new DropdownField($this->getSettingName("Level"), $label, $levels, $level)
|
||||
);
|
||||
@ -33,10 +33,18 @@ class EditableFormHeading extends EditableFormField {
|
||||
if($this->readonly) {
|
||||
$extraFields = $options->makeReadonly();
|
||||
}
|
||||
|
||||
$options->push(
|
||||
new CheckboxField(
|
||||
$this->getSettingName('HideFromReports'),
|
||||
_t('EditableLiteralField.HIDEFROMREPORT', 'Hide from reports?'),
|
||||
$this->getSetting('HideFromReports')
|
||||
)
|
||||
);
|
||||
|
||||
return $options;
|
||||
}
|
||||
|
||||
|
||||
public function getFormField() {
|
||||
$labelField = new HeaderField($this->Name,$this->Title, $this->getSetting('Level'));
|
||||
$labelField->addExtraClass('FormHeading');
|
||||
@ -45,10 +53,10 @@ class EditableFormHeading extends EditableFormField {
|
||||
}
|
||||
|
||||
public function showInReports() {
|
||||
return false;
|
||||
return (!$this->getSetting('HideFromReports'));
|
||||
}
|
||||
|
||||
public function getFieldValidationOptions() {
|
||||
return false;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user