You are here

function og_activity_form_alter in Heartbeat 6.3

Same name and namespace in other branches
  1. 6.4 modules/og_activity/og_activity.module \og_activity_form_alter()

Implementation of hook_form_alter().

File

modules/og_activity/og_activity.module, line 7

Code

function og_activity_form_alter(&$form, $form_state, $form_id) {
  if ($form_id == 'heartbeat_activity_admin_settings') {
    $form['og_fields'] = array(
      '#type' => 'fieldset',
      '#weight' => 0,
      '#title' => t('Organic group settings'),
      '#collapsible' => TRUE,
      '#collapsed' => FALSE,
    );
    $form['og_fields']['heartbeat_add_og_admins_to_personal'] = array(
      '#title' => t('Do you want to log activity by group administrators to the personal heartbeat?'),
      '#type' => 'checkbox',
      '#default_value' => variable_get('heartbeat_add_og_admins_to_personal', 1),
    );
    $form['og_fields']['heartbeat_add_og_members_to_personal'] = array(
      '#title' => t('Do you want to log activity by members of your group to the personal heartbeat?'),
      '#type' => 'checkbox',
      '#default_value' => variable_get('heartbeat_add_og_members_to_personal', 1),
      '#description' => t('the members performing the activity are members of the group where acting user is administer'),
    );
    $form['og_fields']['heartbeat_add_og_related_to_personal'] = array(
      '#title' => t('Do you want to log activity by related group members to the personal heartbeat?'),
      '#type' => 'checkbox',
      '#default_value' => variable_get('heartbeat_add_og_related_to_personal', 1),
      '#description' => t('the members performing the activity are members of the groups where acting user has membership'),
    );
  }
  if ($form_id == 'og_create_admin_confirm') {
    $form['#submit'][] = 'og_activity_create_admin_confirm';
  }
}