You are here

function party_archive_form in Party 7

Form constructor for the party archive form.

Parameters

Party $party: The party we are set to archive.

See also

party_archive_form_submit().

1 string reference to 'party_archive_form'
party_menu in ./party.module
Implements hook_menu().

File

./party.pages.inc, line 136
party.pages.inc

Code

function party_archive_form($form, &$form_state, $party) {
  $form_state['party'] = $party;

  // Output the confirm form.
  if ($party->archived) {
    $yes = t('Un-archive');
    $action = t('un-archive');
    $name = 'un-archive';
  }
  else {
    $yes = t('Archive');
    $action = t('archive');
    $name = 'archive';
  }
  $message = t('Are you sure you want to @action party %label (%id)?', array(
    '@action' => t($action),
    '%label' => $party->label,
    '%id' => $party->pid,
  ));
  $form = confirm_form($form, $message, 'admin/community', '', $yes, NULL, $action);
  return $form;
}