From 491c4fb535e90064c8067eb4b5bd979af22264cf Mon Sep 17 00:00:00 2001 From: Viktor Miller Date: Wed, 14 Jan 2026 19:45:09 +0900 Subject: [PATCH] feat(03-02): integrate edit form into provider dashboard - Add edit mode detection via URL parameters (action=edit_job&job_id=X) - Display edit form when in edit mode, hide listings table - Update edit links in table to point to dashboard edit form - Add back navigation link to return to dashboard overview - Style edit section with card layout and back link - Form pre-populates with existing job data via id_param - Dashboard shows either edit form OR listings, not both Co-Authored-By: Claude Sonnet 4.5 --- templates/provider-dashboard.php | 59 ++++++++++++++++++++++++++++++-- 1 file changed, 57 insertions(+), 2 deletions(-) diff --git a/templates/provider-dashboard.php b/templates/provider-dashboard.php index d4c9c09..102bbd6 100644 --- a/templates/provider-dashboard.php +++ b/templates/provider-dashboard.php @@ -26,6 +26,27 @@ if ( ! in_array( 'ddhh_provider', $current_user->roles, true ) ) { return; } +// Check if we're in edit mode +$is_edit_mode = isset( $_GET['action'] ) && $_GET['action'] === 'edit_job' && isset( $_GET['job_id'] ); + +if ( $is_edit_mode ) { + $job_id = absint( $_GET['job_id'] ); + $form_id = DDHH_JM_Formidable::get_job_edit_form_id(); + + if ( $form_id ) { + ?> +
+
+

Stellenangebot bearbeiten

+

← Zurück zur Übersicht

+ +
+
+ 'job_offer', @@ -93,9 +114,16 @@ $job_query = new WP_Query( $args ); 'edit_job', + 'job_id' => $post_id, + ), + get_permalink() + ); + echo 'Bearbeiten'; } // View link - only for published posts @@ -139,6 +167,33 @@ $job_query = new WP_Query( $args ); color: #333; } +.ddhh-job-edit-section { + padding: 2rem; + background: #fff; + border-radius: 8px; + box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1); +} + +.ddhh-job-edit-section h2 { + margin-top: 0; + margin-bottom: 1rem; + font-size: 1.5rem; + color: #333; +} + +.back-to-dashboard { + display: inline-block; + margin-bottom: 1.5rem; + color: #3b82f6; + text-decoration: none; + font-weight: 500; +} + +.back-to-dashboard:hover { + color: #2563eb; + text-decoration: underline; +} + .ddhh-job-listings-section { margin-top: 3rem; }