You are here

function notifications_admin_subscriptions_form in Notifications 5

Subscription types administration

File

./notifications.admin.inc, line 213

Code

function notifications_admin_subscriptions_form() {
  $variable = 'notifications_subscription_types';
  $form[$variable] = array(
    '#type' => 'fieldset',
    '#title' => t('Subscription types'),
    '#description' => t('Enable the subscription types you want to have available.'),
    '#tree' => TRUE,
  );
  foreach (notifications_subscription_types() as $type => $info) {
    $form[$variable][$type] = array(
      '#title' => $info['title'],
      '#type' => 'fieldset',
    );
    $form[$variable][$type]['enabled'] = array(
      '#type' => 'checkbox',
      '#title' => t('Enabled'),
      '#default_value' => isset($info['enabled']) ? $info['enabled'] : 1,
    );
  }
  return system_settings_form($form);
}