You are here

function acquia_lift_personalize_campaign_wizard_status_submit in Acquia Lift Connector 7.2

Submit function for the status change buttons.

1 string reference to 'acquia_lift_personalize_campaign_wizard_status_submit'
acquia_lift_personalize_campaign_wizard_process_bar_alter in ./acquia_lift.admin.wizard.inc
Alter hook for the process bar on the campaign wizard form.

File

./acquia_lift.admin.wizard.inc, line 2463
acquia_lift.admin.wizard.inc Functions specific to the Acquia Lift alteration of the campaign creation wizard.

Code

function acquia_lift_personalize_campaign_wizard_status_submit($form, &$form_state) {
  $next_status = $form_state['triggering_element']['#personalize_next_status'];
  $agent_data = personalize_agent_load($form_state['values']['agent_name']);
  module_load_include('inc', 'acquia_lift', 'acquia_lift.admin');
  if (!acquia_lift_target_set_status($agent_data, $next_status)) {
    drupal_set_message(t('There was a problem implementing the personalization as defined.  Please check the <a href="!review_url">review section</a> for more details.', array(
      '!review_url' => url('admin/structure/personalize/manage/' . $agent_data->machine_name . '/review'),
    )), 'error');
  }
}