You are here

function og_broadcast_form in Organic groups 6.2

Same name and namespace in other branches
  1. 5.8 og.module \og_broadcast_form()
  2. 5.3 og.module \og_broadcast_form()
  3. 6 og.module \og_broadcast_form()

Admins may broadcast messages to all their members.

Parameters

$node: The group node.

1 string reference to 'og_broadcast_form'
og_menu in ./og.module
Implementation of hook_menu().

File

./og.pages.inc, line 15
Page callbacks for Organic groups.

Code

function og_broadcast_form($form_state, $node) {
  drupal_set_title(t('Send message to %group', array(
    '%group' => $node->title,
  )));
  if (!empty($form_state['post'])) {
    drupal_set_message(t('Your message will be sent to all members of this group.'));
  }
  $form['subject'] = array(
    '#type' => 'textfield',
    '#title' => t('Subject'),
    '#size' => 70,
    '#maxlength' => 250,
    '#description' => t('Enter a subject for your message.'),
    '#required' => TRUE,
  );
  $form['body'] = array(
    '#type' => 'textarea',
    '#title' => t('Body'),
    '#rows' => 5,
    '#cols' => 90,
    '#description' => t('Enter a body for your message.'),
    '#required' => TRUE,
  );
  $form['send'] = array(
    '#type' => 'submit',
    '#value' => t('Send message'),
  );
  $form['gid'] = array(
    '#type' => 'value',
    '#value' => $node->nid,
  );
  return $form;
}