Issue #2821774 by tim.plunkett: MigrateUpgradeForm incorrectly using form values for multistep management

8.3.x
Alex Pott 2016-10-25 12:09:20 -07:00
parent e0463d0ee4
commit a63e8413af
1 changed files with 3 additions and 3 deletions

View File

@ -690,7 +690,7 @@ class MigrateUpgradeForm extends ConfirmFormBase {
* {@inheritdoc}
*/
public function buildForm(array $form, FormStateInterface $form_state) {
$step = $form_state->getValue('step', 'overview');
$step = $form_state->get('step') ?: 'overview';
switch ($step) {
case 'overview':
return $this->buildOverviewForm($form, $form_state);
@ -788,7 +788,7 @@ class MigrateUpgradeForm extends ConfirmFormBase {
* The current state of the form.
*/
public function submitOverviewForm(array &$form, FormStateInterface $form_state) {
$form_state->setValue('step', 'credentials');
$form_state->set('step', 'credentials');
$form_state->setRebuild();
}
@ -977,7 +977,7 @@ class MigrateUpgradeForm extends ConfirmFormBase {
*/
public function submitCredentialForm(array &$form, FormStateInterface $form_state) {
// Indicate the next step is confirmation.
$form_state->setValue('step', 'confirm');
$form_state->set('step', 'confirm');
$form_state->setRebuild();
}