You are here

function mailchimp_lists_webhook_form in Mailchimp 7.4

Same name and namespace in other branches
  1. 7.5 modules/mailchimp_lists/includes/mailchimp_lists.admin.inc \mailchimp_lists_webhook_form()
  2. 7.3 modules/mailchimp_lists/includes/mailchimp_lists.admin.inc \mailchimp_lists_webhook_form()

Webhooks Toggle form.

1 string reference to 'mailchimp_lists_webhook_form'
mailchimp_lists_menu in modules/mailchimp_lists/mailchimp_lists.module
Implements hook_menu().

File

modules/mailchimp_lists/includes/mailchimp_lists.admin.inc, line 114
mailchimp_lists module admin settings.

Code

function mailchimp_lists_webhook_form($form, &$form_state, $list_id, $action) {
  $list = mailchimp_get_list($list_id);
  $form_state['list'] = $list;
  $form_state['action'] = $action;
  if ($list) {
    switch ($action) {
      case "enable":
        break;
      case "disable":
        break;
      default:
        return array();
    }
    $label = t($action) . " webhooks";
    return confirm_form($form, t('Are you sure you want to &action webhooks for %name?', array(
      '&action' => t($action),
      '%name' => $list->name,
    )), 'admin/config/services/mailchimp/lists', t('You can change this setting back from the mailchimp administrative UI.'), $label);
  }
  return array();
}