You are here

function ad_actions_send_email_action_after_form in Advertisement 7

Same name and namespace in other branches
  1. 6.3 actions/ad_actions.module \ad_actions_send_email_action_after_form()
  2. 6.2 actions/ad_actions.module \ad_actions_send_email_action_after_form()

Return a form definition so the advanced email action can be configured.

Parameters

$context: Default values (if we are editing an existing action instance).

Return value

Form definition.

File

actions/ad_actions.module, line 163
Enable ad triggers and actions.

Code

function ad_actions_send_email_action_after_form($context) {
  $form = _ad_actions_email_form($context);
  $options = array(
    0 => t('immediately'),
    3600 => t('1 hour after'),
    10800 => t('3 hours after'),
    21600 => t('6 hours after'),
    43200 => t('12 hours after'),
    86400 => t('1 day after'),
    259200 => t('3 days after'),
    432000 => t('5 days after'),
    604800 => t('1 week after'),
    1209600 => t('2 weeks after'),
    1814400 => t('3 weeks after'),
    2419200 => t('4 weeks after'),
    4838400 => t('8 weeks after'),
    9676800 => t('16 weeks after'),
    31449600 => t('1 year after'),
  );
  $form = array_merge($form, _ad_actions_email_ad_form($context, $options, 'after'));
  $form = array_merge($form, _ad_actions_email_tokens_form($context));
  return $form;
}