mirror of
https://github.com/silverstripe/silverstripe-userforms.git
synced 2024-10-22 17:05:42 +02:00
Merge pull request #112 from oddnoc/fix-summary-fields
BUG: Set the summary fields of UserDefinedForm_EmailRecipient
This commit is contained in:
commit
fc83164b46
@ -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