You are here

function acquia_lift_agent_delete_form in Acquia Lift Connector 7.2

Form for deleting an agent and all its variation sets.

1 string reference to 'acquia_lift_agent_delete_form'
acquia_lift_menu in ./acquia_lift.module
Implements hook_menu().

File

./acquia_lift.admin.inc, line 627
acquia_lift.admin.inc Provides functions needed for the admin UI.

Code

function acquia_lift_agent_delete_form($form, $form_state, $agent) {
  $form['machine_name'] = array(
    '#type' => 'hidden',
    '#value' => $agent->machine_name,
  );
  $form['title'] = array(
    '#type' => 'hidden',
    '#value' => $agent->label,
  );
  $form['plugin'] = array(
    '#type' => 'hidden',
    '#value' => $agent->plugin,
  );
  $agent_type = $agent->plugin == ACQUIA_LIFT_TESTING_AGENT ? 'test' : 'personalization';
  return confirm_form($form, t('Are you sure you want to delete the %agent %title?', array(
    '%agent' => $agent_type,
    '%title' => $agent->label,
  )), 'admin/structure/personalize', '', t('Delete'), t('Cancel'));
}