function demo_reset_block_form in Demonstration site (Sandbox / Snapshot) 6
Same name and namespace in other branches
- 7 demo_reset/demo_reset.module \demo_reset_block_form()
Form builder to reset site to configured snapshot.
No access permission check or any condition here. By design.
1 string reference to 'demo_reset_block_form'
- demo_reset_block_view in ./
demo_reset.module - Implements hook_block_view().
File
- ./
demo_reset.module, line 140 - Demonstration site reset module.
Code
function demo_reset_block_form(&$form_state) {
$form['redirect'] = array(
'#type' => 'value',
'#value' => $_GET['q'],
);
$filename = variable_get('demo_dump_cron', 'demo_site');
$form['filename'] = array(
'#type' => 'value',
'#value' => $filename,
);
$form['snapshot'] = array(
'#value' => t('Active snapshot: @snapshot', array(
'@snapshot' => $filename,
)),
);
$form['submit'] = array(
'#type' => 'submit',
'#value' => t('Reset now'),
);
return $form;
}