mirror of
https://github.com/silverstripe/silverstripe-userforms.git
synced 2024-10-22 17:05:42 +02:00
BUG: Set the summary fields of UserDefinedForm_EmailRecipient dynamically via config system
You can't dynamically expose statics; that's a no-op in 3.1
This commit is contained in:
parent
ed46cfdb08
commit
f0f9ea702c
@ -74,11 +74,16 @@ class UserDefinedForm extends Page {
|
||||
$editor->setRows(3);
|
||||
$label->addExtraClass('left');
|
||||
|
||||
UserDefinedForm_EmailRecipient::set_summary_fields(array(
|
||||
// Set the summary fields of UserDefinedForm_EmailRecipient dynamically via config system
|
||||
Config::inst()->update(
|
||||
'UserDefinedForm_EmailRecipient',
|
||||
'summary_fields',
|
||||
array(
|
||||
'EmailAddress' => _t('UserDefinedForm.EMAILADDRESS', 'Email'),
|
||||
'EmailSubject' => _t('UserDefinedForm.EMAILSUBJECT', 'Subject'),
|
||||
'EmailFrom' => _t('UserDefinedForm.EMAILFROM', 'From')
|
||||
));
|
||||
'EmailFrom' => _t('UserDefinedForm.EMAILFROM', 'From'),
|
||||
)
|
||||
);
|
||||
|
||||
// who do we email on submission
|
||||
$emailRecipients = new GridField("EmailRecipients", _t('UserDefinedForm.EMAILRECIPIENTS', 'Email Recipients'), $this->EmailRecipients(), GridFieldConfig_RecordEditor::create(10));
|
||||
@ -1034,15 +1039,6 @@ class UserDefinedForm_EmailRecipient extends DataObject {
|
||||
|
||||
private static $summary_fields = array();
|
||||
|
||||
/**
|
||||
* Expose the summary_fields static
|
||||
*
|
||||
* @param array $fields
|
||||
*/
|
||||
public static function set_summary_fields($fields) {
|
||||
self::$summary_fields = $fields;
|
||||
}
|
||||
|
||||
/**
|
||||
* @return FieldList
|
||||
*/
|
||||
|
Loading…
Reference in New Issue
Block a user