diff --git a/config/areas/system/dialogs.php b/config/areas/system/dialogs.php index e35fbff7a0..2de6361aba 100644 --- a/config/areas/system/dialogs.php +++ b/config/areas/system/dialogs.php @@ -8,7 +8,7 @@ return [ // license key 'license' => [ - 'load' => function () { + 'load' => $licenseDialog = function () { $kirby = App::instance(); $license = $kirby->system()->license(); $obfuscated = $kirby->user()->isAdmin() === false; @@ -95,7 +95,7 @@ ] ]; }, - 'submit' => function () { + 'submit' => function () use ($licenseDialog) { // @codeCoverageIgnoreStart $kirby = App::instance(); $kirby->system()->register( @@ -103,6 +103,10 @@ $kirby->request()->get('email') ); + if ($kirby->system()->license()->isLegacy() === true) { + return $licenseDialog(); + } + return [ 'event' => 'system.register', 'message' => I18n::translate('license.success')