You are here

function demo_reset_confirm in Demonstration site (Sandbox / Snapshot) 7

Same name and namespace in other branches
  1. 5 demo.admin.inc \demo_reset_confirm()
  2. 6 demo.admin.inc \demo_reset_confirm()

Form builder to reset site to a snapshot.

1 string reference to 'demo_reset_confirm'
demo_menu in ./demo.module
Implements hook_menu().

File

./demo.admin.inc, line 243
Demonstration Site administrative pages.

Code

function demo_reset_confirm($form, &$form_state) {
  $form['dump'] = demo_get_dumps();
  $form['warning'] = array(
    '#type' => 'container',
    '#attributes' => array(
      'class' => array(
        'messages',
        'warning',
      ),
    ),
  );
  $form['warning']['message'] = array(
    '#markup' => t('This action cannot be undone.'),
  );
  return confirm_form($form, t('Are you sure you want to reset the site?'), 'admin/structure/demo', t('Overwrites all changes that made to this site since the chosen snapshot.'), t('Reset'));
}