mirror of
https://github.com/silverstripe/silverstripe-userforms.git
synced 2024-10-22 17:05:42 +02:00
Added warning message to page if no email recipients are configured. Also updated lang files to include the warning message.
This commit is contained in:
parent
11dfa1e3ad
commit
a31f717774
@ -182,6 +182,13 @@ SQL;
|
|||||||
|
|
||||||
$fields = parent::getCMSFields();
|
$fields = parent::getCMSFields();
|
||||||
|
|
||||||
|
if($this->EmailRecipients()->Count() == 0) {
|
||||||
|
$fields->addFieldToTab("Root.Main", new LiteralField("EmailRecipientsWarning",
|
||||||
|
"<p class=\"message warning\">" . _t("UserDefinedForm.NORECIPIENTS",
|
||||||
|
"Warning: You have not configured any recipients. Form submissions may be missed.")
|
||||||
|
. "</p>"), "Title");
|
||||||
|
}
|
||||||
|
|
||||||
return $fields;
|
return $fields;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -27,6 +27,7 @@ en_GB:
|
|||||||
SINGULARNAME: 'User Defined Form'
|
SINGULARNAME: 'User Defined Form'
|
||||||
SUBMITBUTTON: Submit
|
SUBMITBUTTON: Submit
|
||||||
TEXTONSUBMIT: 'Text on submit button:'
|
TEXTONSUBMIT: 'Text on submit button:'
|
||||||
|
NORECIPIENTS: 'Warning: You have not configured any recipients. Form submissions may be missed.'
|
||||||
UserDefinedForm_EmailRecipient:
|
UserDefinedForm_EmailRecipient:
|
||||||
PLURALNAME: 'User Defined Form Email Recipients'
|
PLURALNAME: 'User Defined Form Email Recipients'
|
||||||
SINGULARNAME: 'User Defined Form Email Recipient'
|
SINGULARNAME: 'User Defined Form Email Recipient'
|
||||||
|
@ -29,6 +29,7 @@ en_US:
|
|||||||
SINGULARNAME: 'User Defined Form'
|
SINGULARNAME: 'User Defined Form'
|
||||||
SUBMITBUTTON: Submit
|
SUBMITBUTTON: Submit
|
||||||
TEXTONSUBMIT: 'Text on submit button:'
|
TEXTONSUBMIT: 'Text on submit button:'
|
||||||
|
NORECIPIENTS: 'Warning: You have not configured any recipients. Form submissions may be missed.'
|
||||||
UserDefinedForm_EmailRecipient:
|
UserDefinedForm_EmailRecipient:
|
||||||
PLURALNAME: 'User Defined Form Email Recipients'
|
PLURALNAME: 'User Defined Form Email Recipients'
|
||||||
SINGULARNAME: 'User Defined Form Email Recipient'
|
SINGULARNAME: 'User Defined Form Email Recipient'
|
||||||
|
Loading…
Reference in New Issue
Block a user