You are here

function party_activity_edit_form_submit in Party 8.2

Form API submit callback for the activity form.

@todo remove hard-coded link

1 string reference to 'party_activity_edit_form_submit'
party_activity_edit_form in modules/party_activity/party_activity.admin.inc
Form callback: create or edit a activity.

File

modules/party_activity/party_activity.admin.inc, line 239
Party Activity editing UI

Code

function party_activity_edit_form_submit(&$form, &$form_state) {
  $activity = entity_ui_controller('party_activity')
    ->entityFormSubmitBuildEntity($form, $form_state);

  // Save the activity and go back to the list of activities
  // Add in created and changed times.
  if ($activity->is_new = isset($activity->is_new) ? $activity->is_new : 0) {
    $activity->created = time();
  }
  $activity->modified = time();
  $activity
    ->save();
  $form_state['redirect'] = 'admin/community/activities';
}