You are here

function commerce_customer_ui_customer_profile_form_submit in Commerce Core 7

Submit callback for commerce_customer_ui_customer_profile_form().

See also

commerce_customer_ui_form_commerce_customer_ui_customer_profile_form_alter()

1 string reference to 'commerce_customer_ui_customer_profile_form_submit'
commerce_customer_ui_form_commerce_customer_ui_customer_profile_form_alter in modules/customer/commerce_customer_ui.module
Implements hook_form_FORM_ID_alter().

File

modules/customer/commerce_customer_ui.module, line 319

Code

function commerce_customer_ui_customer_profile_form_submit($form, &$form_state) {

  // Set the redirect based on the button clicked.
  if ($form_state['triggering_element']['#parents'][0] == 'save_continue') {
    $form_state['redirect'] = 'admin/commerce/customer-profiles/add/' . strtr($form_state['customer_profile']->type, array(
      '_' => '-',
    ));
  }
  elseif (arg(2) == 'customer-profiles' && arg(3) == 'add') {
    $form_state['redirect'] = 'admin/commerce/customer-profiles';
  }
}