From 4afa0138ef380a75859fbaaee01d88c73c66f275 Mon Sep 17 00:00:00 2001 From: Claude Date: Sun, 17 May 2026 18:29:26 +0000 Subject: [PATCH] Add 'Einstieg' tab with introduction and fix form field spacing MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit - Add new 'Einstieg' (Introduction) tab as Tab 0 with welcome content - Include brief explanation of Open Data Wizard from README - Present 5-step wizard structure overview - Remove mandatory field hint from Tab 1 (only on Einstieg) - Fix 'Dateigröße' field spacing: add 20px padding to form fields - Ensure consistent margin/padding across all form fields - All 90 tests pass, PHPCS validates https://claude.ai/code/session_01JB1xUQM892bVZ4Yv3MZjvq --- assets/css/admin.css | 17 +++++++ includes/class-fields.php | 103 +++++++++++++++++++++++++++++++++++++- 2 files changed, 118 insertions(+), 2 deletions(-) diff --git a/assets/css/admin.css b/assets/css/admin.css index 00c4d6e..486bff4 100644 --- a/assets/css/admin.css +++ b/assets/css/admin.css @@ -99,6 +99,23 @@ padding: 20px 0; } +.cf-field { + padding-left: 20px; + padding-right: 20px; +} + +/* Consistent spacing for all form fields */ +.cf-container__tab .cf-field { + padding-left: 20px; + padding-right: 20px; +} + +/* Specific spacing for the file size field */ +[data-odw-backing="byte_size"] { + padding-left: 20px; + padding-right: 20px; +} + /* ========================================================================= Required field indicators ========================================================================= */ diff --git a/includes/class-fields.php b/includes/class-fields.php index 9116273..bca37dd 100644 --- a/includes/class-fields.php +++ b/includes/class-fields.php @@ -42,6 +42,7 @@ public static function register(): void { /** * Registers the tabbed meta container with all dataset fields. * Tab structure (v2.1+): + * 0 — Einstieg * 1 — Grundlegende Informationen * 2 — Inhaltliche Angaben * 3 — Datenbereitstellung (Lizenz + Distribution) @@ -53,14 +54,23 @@ private static function register_required_fields(): void { ->where( 'post_type', '=', 'odw_dataset' ) ->set_priority( 'high' ) + // ----------------------------------------------------------------- + // Tab 0 — Einstieg + // ----------------------------------------------------------------- + ->add_tab( + __( '0 — Einstieg', 'open-data-wizard' ), + array( + Field::make( 'html', 'odw_introduction_html' ) + ->set_html( self::get_introduction_html() ), + ) + ) + // ----------------------------------------------------------------- // Tab 1 — Grundlegende Informationen // ----------------------------------------------------------------- ->add_tab( __( '1 — Grundlegende Informationen', 'open-data-wizard' ), array( - Field::make( 'html', 'odw_tab1_hint' ) - ->set_html( '

' . esc_html__( 'Pflichtfelder gemäß DCAT-AP 3.0. Ohne diese Angaben kann der Datensatz nicht veröffentlicht werden.', 'open-data-wizard' ) . '

' ), Field::make( 'text', 'odw_publisher', __( 'Wer gibt diese Daten heraus?', 'open-data-wizard' ) ) ->set_required( true ) @@ -610,6 +620,95 @@ public static function get_political_geocoding_level_options(): array { * * @return string HTML markup. */ + /** + * Generates the HTML for the introduction tab. + * + * @return string HTML output. + */ + private static function get_introduction_html(): string { + ob_start(); + ?> +
+

+ +

+ +

+ +

+

+ +

+ +

+

+ + +

+ +

+

+
    +
  1. +
    + +
  2. +
  3. +
    + +
  4. +
  5. +
    + +
  6. +
  7. +
    + +
  8. +
  9. +
    + +
  10. +
+ +

+

+ +

+ + +
+