ENH move OnCompleteMessage from $defaults to populateDefaults() for translations

add double backslashes, fix typo as requested by michalkleiner
This commit is contained in:
Lukas Erni 2021-09-02 16:12:25 +02:00
parent 1637a29cb4
commit 663bfa6952

View File

@ -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
*/