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:
Myles Beardsmore 2015-06-18 09:35:02 +12:00
parent 11dfa1e3ad
commit a31f717774
3 changed files with 155 additions and 146 deletions

View File

@ -182,6 +182,13 @@ SQL;
$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;
}

View File

@ -27,6 +27,7 @@ en_GB:
SINGULARNAME: 'User Defined Form'
SUBMITBUTTON: Submit
TEXTONSUBMIT: 'Text on submit button:'
NORECIPIENTS: 'Warning: You have not configured any recipients. Form submissions may be missed.'
UserDefinedForm_EmailRecipient:
PLURALNAME: 'User Defined Form Email Recipients'
SINGULARNAME: 'User Defined Form Email Recipient'

View File

@ -29,6 +29,7 @@ en_US:
SINGULARNAME: 'User Defined Form'
SUBMITBUTTON: Submit
TEXTONSUBMIT: 'Text on submit button:'
NORECIPIENTS: 'Warning: You have not configured any recipients. Form submissions may be missed.'
UserDefinedForm_EmailRecipient:
PLURALNAME: 'User Defined Form Email Recipients'
SINGULARNAME: 'User Defined Form Email Recipient'