From efae4a62acc0e073c06ee02bfdb7a33b28a1f8ad Mon Sep 17 00:00:00 2001
From: Alex Pott <alex.a.pott@googlemail.com>
Date: Tue, 22 Sep 2020 21:42:37 +0100
Subject: [PATCH] Issue #2678510 by larowlan, quietone, ankithashetty,
 samiullah, alexpott: Remove @todos from migrate credentials form

(cherry picked from commit a5ef3af6af39e9d0b3355886628cacb0e2f115fe)
---
 .../migrate_drupal_ui/src/Form/CredentialForm.php    | 12 +++---------
 1 file changed, 3 insertions(+), 9 deletions(-)

diff --git a/core/modules/migrate_drupal_ui/src/Form/CredentialForm.php b/core/modules/migrate_drupal_ui/src/Form/CredentialForm.php
index 75ebeb1dfb27..4e8d621fe89e 100644
--- a/core/modules/migrate_drupal_ui/src/Form/CredentialForm.php
+++ b/core/modules/migrate_drupal_ui/src/Form/CredentialForm.php
@@ -90,11 +90,6 @@ public function buildForm(array $form, FormStateInterface $form_state) {
 
     $drivers = $this->getDatabaseTypes();
     $drivers_keys = array_keys($drivers);
-    // @todo https://www.drupal.org/node/2678510 Because this is a multi-step
-    //   form, the form is not rebuilt during submission. Ideally we would get
-    //   the chosen driver from form input, if available, in order to use
-    //   #limit_validation_errors in the same way
-    //   \Drupal\Core\Installer\Form\SiteSettingsForm does.
     $default_driver = current($drivers_keys);
 
     $default_options = [];
@@ -136,10 +131,9 @@ public function buildForm(array $form, FormStateInterface $form_state) {
       $form['database']['settings'][$key] = $driver->getFormOptions($default_options);
       unset($form['database']['settings'][$key]['advanced_options']['prefix']['#description']);
 
-      // @todo https://www.drupal.org/node/2678510 Using
-      //   #limit_validation_errors in the submit does not work so it is not
-      //   possible to require the database and username for mysql and pgsql.
-      //   This is because this is a multi-step form.
+      // This is a multi-step form and is not rebuilt during submission so
+      // #limit_validation_errors is not used. The database and username fields
+      // for mysql and pgsql must not be required.
       $form['database']['settings'][$key]['database']['#required'] = FALSE;
       $form['database']['settings'][$key]['username']['#required'] = FALSE;
       $form['database']['settings'][$key]['#prefix'] = '<h2 class="js-hide">' . $this->t('@driver_name settings', ['@driver_name' => $driver->name()]) . '</h2>';
-- 
GitLab