Merge pull request #6044 from monishdeb/CRM-16575
[civicrm-core.git] / CRM / Admin / Form / Setting / Mail.php
index 7d1a87660f7dd7e8367437075f1c6f16430edef9..989dad279ea9c0b7362ca396dff3c3d69e15ecae 100644 (file)
@@ -3,7 +3,7 @@
  +--------------------------------------------------------------------+
  | CiviCRM version 4.6                                                |
  +--------------------------------------------------------------------+
- | Copyright CiviCRM LLC (c) 2004-2014                                |
+ | Copyright CiviCRM LLC (c) 2004-2015                                |
  +--------------------------------------------------------------------+
  | This file is a part of CiviCRM.                                    |
  |                                                                    |
@@ -28,7 +28,7 @@
 /**
  *
  * @package CRM
- * @copyright CiviCRM LLC (c) 2004-2014
+ * @copyright CiviCRM LLC (c) 2004-2015
  * $Id$
  *
  */
  */
 class CRM_Admin_Form_Setting_Mail extends CRM_Admin_Form_Setting {
 
+  protected $_settings = array(
+    'replyTo' => CRM_Core_BAO_Setting::MAILING_PREFERENCES_NAME,
+  );
+
   /**
    * Build the form object.
    *
@@ -49,7 +53,6 @@ class CRM_Admin_Form_Setting_Mail extends CRM_Admin_Form_Setting {
     $this->addElement('text', 'mailerBatchLimit', ts('Mailer Batch Limit'));
     $this->addElement('text', 'mailThrottleTime', ts('Mailer Throttle Time'));
     $this->addElement('text', 'mailerJobSize', ts('Mailer Job Size'));
-    $this->addElement('advcheckbox', 'replyTo', ts('Enable Custom Reply-To'));
     $this->addElement('text', 'mailerJobsMax', ts('Mailer CRON job limit'));
     $check = TRUE;
 
@@ -58,10 +61,10 @@ class CRM_Admin_Form_Setting_Mail extends CRM_Admin_Form_Setting {
     $session->pushUserContext(CRM_Utils_System::url('civicrm/admin', 'reset=1'));
 
     $this->addFormRule(array('CRM_Admin_Form_Setting_Mail', 'formRule'));
-    $this->addRule('mailerBatchLimit', ts('Must be an integer'), 'integer');
-    $this->addRule('mailThrottleTime', ts('Must be an integer'), 'integer');
-    $this->addRule('mailerJobSize', ts('Must be an integer'), 'integer');
-    $this->addRule('mailerJobsMax', ts('Must be an integer'), 'integer');
+    $this->addRule('mailerBatchLimit', ts('Please enter a valid integer.'), 'integer');
+    $this->addRule('mailThrottleTime', ts('Please enter a valid integer.'), 'integer');
+    $this->addRule('mailerJobSize', ts('Please enter a valid integer.'), 'integer');
+    $this->addRule('mailerJobsMax', ts('Please enter a valid integer.'), 'integer');
 
     parent::buildQuickForm($check);
   }