ADD Add report visibility setting to EditableFormHeading

Same as already existing setting on EditableLiteralField.
This commit is contained in:
Mateusz Uzdowski 2012-09-10 16:07:52 +12:00
parent e92551b2da
commit d1b6ec224d

View File

@ -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;
}
}
}