function demo_dump in Demonstration site (Sandbox / Snapshot) 5
Same name and namespace in other branches
- 6 demo.module \demo_dump()
- 7 demo.module \demo_dump()
1 string reference to 'demo_dump'
- demo_menu in ./
demo.module - Implementation of hook_menu().
File
- ./
demo.admin.inc, line 128 - Demonstration Site administrative pages
Code
function demo_dump() {
$form = array();
$form['dump']['filename'] = array(
'#title' => t('File name'),
'#type' => 'textfield',
'#autocomplete_path' => 'demo/autocomplete',
'#required' => TRUE,
'#maxlength' => 128,
'#description' => t('Enter the snapshot file name without file extension. Allowed characters are a-z, 0-9, dashes ("-"), underscores ("_") and dots.'),
);
$form['dump']['default'] = array(
'#title' => t('Set as new default snapshot'),
'#type' => 'checkbox',
);
$form['dump']['description'] = array(
'#title' => t('Description'),
'#type' => 'textarea',
'#rows' => 2,
'#description' => t('Optionally enter a description for this snapshot here. If no description is given and a snapshot with the same filename already exists, the previous description is used.'),
);
return confirm_form($form, t('Are you sure you want to create a new snapshot?'), 'admin/build/demo', t('If the above filename already exists, creating a new snapshot will overwrite the existing snapshot. This action cannot be undone.'), t('Create'), t('Cancel'));
}