From 049d42769a2453456ee1459f976b2f7d8967c558 Mon Sep 17 00:00:00 2001 From: Will Rossiter Date: Mon, 27 Apr 2009 02:42:29 +0000 Subject: [PATCH] APICHANGE: removed the dulicate send copy to subscriber field. This function should now all be routed through the Email Recipients function in the cms. this gives more control over the emailing to the user --- code/UserDefinedForm.php | 22 ------------------- .../email/SubmittedFormEmailToSubmitter.ss | 12 ---------- 2 files changed, 34 deletions(-) delete mode 100644 templates/email/SubmittedFormEmailToSubmitter.ss diff --git a/code/UserDefinedForm.php b/code/UserDefinedForm.php index a08a4f9..52fa94c 100755 --- a/code/UserDefinedForm.php +++ b/code/UserDefinedForm.php @@ -27,8 +27,6 @@ class UserDefinedForm extends Page { * @var Array Fields on the user defined form page. */ static $db = array( - "EmailOnSubmit" => "Boolean", - "EmailOnSubmitSubject" => "Varchar(200)", "SubmitButtonText" => "Varchar", "OnCompleteMessage" => "HTMLText", "ShowClearButton" => "Boolean" @@ -473,14 +471,6 @@ JS if(!empty($data[$field->Name])){ switch($field->ClassName){ - case "EditableEmailField" : - if($field->SendCopy){ - $recipientAddresses[] = $data[$field->Name]; - $sendCopy = true; - $values[$field->Title] = ''.$data[$field->Name].''; - } - break; - case "EditableFileField" : if(isset($_FILES[$field->Name])) { @@ -551,18 +541,6 @@ JS } } - // send a copy to the author of the form - if($sendCopy) { - $emailToSubmiter = new UserDefinedForm_SubmittedFormEmailToSubmitter($submittedFields); - $emailToSubmiter->setSubject($this->EmailOnSubmitSubject); - - foreach($recipientAddresses as $addr) { - $emailToSubmiter->setBody($this->EmailMessageToSubmitter); - $emailToSubmiter->setTo($addr); - $emailToSubmiter->send(); - } - } - // Redirect to the finished method on this controller with the referrer data Director::redirect($this->Link() . 'finished?referrer=' . urlencode($data['Referrer'])); } diff --git a/templates/email/SubmittedFormEmailToSubmitter.ss b/templates/email/SubmittedFormEmailToSubmitter.ss deleted file mode 100644 index 5bf0acd..0000000 --- a/templates/email/SubmittedFormEmailToSubmitter.ss +++ /dev/null @@ -1,12 +0,0 @@ -$Body - -

<% _t('SUBMITTED',"You have submitted the following information:") %>

- - - <% control Fields %> - - - - - <% end_control %> -
$Title$Value.RAW
\ No newline at end of file