You are here

function og_confirm_subscribe in Organic groups 6

Same name and namespace in other branches
  1. 5.8 og.module \og_confirm_subscribe()
  2. 5 og.module \og_confirm_subscribe()
  3. 5.2 og.module \og_confirm_subscribe()
  4. 5.3 og.module \og_confirm_subscribe()
  5. 5.7 og.module \og_confirm_subscribe()
  6. 6.2 og.pages.inc \og_confirm_subscribe()

Confirm og membership form

1 string reference to 'og_confirm_subscribe'
og_subscribe in ./og.module

File

./og.module, line 982

Code

function og_confirm_subscribe($form_state, $gid, $node, $account) {
  $form['gid'] = array(
    '#type' => 'value',
    '#value' => $gid,
  );
  $form['account'] = array(
    '#type' => 'value',
    '#value' => $account,
  );
  if ($node->og_selective == OG_MODERATED) {
    $form['request'] = array(
      '#type' => 'textarea',
      '#title' => t('Additional details'),
      '#description' => t('Add any detail which will help an administrator decide whether to approve or deny your membership request.'),
    );
  }
  else {
    $form['request'] = array(
      '#type' => 'value',
      '#value' => '',
    );
  }
  return confirm_form($form, t('Are you sure you want to join the group %title?', array(
    '%title' => $node->title,
  )), 'node/' . $node->nid, ' ', t('Join'), t('Cancel'));
}