You are here

function party_edit_form_save in Party 7

Same name and namespace in other branches
  1. 8.2 party.pages.inc \party_edit_form_save()

Set Entity Label

See also

party_edit_form_submit

2 string references to 'party_edit_form_save'
party_edit_form_form in plugins/content_types/party_edit_form.inc
Form
party_form in ./party.pages.inc
Party edit form.

File

./party.pages.inc, line 121
party.pages.inc

Code

function party_edit_form_save($form, &$form_state) {
  $controller = entity_get_controller('party');
  $controller
    ->setPrimaryFields($form['#party']);
  drupal_set_message(t("@party saved successfully.", array(
    '@party' => $form['#party']->label,
  )));
  $form_state['redirect'] = 'party/' . $form['#party']->pid;
}