function hosting_task_restore_form in Hosting 6.2
Same name and namespace in other branches
- 5 task/hosting_task.module \hosting_task_restore_form()
- 7.4 task/hosting_task.module \hosting_task_restore_form()
- 7.3 task/hosting_task.module \hosting_task_restore_form()
Customize the task confirmation form for restore.
This adds the backup listing to the confirmation dialog.
File
- task/
hosting_task.module, line 451 - Web server node type is defined here.
Code
function hosting_task_restore_form($node) {
$list = hosting_site_backup_list($node->nid);
if (sizeof($list)) {
$form['bid'] = array(
'#type' => 'radios',
'#title' => t('Backups'),
'#options' => $list,
'#required' => TRUE,
);
}
else {
$form['no_backups'] = array(
'#type' => 'item',
'#title' => t('Backups'),
'#value' => t('There are no valid backups available.'),
);
}
return $form;
}