You are here

function hosting_task_backup_delete_form in Hosting 6.2

Same name and namespace in other branches
  1. 7.4 site/hosting_site.backups.inc \hosting_task_backup_delete_form()
  2. 7.3 site/hosting_site.backups.inc \hosting_task_backup_delete_form()

Implements hosting_task_TASK_TYPE_form().

File

site/hosting_site.backups.inc, line 77
Site backup functions.

Code

function hosting_task_backup_delete_form($node) {
  $list = hosting_site_backup_list($node->nid);
  if (sizeof($list)) {
    foreach ($list as $bid => $info) {
      $backup = hosting_site_get_backup($bid);
      $form[$bid] = array(
        '#type' => 'checkbox',
        '#title' => $info,
        '#return_value' => $backup['filename'],
      );
    }
  }
  else {
    $form['no_backups'] = array(
      '#type' => 'item',
      '#title' => t('Backups'),
      '#value' => t('There are no valid backups available.'),
    );
  }
  return $form;
}