You are here

function acquia_lift_personalize_campaign_wizard_blocks_remove in Acquia Lift Connector 7.2

Submit handler to remove a block option from a personalized block form.

1 string reference to 'acquia_lift_personalize_campaign_wizard_blocks_remove'
_acquia_lift_personalize_campaign_wizard_variations_block in ./acquia_lift.admin.wizard.inc
Generate the blocks portion of the campaign wizard form.

File

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

Code

function acquia_lift_personalize_campaign_wizard_blocks_remove($form, &$form_state) {

  // Value will be "remove_{delta}_{osid}" where the {delta} is the block delta
  // to remove and {osid} is the option set to remove it from.
  list($remove, $delta, $osid) = explode('_', $form_state['triggering_element']['#value']);
  if ($osid === 'add') {
    $osid = 'add_' . _acquia_lift_personalize_campaign_wizard_next_element($form_state, 'new');
  }
  $form_state['option_set_to_remove'][$osid] = $delta;
  $form_state['rebuild'] = TRUE;
}