mirror of
https://github.com/silverstripe/silverstripe-userforms.git
synced 2024-10-22 15:05:42 +00:00
Merge pull request #269 from mediabeastnz
This commit is contained in:
commit
a3d425d443
@ -101,6 +101,12 @@ class UserDefinedForm extends Page {
|
|||||||
*/
|
*/
|
||||||
private static $enable_are_you_sure = true;
|
private static $enable_are_you_sure = true;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @var bool
|
||||||
|
* @config
|
||||||
|
*/
|
||||||
|
private static $recipients_warning_enabled = false;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Temporary storage of field ids when the form is duplicated.
|
* Temporary storage of field ids when the form is duplicated.
|
||||||
* Example layout: array('EditableCheckbox3' => 'EditableCheckbox14')
|
* Example layout: array('EditableCheckbox3' => 'EditableCheckbox14')
|
||||||
@ -229,6 +235,13 @@ SQL;
|
|||||||
|
|
||||||
$fields = parent::getCMSFields();
|
$fields = parent::getCMSFields();
|
||||||
|
|
||||||
|
if($this->EmailRecipients()->Count() == 0 && static::config()->recipients_warning_enabled) {
|
||||||
|
$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…
x
Reference in New Issue
Block a user