mirror of
https://github.com/silverstripe/silverstripe-userforms.git
synced 2024-10-22 15:05:42 +00:00
FEATURE: allow EditableLiteralFields to be hidden from report extracts. Fixes http://open.silverstripe.org/ticket/6704
This commit is contained in:
parent
7148d3e91f
commit
a81a164bcf
@ -15,12 +15,32 @@ class EditableLiteralField extends EditableFormField {
|
||||
|
||||
function getFieldConfiguration() {
|
||||
return new FieldSet(
|
||||
new TextareaField("Fields[$this->ID][CustomSettings][Content]", "HTML", 4, 20, $this->getSetting('Content'))
|
||||
new TextareaField(
|
||||
"Fields[$this->ID][CustomSettings][Content]",
|
||||
"HTML", 4, 20, $this->getSetting('Content')
|
||||
),
|
||||
new CheckboxField(
|
||||
"Fields[$this->ID][CustomSettings][HideFromReports]",
|
||||
_t('EditableLiteralField.HIDEFROMREPORT', 'Hide from reports?'),
|
||||
$this->getSetting('HideFromReports')
|
||||
)
|
||||
);
|
||||
}
|
||||
|
||||
function getFormField() {
|
||||
return new LiteralField("LiteralField[$this->ID]",
|
||||
"<div id='$this->Name' class='field text'><label class='left'>$this->Title</label><div class='middleColumn literalFieldArea'>". $this->getSetting('Content') ."</div></div>");
|
||||
"<div id='$this->Name' class='field text'>
|
||||
<label class='left'>$this->Title</label>
|
||||
<div class='middleColumn literalFieldArea'>". $this->getSetting('Content') ."</div>".
|
||||
"</div>"
|
||||
);
|
||||
}
|
||||
|
||||
function showInReports() {
|
||||
if($this->getSetting('HideFromReports')) {
|
||||
return false;
|
||||
}
|
||||
|
||||
return true;
|
||||
}
|
||||
}
|
Loading…
x
Reference in New Issue
Block a user