function theme_backup_migrate_ui_manual_quick_backup_form_inline in Backup and Migrate 6.3
Same name and namespace in other branches
- 8.3 backup_migrate.module \theme_backup_migrate_ui_manual_quick_backup_form_inline()
- 7.3 backup_migrate.module \theme_backup_migrate_ui_manual_quick_backup_form_inline()
Theme the quick backup form.
File
- ./
backup_migrate.module, line 766 - Create (manually or scheduled) and restore backups of your Drupal MySQL database with an option to exclude table data (e.g. cache_*)
Code
function theme_backup_migrate_ui_manual_quick_backup_form_inline($form) {
drupal_add_css(drupal_get_path('module', 'backup_migrate') . '/backup_migrate.css');
// Remove the titles so that the pulldowns can be displayed inline.
unset($form['quickbackup']['source_id']['#title']);
unset($form['quickbackup']['destination']['destination_id']['#title']);
unset($form['quickbackup']['destination']['destination_id']['#description']);
unset($form['quickbackup']['profile_id']['#title']);
unset($form['quickbackup']['destination']['copy_destination']['copy_destination_id']['#title']);
$replacements = array(
'!from' => drupal_render($form['quickbackup']['source_id']),
'!to' => drupal_render($form['quickbackup']['destination']['destination_id']),
'!profile' => drupal_render($form['quickbackup']['profile_id']),
);
$form['quickbackup']['markup'] = array(
'#type' => 'markup',
"#prefix" => '<div class="container-inline backup-migrate-inline">',
"#suffix" => '</div>',
'#value' => t('Backup from !from to !to using !profile', $replacements),
);
$replacements = array(
'!to' => drupal_render($form['quickbackup']['destination']['copy_destination']['copy_destination_id']),
);
$form['quickbackup']['destination']['copy']["#prefix"] = '<div class="container-inline backup-migrate-inline">';
$form['quickbackup']['destination']['copy']["#suffix"] = $replacements['!to'] . '</div>';
// This is not good translation practice as it relies on the structure of english
// If I add the pulldown to the label, howerver, the box toggles when the pulldown is clicked.
//$form['quickbackup']['destination']['copy']['#title'] = t('Save a copy to');
unset($form['quickbackup']['source_id']);
unset($form['quickbackup']['destination']['destination_id']);
unset($form['quickbackup']['destination']['copy_destination']);
unset($form['quickbackup']['profile_id']);
//unset($form['quickbackup']['submit']);
return drupal_render($form);
}