Skip to content
Snippets Groups Projects
Commit 25774433 authored by Daniel Kudwien's avatar Daniel Kudwien
Browse files

Issue #811774 by sun: Fixed duplicate disabled warning when submitting settings form. (for real)

parent d332d16b
No related branches found
No related tags found
No related merge requests found
...@@ -12,7 +12,7 @@ ...@@ -12,7 +12,7 @@
* @see phpmailer_settings_form_validate() * @see phpmailer_settings_form_validate()
* @see phpmailer_settings_form_submit() * @see phpmailer_settings_form_submit()
*/ */
function phpmailer_settings_form($form_state) { function phpmailer_settings_form($form, $form_state) {
$form['smtp_on'] = array( $form['smtp_on'] = array(
'#type' => 'checkbox', '#type' => 'checkbox',
'#title' => t('Use PHPMailer to send e-mails'), '#title' => t('Use PHPMailer to send e-mails'),
...@@ -26,7 +26,7 @@ function phpmailer_settings_form($form_state) { ...@@ -26,7 +26,7 @@ function phpmailer_settings_form($form_state) {
$form['smtp_on']['#default_value'] = 0; $form['smtp_on']['#default_value'] = 0;
$form['smtp_on']['#description'] = t('MimeMail has been detected. To enable PHPMailer for mail transport, go to the <a href="@url">MimeMail settings page</a> and select PHPMailer from the available e-mail engines.', array('@url' => url('admin/config/system/mimemail'))); $form['smtp_on']['#description'] = t('MimeMail has been detected. To enable PHPMailer for mail transport, go to the <a href="@url">MimeMail settings page</a> and select PHPMailer from the available e-mail engines.', array('@url' => url('admin/config/system/mimemail')));
} }
elseif (!variable_get('smtp_on', 0) && empty($form_state['input']['smtp_on'])) { elseif (!variable_get('smtp_on', 0) && empty($form_state['input'])) {
drupal_set_message(t('PHPMailer is currently disabled.'), 'warning'); drupal_set_message(t('PHPMailer is currently disabled.'), 'warning');
} }
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment