mirror of
https://github.com/silverstripe/silverstripe-userforms.git
synced 2024-10-22 17:05:42 +02:00
Merge pull request #1102 from lerni/OnCompleteMessage-in-populateDefaults()
ENH Move OnCompleteMessage from $defaults to populateDefaults() for translations
This commit is contained in:
commit
81c21ea463
@ -110,7 +110,6 @@ trait UserForm
|
||||
private static $defaults = [
|
||||
'Content' => '$UserDefinedForm',
|
||||
'DisableSaveSubmissions' => 0,
|
||||
'OnCompleteMessage' => '<p>Thanks, we\'ve received your submission.</p>'
|
||||
];
|
||||
|
||||
/**
|
||||
@ -167,6 +166,15 @@ trait UserForm
|
||||
*/
|
||||
protected $fieldsFromTo = [];
|
||||
|
||||
/**
|
||||
* @var array
|
||||
*/
|
||||
public function populateDefaults()
|
||||
{
|
||||
parent::populateDefaults();
|
||||
$this->OnCompleteMessage = '<p>' . _t('SilverStripe\\UserForms\\Model\\UserDefinedForm.ONCOMPLETEMESSAGE', 'Thanks, we\'ve received your submission.') . '</p>';
|
||||
}
|
||||
|
||||
/**
|
||||
* @return FieldList
|
||||
*/
|
||||
|
Loading…
Reference in New Issue
Block a user