+--------------------------------------------------------------------+
| CiviCRM version 4.6 |
+--------------------------------------------------------------------+
- | Copyright CiviCRM LLC (c) 2004-2014 |
+ | Copyright CiviCRM LLC (c) 2004-2015 |
+--------------------------------------------------------------------+
| This file is a part of CiviCRM. |
| |
| GNU Affero General Public License or the licensing of CiviCRM, |
| see the CiviCRM license FAQ at http://civicrm.org/licensing |
+--------------------------------------------------------------------+
-*/
+ */
/**
*
* @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
+ * Build the form object.
*
* @return void
*/
$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;
$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);
}
$errors['mailerJobSize'] = ts('The job size must be at least 1000 or set to 0 (unlimited).');
}
elseif (CRM_Utils_Array::value('mailerJobSize', $fields) <
- CRM_Utils_Array::value('mailerBatchLimit', $fields)) {
+ CRM_Utils_Array::value('mailerBatchLimit', $fields)
+ ) {
$errors['mailerJobSize'] = ts('A job size smaller than the batch limit will negate the effect of the batch limit.');
}
}
return empty($errors) ? TRUE : $errors;
}
+
}