You are here

function ctools_export_ui_delete_confirm_form in Chaos Tool Suite (ctools) 7

Same name and namespace in other branches
  1. 6 plugins/export_ui/ctools_export_ui.class.php \ctools_export_ui_delete_confirm_form()

Delete/Revert confirm form.

@todo -- call back into the object instead.

1 string reference to 'ctools_export_ui_delete_confirm_form'
ctools_export_ui::delete_page in plugins/export_ui/ctools_export_ui.class.php
Page callback to delete an exportable item.

File

plugins/export_ui/ctools_export_ui.class.php, line 1449

Code

function ctools_export_ui_delete_confirm_form($form, &$form_state) {
  _ctools_export_ui_add_form_files($form, $form_state);
  $plugin = $form_state['plugin'];
  $item = $form_state['item'];
  $form = array();
  $export_key = $plugin['export']['key'];
  $question = str_replace('%title', check_plain($item->{$export_key}), $plugin['strings']['confirmation'][$form_state['op']]['question']);
  $path = !empty($_REQUEST['cancel_path']) && !url_is_external($_REQUEST['cancel_path']) ? $_REQUEST['cancel_path'] : ctools_export_ui_plugin_base_path($plugin);
  $form = confirm_form($form, $question, $path, $plugin['strings']['confirmation'][$form_state['op']]['information'], $plugin['allowed operations'][$form_state['op']]['title'], t('Cancel'));
  return $form;
}