diff --git a/migrate/hosting_migrate.batch.inc b/migrate/hosting_migrate.batch.inc index d8ba967..4243206 100644 --- a/migrate/hosting_migrate.batch.inc +++ b/migrate/hosting_migrate.batch.inc @@ -105,6 +105,21 @@ function hosting_migrate_platform($form, $form_state, $node) { $link = t('Profile not found'); } $row[] = $link; + if ($type == 'passed') { + $header[] = t('Confirm'); + + // Add checkboxes for opt-out. + // TODO converting the whole table to 'tableselect' might also be an option. + // See: https://api.drupal.org/api/drupal/developer%21topics%21forms_api_reference.html/7.x#tableselect + $row[] = theme('checkbox', array( + // TODO FIX array structure. + '#type' => 'checkbox', + '#name' => 'do' . $site_id, + '#checked' => TRUE, + '#return_value' => $site_id, + )); + } + $rows[] = array( 'data' => $row, 'class' => array('hosting-' . _hosting_migrate_site_list_class($status)), @@ -198,6 +213,9 @@ function hosting_migrate_platform_submit($form, &$form_state) { $operations = array(); foreach ($form_state['storage']['passed'] as $nid => $url) { + // + // TODO check checkbox value and 'continue' if unchecked. + // $operations[] = array( 'hosting_migrate_platform_submit_batch', array($nid, $target_platform, $url, $task->vid, $target_db),