You are here

function pet_action_email_form in Previewable email templates 6

Provide action form elements for PET email Ubercart action.

See also

pet_action_email()

File

./pet.module, line 393
Previewable E-mail Template module.

Code

function pet_action_email_form($form_state, $settings = array()) {
  $form['from'] = array(
    '#type' => 'textfield',
    '#title' => t('Sender'),
    '#default_value' => isset($settings['from']) ? $settings['from'] : uc_store_email_from(),
    '#description' => t("Enter the 'From' email addresses, or leave blank to use your store email address. You may use order tokens for dynamic email addresses."),
    '#required' => TRUE,
  );
  $form['addresses'] = array(
    '#type' => 'textarea',
    '#title' => t('Recipients'),
    '#default_value' => isset($settings['addresses']) ? $settings['addresses'] : '[order-email]',
    '#description' => t('Enter the email addresses to receive the notifications, one on each line. You may use order tokens for dynamic email addresses.'),
    '#required' => TRUE,
  );
  $form['pet'] = array(
    '#type' => 'select',
    '#title' => t('Previewable email template'),
    '#options' => pet_option_list(),
    '#default_value' => $settings['pet'],
    '#description' => t('Choose the previewable email template to send when this action is fired.'),
    '#required' => TRUE,
  );
  return $form;
}