You are here

function notifications_content_settings_form in Notifications 7

Same name and namespace in other branches
  1. 5 notifications_content/notifications_content.module \notifications_content_settings_form()
  2. 6.4 notifications_content/notifications_content.pages.inc \notifications_content_settings_form()
  3. 6 notifications_content/notifications_content.pages.inc \notifications_content_settings_form()
  4. 6.2 notifications_content/notifications_content.pages.inc \notifications_content_settings_form()
  5. 6.3 notifications_content/notifications_content.pages.inc \notifications_content_settings_form()

Admin settings form

1 string reference to 'notifications_content_settings_form'
notifications_content_menu in notifications_content/notifications_content.module
Implementation of hook_menu_()

File

notifications_content/notifications_content.admin.inc, line 10
Subscriptions to content events

Code

function notifications_content_settings_form($form, &$form_state) {

  // Build check boxes table with content types x subscription types
  $form['content'] = array(
    '#type' => 'fieldset',
    '#title' => t('Enabled subscription types'),
    '#weight' => -10,
    '#collapsible' => TRUE,
    '#description' => t('Check the subscription types that will be enabled. You can use the global settings here or set different options for each content type.'),
  );
  $form['content']['notifications_content_per_type'] = array(
    '#type' => 'radios',
    '#default_value' => variable_get('notifications_content_per_type', 0),
    '#options' => array(
      t('Use global settings on this page for all content types'),
      t('Set up for each content type on <a href="@content-type-settings">Administer Content Types</a>.', array(
        '@content-type-settings' => url('admin/structure/types'),
      )),
    ),
  );
  $form['content']['notifications_content_type'] = array(
    '#type' => 'checkboxes',
    '#title' => t('Global options'),
    '#options' => node_type_get_names(),
    '#default_value' => variable_get('notifications_content_type', array()),
    '#description' => t('Content types for which subscriptions will be enabled.'),
  );
  return system_settings_form($form);
}