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

Issue #2821774 by tim.plunkett: MigrateUpgradeForm incorrectly using form...

Issue #2821774 by tim.plunkett: MigrateUpgradeForm incorrectly using form values for multistep management
parent e0463d0e
No related branches found
No related tags found
2 merge requests!7452Issue #1797438. HTML5 validation is preventing form submit and not fully...,!789Issue #3210310: Adjust Database API to remove deprecated Drupal 9 code in Drupal 10
...@@ -690,7 +690,7 @@ public function getFormId() { ...@@ -690,7 +690,7 @@ public function getFormId() {
* {@inheritdoc} * {@inheritdoc}
*/ */
public function buildForm(array $form, FormStateInterface $form_state) { public function buildForm(array $form, FormStateInterface $form_state) {
$step = $form_state->getValue('step', 'overview'); $step = $form_state->get('step') ?: 'overview';
switch ($step) { switch ($step) {
case 'overview': case 'overview':
return $this->buildOverviewForm($form, $form_state); return $this->buildOverviewForm($form, $form_state);
...@@ -788,7 +788,7 @@ public function buildOverviewForm(array $form, FormStateInterface $form_state) { ...@@ -788,7 +788,7 @@ public function buildOverviewForm(array $form, FormStateInterface $form_state) {
* The current state of the form. * The current state of the form.
*/ */
public function submitOverviewForm(array &$form, FormStateInterface $form_state) { public function submitOverviewForm(array &$form, FormStateInterface $form_state) {
$form_state->setValue('step', 'credentials'); $form_state->set('step', 'credentials');
$form_state->setRebuild(); $form_state->setRebuild();
} }
...@@ -977,7 +977,7 @@ public function validateCredentialForm(array &$form, FormStateInterface $form_st ...@@ -977,7 +977,7 @@ public function validateCredentialForm(array &$form, FormStateInterface $form_st
*/ */
public function submitCredentialForm(array &$form, FormStateInterface $form_state) { public function submitCredentialForm(array &$form, FormStateInterface $form_state) {
// Indicate the next step is confirmation. // Indicate the next step is confirmation.
$form_state->setValue('step', 'confirm'); $form_state->set('step', 'confirm');
$form_state->setRebuild(); $form_state->setRebuild();
} }
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment