---
phase: 02-provider-registration-auth
plan: 02
type: execute
depends_on: ["02-01"]
files_modified: [includes/class-pages.php]
---
Create combined login/registration page with Formidable shortcodes.
Purpose: Provide single entry point for providers to register or log in.
Output: WordPress page with registration form and login form in tabbed or stacked view.
~/.claude/get-shit-done/workflows/execute-plan.md
./summary.md
@.planning/PROJECT.md
@.planning/ROADMAP.md
@.planning/phases/02-provider-registration-auth/02-01-SUMMARY.md
**From 02-01:**
- Registration form exists with ID accessible via DDHH_JM_Formidable::get_registration_form_id()
- Form creates users with ddhh_provider role and auto-logs in
**Requirements:**
- German UI (v1)
- Combined login/registration view
- Match existing Elementor site style
Task 1: Create login/registration page
includes/class-pages.php
Create `includes/class-pages.php` with static method create_provider_pages():
Use wp_insert_post() to create page "Anbieter Login":
- post_title: 'Anbieter Login'
- post_name: 'anbieter-login'
- post_status: 'publish'
- post_type: 'page'
- post_content: Two-section layout with:
1. Registration section with heading "Neu registrieren" and Formidable shortcode [formidable id={registration_form_id}]
2. Login section with heading "Bereits registriert?" and WordPress default login form wp_login_form()
Store page ID in option 'ddhh_jm_login_page_id' for later reference.
Hook create_provider_pages() to plugin activation (call in Activator class).
Check if page already exists (by post_name) before creating to avoid duplicates on re-activation.
DO NOT create separate pages for login vs registration - combine in one page per PROJECT.md.
Page "Anbieter Login" exists at /anbieter-login/, displays registration form and login form
Page created, accessible, shows both registration and login forms, German headings
Task 2: Style combined view for consistency
includes/class-pages.php
Add basic styling to make login/registration sections visually distinct:
In post_content, wrap sections in div.ddhh-auth-container with:
- Registration section: div.ddhh-register-section
- Login section: div.ddhh-login-section
Add simple CSS (inline in page or via enqueued stylesheet):
- Two-column layout on desktop (50/50 split)
- Stacked on mobile
- Visual separator (border or background color difference)
- Headings styled consistently
Match Elementor site colors if possible (check if theme provides CSS variables).
DO NOT over-style - keep it minimal and functional for now. Phase 7 will polish UI.
Page displays cleanly on desktop (side-by-side) and mobile (stacked), forms readable and usable
Combined view styled, responsive, visually clear separation between register and login sections
Before declaring plan complete:
- [ ] Page "Anbieter Login" exists and is published
- [ ] Registration form displays via shortcode
- [ ] Login form displays via wp_login_form()
- [ ] Layout responsive (desktop: side-by-side, mobile: stacked)
- [ ] German headings used
- [ ] Page accessible at /anbieter-login/
- All tasks completed
- Combined login/registration page functional
- Both forms display and work
- Responsive layout
- Ready for Phase 3 (job submission forms)