Commit Graph

17 Commits

Author SHA1 Message Date
1b41b72a3d feat(contact-form): implement modal contact form with AJAX submission
Replace mailto link with modal popup containing Formidable job application form. Modal stays open after submission to show success message.

Changes:
- Add modal popup with contact form on job detail pages
- Implement AJAX form submission to prevent page reload
- Auto-populate job_id field when modal opens
- Add field key compatibility for both job_id and job_id2
- Fix form ID comparison to use loose equality
- Keep modal open after submission to display success message
- Add modal styling and close functionality

Co-Authored-By: Claude Sonnet 4.5 <noreply@anthropic.com>
2026-01-17 22:56:57 +09:00
0c9ebb9e89 fix(07-01): fix job type dropdown not pre-populating on edit
Improved JavaScript to use case-insensitive matching for select fields, so 'vollzeit' matches 'Vollzeit'. Also normalized all job_type values to lowercase when saving to ensure consistency.

Co-Authored-By: Claude Sonnet 4.5 <noreply@anthropic.com>
2026-01-17 21:27:49 +09:00
737f3d6fe9 feat(07-01): implement complete job management workflow
Adds comprehensive job submission, editing, and deactivation functionality with proper form handling and permissions. Includes administrator capabilities for job_offer management and fixed dashboard navigation.

Co-Authored-By: Claude Sonnet 4.5 <noreply@anthropic.com>
2026-01-17 19:49:21 +09:00
969a7bad74 fix(07-01): prevent multiple redirect triggers causing server crash
- Added ddhhRedirectTriggered flag to ensure only one redirect
- Clear interval immediately when success message detected
- Removed MutationObserver which was causing duplicate events
- Simplified JavaScript to single interval-based check
2026-01-15 20:13:08 +09:00
7009d4c621 fix(07-01): use DOM monitoring for registration redirect
- Changed from event listener to MutationObserver
- Watches for success message text to appear in form
- Monitors form DOM for changes and redirects when success appears
- More reliable than waiting for custom events
2026-01-14 22:12:25 +09:00
36d0f0b2ef fix(07-01): add JavaScript redirect for registration form
- Added add_registration_redirect_script() method
- Listens for frmFormComplete event on registration form
- Redirects to /anbieter-dashboard/ after 1.5s delay
- Shows success message before redirect
- Replaces non-working frm_json_response filter approach
2026-01-14 22:08:44 +09:00
00cabcc178 fix(07-01): add filter to set redirect URL in registration form response
- Added set_registration_redirect() filter on frm_json_response
- Modifies Formidable's JSON response to include redirect_url
- Formidable JavaScript will then redirect to /anbieter-dashboard/
- Fixes registration redirect issue
2026-01-14 22:04:40 +09:00
d838b72ed8 fix(07-01): add redirect URL to registration form
- Registration form now redirects to /anbieter-dashboard/ after successful submission
- Configured via form options redirect_url setting
- Fixes missing redirect after registration
2026-01-14 22:01:32 +09:00
25666a2509 debug(07-01): add detailed field value logging to registration 2026-01-14 21:58:21 +09:00
d6304d934a fix(07-01): use loose comparison for form ID check in registration handler
- Changed !== to != to allow type coercion
- Fixes registration not working due to string vs int comparison
- Added type debugging to help diagnose similar issues
2026-01-14 21:55:15 +09:00
7286133bf4 debug(07-01): add debug logging to registration handler 2026-01-14 21:40:35 +09:00
a00e28702f fix(07-01): replace deprecated FrmFormAction static calls with FrmFormActionsController
- Changed FrmFormAction::create() to FrmFormActionsController::create_action()
- Updated class_exists checks to use FrmFormActionsController
- Fixes fatal error on plugin activation with modern Formidable Forms
- Discovered during provider flow testing (Plan 07-01)

Co-Authored-By: Claude Sonnet 4.5 <noreply@anthropic.com>
2026-01-14 21:26:59 +09:00
061a41033d feat(05-02): create job application form in Formidable class
Add create_job_application_form() method with 4 fields:
- applicant_name (text, required)
- applicant_email (email, required, pre-filled for logged-in users)
- applicant_message (textarea, required)
- job_id (hidden)

Form title: "Jetzt bewerben"
Submit button: "Bewerbung absenden"
Success message: "Ihre Bewerbung wurde versendet. Der Anbieter wird sich bei Ihnen melden."

Added get_job_application_form_id() helper method
Registered form creation in setup_registration_hooks()

Co-Authored-By: Claude Sonnet 4.5 <noreply@anthropic.com>
2026-01-14 20:29:39 +09:00
e29a3e507f feat(04-01): create job deactivation form with reason field
Add create_job_deactivation_form() method following established pattern from create_job_edit_form(). Form includes deactivation_reason textarea (required, German label) and hidden job_id field. Configure Update Post action to set post_status='draft' removing job from public view. Map deactivation_reason to ACF meta field 'job_deactivation_reason'. Add ownership validation hook validate_job_deactivation_ownership() following same pattern as validate_job_ownership() to prevent URL tampering. Submit button: "Stellenangebot deaktivieren". Success message: "Ihr Stellenangebot wurde deaktiviert." Redirect to /anbieter-dashboard/. Add get_job_deactivation_form_id() helper following established pattern.

Co-Authored-By: Claude Sonnet 4.5 <noreply@anthropic.com>
2026-01-14 20:02:23 +09:00
a4e2fbfe17 feat(03-02): create job edit form with ownership validation
- Add create_job_edit_form() method to programmatically create edit form
- Form uses 'job_edit' key and matches submission form fields exactly
- Configure Update Post action to update existing job_offer posts
- Add validate_job_ownership() method with frm_validate_entry hook
- Security: Validates job_id parameter, post_type, and post_author match
- Prevents URL parameter tampering by malicious providers
- Add get_job_edit_form_id() helper method
- Form pre-populates from post ID via URL parameter

Co-Authored-By: Claude Sonnet 4.5 <noreply@anthropic.com>
2026-01-14 19:44:29 +09:00
650c7b05cd feat(03-01): add job submission form creation
- Add create_job_submission_form() method to DDHH_JM_Formidable class
- Create Formidable form with key 'job_submission'
- Add 7 fields with German labels: title, description, location, type, deadline, email, logo
- Configure Create Post action: post_type='job_offer', status='pending'
- Map form fields to ACF fields: job_location, job_type, job_deadline, job_contact_email, job_logo
- Add get_job_submission_form_id() helper method
- Hook form creation into init action

Co-Authored-By: Claude Sonnet 4.5 <noreply@anthropic.com>
2026-01-14 19:40:56 +09:00
39afa95114 feat(02-01): create Formidable registration form with auto-login
- Created DDHH_JM_Formidable class with registration form setup
- Programmatic form creation with 5 German-labeled fields
- Email uniqueness validation enforced
- Auto-login after successful registration
- ddhh_provider role assignment on user creation
- Organization name stored as user meta (ddhh_org_name)
- Duplicate submission prevention via email_exists() check
- Password validation (min 8 chars, confirmation match)
- Username generation from email prefix with uniqueness check

Co-Authored-By: Claude Sonnet 4.5 <noreply@anthropic.com>
2026-01-14 19:19:02 +09:00