You are here

function rules_admin_item_form_revert in Rules 6

Shows the revert form for items

1 string reference to 'rules_admin_item_form_revert'
rules_admin_menu in rules_admin/rules_admin.module
Implementation of hook_menu().

File

rules_admin/rules_admin.sets.inc, line 75

Code

function rules_admin_item_form_revert(&$form_state, $item_type, $item) {
  $form = array();
  $form_state['item'] = $item;
  $form_state['item_type'] = $item_type;
  $path = array();
  $path['path'] = isset($_GET['destination']) ? $_GET['destination'] : RULES_ADMIN_PATH;
  return confirm_form($form, t('Are you sure you want to revert %label?', array(
    '%label' => rules_get_element_label($item),
  )), $path, t('This action cannot be undone.'), t('Revert'), t('Cancel'));
}