You are here

function profile2_diff_inline_form_submit in Profile 2 7.2

Form submission handler for diff_inline_form() for JS-disabled clients.

1 string reference to 'profile2_diff_inline_form_submit'
profile2_diff_inline_form in contrib/profile2_diff.module
Form builder: Inline diff controls.

File

contrib/profile2_diff.module, line 405
Provides functionality to show a diff between two profile2 revisions.

Code

function profile2_diff_inline_form_submit(&$form, &$form_state) {
  if (isset($form_state['values']['revision'], $form_state['values']['profile'])) {
    $profile = $form_state['values']['profile'];
    $old_vid = $form_state['values']['revision'];
    $link_base = _profile2_revision_base_path($profile, TRUE);
    $form_state['redirect'] = "{$link_base}/view/{$profile->vid}/{$old_vid}";
  }
}