Skip to content
Snippets Groups Projects
Unverified Commit efae4a62 authored by Alex Pott's avatar Alex Pott
Browse files

Issue #2678510 by larowlan, quietone, ankithashetty, samiullah, alexpott:...

Issue #2678510 by larowlan, quietone, ankithashetty, samiullah, alexpott: Remove @todos from migrate credentials form

(cherry picked from commit a5ef3af6)
parent 019df6c3
Branches
Tags
No related merge requests found
...@@ -90,11 +90,6 @@ public function buildForm(array $form, FormStateInterface $form_state) { ...@@ -90,11 +90,6 @@ public function buildForm(array $form, FormStateInterface $form_state) {
$drivers = $this->getDatabaseTypes(); $drivers = $this->getDatabaseTypes();
$drivers_keys = array_keys($drivers); $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_driver = current($drivers_keys);
$default_options = []; $default_options = [];
...@@ -136,10 +131,9 @@ public function buildForm(array $form, FormStateInterface $form_state) { ...@@ -136,10 +131,9 @@ public function buildForm(array $form, FormStateInterface $form_state) {
$form['database']['settings'][$key] = $driver->getFormOptions($default_options); $form['database']['settings'][$key] = $driver->getFormOptions($default_options);
unset($form['database']['settings'][$key]['advanced_options']['prefix']['#description']); unset($form['database']['settings'][$key]['advanced_options']['prefix']['#description']);
// @todo https://www.drupal.org/node/2678510 Using // This is a multi-step form and is not rebuilt during submission so
// #limit_validation_errors in the submit does not work so it is not // #limit_validation_errors is not used. The database and username fields
// possible to require the database and username for mysql and pgsql. // for mysql and pgsql must not be required.
// This is because this is a multi-step form.
$form['database']['settings'][$key]['database']['#required'] = FALSE; $form['database']['settings'][$key]['database']['#required'] = FALSE;
$form['database']['settings'][$key]['username']['#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>'; $form['database']['settings'][$key]['#prefix'] = '<h2 class="js-hide">' . $this->t('@driver_name settings', ['@driver_name' => $driver->name()]) . '</h2>';
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment