Phase 3: Job Management Core - 4 plans created - 8 total tasks defined - Ready for execution Plans: - 03-01: Job submission form (Formidable + ACF) - 03-02: Job edit form with ownership validation - 03-03: Admin email notification on submission - 03-04: Admin moderation UI enhancements Parallelization: - Wave 1: 03-01, 03-02, 03-04 (independent) - Wave 2: 03-03 (depends on 03-01)
7.2 KiB
phase, plan, type, depends_on, files_modified
| phase | plan | type | depends_on | files_modified | |
|---|---|---|---|---|---|
| 03-job-management-core | 01 | execute |
|
Purpose: Enable providers to submit job listings through a frontend form. All submissions go to pending status for admin approval (core value: moderation before publication). Output: Functional job submission form accessible to logged-in providers, creating job_offer posts with ACF fields populated.
<execution_context> ~/.claude/get-shit-done/workflows/execute-plan.md ~/.claude/get-shit-done/templates/summary.md </execution_context>
@.planning/PROJECT.md @.planning/ROADMAP.md @.planning/STATE.md @.planning/phases/01-foundation-setup/01-03-SUMMARY.md @.planning/phases/02-provider-registration-auth/02-01-SUMMARY.md @includes/class-formidable.php @includes/class-acf-fields.php @includes/class-post-types.phpTech stack available: Formidable Forms Pro (with Post Creation), ACF Pro, job_offer CPT Established patterns: Programmatic Formidable form creation (from 02-01) Constraining decisions:
- Jobs must submit to pending status (Phase 01-03)
- German labels for all form fields (PROJECT.md)
- ACF fields: job_location, job_type, job_deadline, job_contact_email, job_logo (Phase 01-03)
- Form key pattern for easy retrieval (established in 02-01)
Form Fields (all German labels):
- job_title (text, required) - "Stellentitel"
- job_description (textarea, required) - "Stellenbeschreibung"
- job_location (text, required) - "Standort"
- job_type (select, required) - "Art" with choices: Vollzeit, Teilzeit, Ehrenamt
- job_deadline (date, optional) - "Bewerbungsfrist" (format: d.m.Y)
- job_contact_email (email, required) - "Kontakt-E-Mail"
- job_logo (file upload, optional) - "Logo" (accept: image/jpeg, image/png, max: 2MB)
Form Actions:
- Create Post action configured to:
- Post type: 'job_offer'
- Post status: 'pending' (CRITICAL - enforces admin approval)
- Post title: mapped to job_title field
- Post content: mapped to job_description field
- Post author: current logged-in user (providers own their jobs)
- Custom field mappings to ACF fields:
- job_location → meta:job_location
- job_type → meta:job_type
- job_deadline → meta:job_deadline
- job_contact_email → meta:job_contact_email
- job_logo → meta:job_logo (as attachment ID)
Form Settings:
- Submit button text: "Stellenangebot einreichen"
- Success message: "Ihr Stellenangebot wurde zur Prüfung eingereicht!"
- Success action: Redirect to provider dashboard (/anbieter-dashboard/)
- Form description: "Alle Felder mit * sind Pflichtfelder. Ihr Angebot wird vor Veröffentlichung geprüft."
Add get_job_submission_form_id() helper method similar to get_registration_form_id().
Hook form creation into existing setup_registration_hooks() or create separate setup_job_forms_hooks() if cleaner.
AVOID creating duplicate forms - check if form with key 'job_submission' exists before creating. WHY: Prevents multiple identical forms in Formidable admin on plugin re-activation.
- Check form exists: In WP-Admin → Formidable → Forms, verify form titled "Stellenangebot einreichen" exists
- Check field count: Form should have 7 fields total
- Check form action: Form should have "Create Post" action set to post_type='job_offer', status='pending'
- PHP syntax: php -l includes/class-formidable.php (no errors)
- Formidable form created programmatically with key 'job_submission'
- All 7 fields present with German labels
- Create Post action configured with pending status
- ACF field mappings complete
- No PHP syntax errors
Structure:
<div class="ddhh-job-submit-section">
<h2>Neues Stellenangebot erstellen</h2>
<?php
$form_id = DDHH_JM_Formidable::get_job_submission_form_id();
if ( $form_id ) {
echo do_shortcode( "[formidable id={$form_id}]" );
} else {
echo '<p>Formular konnte nicht geladen werden.</p>';
}
?>
</div>
<div class="ddhh-job-listings-section">
<h2>Meine Stellenangebote</h2>
<!-- existing job listings table -->
</div>
Styling (add to existing <style> block):
- .ddhh-job-submit-section: margin-bottom: 3rem, padding: 2rem, background: #f5f5f5, border-radius: 8px
- Form should be visually distinct from job listings table
AVOID adding shortcode if form doesn't exist - check $form_id first. WHY: Prevents errors if Formidable Forms is deactivated.
- Template file updated with submission form section
- Form appears above job listings table
- Visual separation between form and listings
- php -l templates/provider-dashboard.php (no errors)
- Dashboard template includes job submission form
- Form section visually separated from listings
- Graceful fallback if form doesn't exist
- No PHP syntax errors
<success_criteria>
- All tasks completed
- Job submission form functional
- Form creates job_offer posts with pending status
- ACF fields populated from form submission
- Form accessible on provider dashboard
- Ready for Plan 03-02 (edit form) </success_criteria>
phase: 03-job-management-core plan: 01 subsystem: job-submission tags: [formidable, job-creation, post-creation, acf-mapping] requires: [01-03, 02-01] provides: [job-submission-form] affects: [03-03] tech-stack: added: [formidable-post-creation] patterns: [post-creation-action, acf-field-mapping] key-files: modified: [includes/class-formidable.php, templates/provider-dashboard.php] key-decisions: [] issues-created: []
Phase 3 Plan 1: Job Submission Form Summary
[Substantive one-liner - what shipped]
Accomplishments
- [Key outcomes]
Files Created/Modified
includes/class-formidable.php- [description]templates/provider-dashboard.php- [description]
Technical Details
[Form structure, field mappings, post creation action configuration]
Decisions Made
[Any implementation choices, or "None"]
Issues Encountered
[Problems and resolutions, or "None"]
Next Step
Ready for 03-02-PLAN.md (job edit form)