You are here

function commerce_invoice_receipt_config in Commerce Invoice Receipt 7

hook_menu callback for a configuration settings page.

Currently just implements an email to bcc on all invoices.

1 string reference to 'commerce_invoice_receipt_config'
commerce_invoice_receipt_menu in ./commerce_invoice_receipt.module
Implements hook_menu().

File

./commerce_invoice_receipt.module, line 170
Provides a printable invoice receipt along with HTML mailing rules.

Code

function commerce_invoice_receipt_config() {
  $form = array();
  $form['commerce_invoice_send_from'] = array(
    '#type' => 'textfield',
    '#title' => t('Send From'),
    '#description' => t('Email address from which all invoices will be sent. If nothing is entered, Invoice Receipt will use the main email address for whole website instead. This is currently set to: %email.', array(
      '%email' => variable_get('site_email'),
    )),
    '#default_value' => variable_get('commerce_invoice_send_from'),
  );
  $form['commerce_invoice_copy_all_user'] = array(
    '#type' => 'textfield',
    '#title' => t('Copy Email'),
    '#default_value' => variable_get('commerce_invoice_copy_all_user', ''),
    '#size' => 40,
    '#maxlength' => 255,
    '#description' => t('Email which is copied on all commerce invoice receipts.'),
  );
  $form['commerce_invoice_copy_all_user_method'] = array(
    '#type' => 'select',
    '#options' => array(
      'Bcc' => 'BCC',
      'Cc' => 'CC',
    ),
    '#title' => t('Method'),
    '#default_value' => variable_get('commerce_invoice_copy_all_user_method', 'Bcc'),
    '#size' => 1,
    '#description' => t('What method to use when adding the email address.'),
    '#required' => TRUE,
  );
  return system_settings_form($form);
}