You are here

function _spaces_og_form_alter_group in Spaces 6

Same name and namespace in other branches
  1. 5.2 spaces_og.module \_spaces_og_form_alter_group()
  2. 6.3 spaces_og/spaces_og.pages.inc \_spaces_og_form_alter_group()
  3. 6.2 spaces_og/spaces_og.module \_spaces_og_form_alter_group()
  4. 7.3 spaces_og/spaces_og.pages.inc \_spaces_og_form_alter_group()
  5. 7 spaces_og/spaces_og.pages.inc \_spaces_og_form_alter_group()

Group node form_alter(). @TODO: repair default values on node previews.

1 call to _spaces_og_form_alter_group()
spaces_og_form_alter in spaces_og/spaces_og.module

File

spaces_og/spaces_og.module, line 654

Code

function _spaces_og_form_alter_group(&$form, $form_state) {
  _spaces_og_make_hidden($form['og_selective']);
  _spaces_og_make_hidden($form['og_register']);
  _spaces_og_make_hidden($form['og_private']);
  _spaces_og_make_hidden($form['og_directory']);
  _spaces_og_make_hidden($form['themes']);

  // Add context prefix form
  $form['purl'] = purl_form('spaces_og', $form['#node']->nid, $form['#node']->purl);

  // Add presets form
  $nid = isset($form['#node']->nid) ? $form['#node']->nid : NULL;
  $space = spaces_load('og', $nid);
  $form['spaces_preset'] = spaces_form_presets($space);

  // Add custom submit handler
  $form['#submit'][] = '_spaces_og_group_node_form_submit';
}