mirror of
https://github.com/nextcloud/all-in-one.git
synced 2026-09-19 01:37:24 +00:00
feat(desec): run registration flow in a modal iframe
Move the deSEC "register a free domain" flow out of the inline containers page form and into a modal backed by a dedicated /desec view loaded in an iframe. The multi-step register -> verify -> domain process now re-renders inside the modal, so the user can adjust the details and complete email verification without reloading the whole page each step. Only once the domain is fully registered does the view reload the parent containers page. - add /desec route + desec.twig standalone view - add desec-modal.js (open/close, backdrop + Escape) and desec-done.js (parent reload on completion) - redirect register POST to the /desec view so steps stay in the modal - drop the redundant <details> wrapper in desec-register.twig, add heading - style the modal and let <button class="button"> pick up button styles - drive the modal iframe in the Playwright specs and update the QA checklist Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com> Signed-off-by: Simon L. <szaimen@e.mail.de>
This commit is contained in:
co-authored by
Claude Opus 4.8
parent
164b150817
commit
454905c852
@@ -19,11 +19,14 @@ readonly class DesecController {
|
||||
$slug = (string)($request->getParsedBody()['desec_slug'] ?? '');
|
||||
$password = (string)($request->getParsedBody()['desec_password'] ?? '');
|
||||
// register() returns false when a new account was created and we are now awaiting
|
||||
// the user's email verification. That is a normal state transition, not an error:
|
||||
// reload the page (201 + Location) so the awaiting-verification UI renders and
|
||||
// explains the next step, exactly like the fully-registered success path.
|
||||
// the user's email verification. That is a normal state transition, not an error.
|
||||
// The form is submitted from the /desec modal view (an iframe), so redirect back to
|
||||
// that same view (201 + Location): the iframe re-renders the next step of the flow
|
||||
// (awaiting verification, or the fully-registered success page, which then reloads
|
||||
// the parent containers page). Re-rendering /desec — rather than the whole
|
||||
// containers page — is what keeps the multi-step flow inside the modal.
|
||||
$this->desecManager->register($email, $slug, $password);
|
||||
return $response->withStatus(201)->withHeader('Location', '.');
|
||||
return $response->withStatus(201)->withHeader('Location', 'desec');
|
||||
} catch (\Exception $ex) {
|
||||
$response->getBody()->write($ex->getMessage());
|
||||
return $response->withStatus(422);
|
||||
|
||||
Reference in New Issue
Block a user