You are here

function commerce_email_settings_form in Commerce Email 7

Admin system settings form

1 string reference to 'commerce_email_settings_form'
commerce_email_menu in ./commerce_email.module
Implements hook_menu().

File

./commerce_email.module, line 83
Defines additional menu item and order html email functonality.

Code

function commerce_email_settings_form() {
  $form = array();
  $admin_email = variable_get('admin_email', array());
  $form['admin_email'] = array(
    '#type' => 'fieldset',
    '#title' => t('Administration Email'),
    '#collapsible' => FALSE,
    '#collapsed' => FALSE,
    '#tree' => TRUE,
    '#weight' => 1,
  );
  $form['admin_email']['enabled'] = array(
    '#type' => 'checkbox',
    '#title' => t('Enable administrator order email'),
    '#default_value' => empty($admin_email['enabled']) ? '' : $admin_email['enabled'],
    '#description' => t('Send an email to the adminstration address when an order is complete'),
    '#weight' => 2,
  );
  $form['admin_email']['email_address'] = array(
    '#type' => 'textfield',
    '#size' => 64,
    '#maxlength' => 128,
    '#title' => t('Email address'),
    '#description' => t('Send an email to the adminstration address when an order is complete.<br />Leave blank if same as site email'),
    '#default_value' => empty($admin_email['email_address']) ? '' : $admin_email['email_address'],
    '#required' => FALSE,
    '#weight' => 3,
  );
  return system_settings_form($form);
}