diff --git a/docs/issues-plans/issue-79-contact-page.md b/docs/issues-plans/issue-79-contact-page.md index 74457fa..030f5dc 100644 --- a/docs/issues-plans/issue-79-contact-page.md +++ b/docs/issues-plans/issue-79-contact-page.md @@ -2,8 +2,8 @@ issue: 79 title: "[Theme + Form API] Contact page — Twig template, CSS layout and Drupal form integration" branch: feat/contact-page-79-twig-template-css-layout-and-drupal-form-integration -status: in-progress -last_updated: 04-20-2026 +status: closed +last_updated: 05-07-2026 --- # Issue #79 — [Theme + Form API] Contact page — Twig template, CSS layout and Drupal form integration @@ -26,7 +26,7 @@ Implement the Waggy Contact page at /contact by creating a custom Twig template - [x] contact-message-form.html.twig criado - [x] CSS do layout de contato aplicado (desktop, tablet, mobile) - [x] Biblioteca registrada em libraries.yml e anexada via template -- [ ] Envio validado no Mailpit +- [x] Envio validado no Mailpit ## Notes - Template suggestions: contact-site-page.html.twig > contact-message-form.html.twig diff --git a/web/themes/custom/doljak_theme/doljak_theme.theme b/web/themes/custom/doljak_theme/doljak_theme.theme index 02e669e..ac85b2c 100644 --- a/web/themes/custom/doljak_theme/doljak_theme.theme +++ b/web/themes/custom/doljak_theme/doljak_theme.theme @@ -148,7 +148,12 @@ function _doljak_theme_preprocess_footer(array &$variables): void { */ function doljak_theme_preprocess_contact_message_form(array &$variables): void { $form = $variables['form']; - $variables['attributes'] = new Attribute($form['#attributes'] ?? []); + $attributes = new Attribute($form['#attributes'] ?? []); + if (!empty($form['#action'])) { + $attributes->setAttribute('action', $form['#action']); + } + $attributes->setAttribute('method', $form['#method'] ?? 'post'); + $variables['attributes'] = $attributes; $variables['contact_form_title'] = $form['#title'] ?? t('Contact'); }