1 backup_test.module | backup_test_settings_form(array $form, array &$form_state) |
Form that contains Backup form capabilities.
File
- core/
modules/ simpletest/ tests/ backup_test/ backup_test.module, line 28 - Test module for verifying backup capabilities.
Code
function backup_test_settings_form(array $form, array &$form_state) {
include_once BACKDROP_ROOT . '/core/includes/backup.inc';
// Add in the Backup settings form, with settings.
$form = backup_settings_form($form, $form_state, array(
'show_settings' => TRUE,
'show_default_targets' => TRUE,
));
$form['options']['name'] = array(
'#type' => 'textfield',
'#title' => t('Backup name'),
'#description' => t('May include only letters, numbers, underscores and dashes.'),
);
$form['options']['label'] = array(
'#type' => 'textfield',
'#title' => t('Backup label'),
);
$form['options']['description'] = array(
'#type' => 'textfield',
'#title' => t('Description'),
);
// Add our additional submit handler and the one provided by backup.inc.
$form['#submit'] = array('backup_settings_form_submit');
return $form;
}