Skip to content

feat: connect auth forms templates to Drupal User module - #96

Merged
doljak merged 3 commits into
mainfrom
feat/auth-forms-86-connect-static-templates-drupal-user-module
May 18, 2026
Merged

doljak merged 3 commits into
mainfrom
feat/auth-forms-86-connect-static-templates-drupal-user-module

Conversation

@doljak

@doljak doljak commented May 18, 2026 •

Copy link
Copy Markdown
Contributor

What changed

First commit:

  • Templates renamed from templates/user/user-*.html.twig to templates/form--user-*.html.twig — correct convention for Drupal to discover them via hook_theme_suggestions_form_alter
  • doljak_theme.theme: added hook_theme_suggestions_form_alter and hook_form_alter for all 3 auth forms
  • Templates rewritten with correct element.field_name per form — real Drupal User module fields rendered inside the existing static markup
  • development.services.yml: Twig debug enabled for local development

Second commit:

  • Added missing <form{{ attributes }}> wrapper to all 3 templates — without it the forms rendered correctly but could not submit
  • Functional validation complete: login, password reset and registration all tested with invalid and valid data

What to verify

  • Login (/user/login): error on invalid credentials, redirect on valid login
  • Password reset (/user/password): confirmation message on valid username/email
  • Registration (/user/register): account creation with valid data

Closes #86

@doljak
doljak merged commit 5c8ecb7 into main May 18, 2026
2 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[Back-End] Auth Forms — connect static templates to Drupal User module

1 participant