You are here

function page_manager_save_page_form_cancel in Chaos Tool Suite (ctools) 7

Same name and namespace in other branches
  1. 6 page_manager/page_manager.admin.inc \page_manager_save_page_form_cancel()

Discard changes to the page.

1 string reference to 'page_manager_save_page_form_cancel'
page_manager_save_page_form in page_manager/page_manager.admin.inc
Provide a simple form for saving the page manager info out of the cache.

File

page_manager/page_manager.admin.inc, line 1286
Administrative functions for the page manager.

Code

function page_manager_save_page_form_cancel($form, &$form_state) {
  drupal_set_message(t('All pending changes have been discarded, and the page is now unlocked.'));
  page_manager_clear_page_cache($form_state['page']->task_name);
  if (!empty($form_state['page']->new)) {
    $form_state['redirect'] = 'admin/structure/pages';
  }
}