Plugin Directory

Changeset 3486037


Ignore:
Timestamp:
03/18/2026 09:11:16 PM (2 weeks ago)
Author:
futurecodepl
Message:

New form version support

Location:
parksystem
Files:
6 edited
8 copied

Legend:

Unmodified
Added
Removed
  • parksystem/tags/1.0.2/languages/parksystem-pl_PL.po

    r3463514 r3486037  
    1414"X-Generator: Poedit\n"
    1515
    16 #: parksystem.php:195
    17 #: parksystem.php:201
    18 #: parksystem.php:422
     16#: parksystem.php:200
     17#: parksystem.php:206
     18#: parksystem.php:523
    1919msgid "ParkSystem Settings"
    2020msgstr "Ustawienia ParkSystem"
    2121
    22 #: parksystem.php:201
    23 #: parksystem.php:658
     22#: parksystem.php:206
     23#: parksystem.php:825
    2424msgid "Settings"
    2525msgstr "Ustawienia"
    2626
    27 #: parksystem.php:207
     27#: parksystem.php:212
    2828msgid "Reservation Page"
    2929msgstr "Strona Rezerwacji"
    3030
    31 #: parksystem.php:408
     31#: parksystem.php:502
    3232msgid "Settings saved!"
    3333msgstr "Ustawienia zapisane!"
    3434
    35 #: parksystem.php:428
     35#: parksystem.php:529
    3636msgid "Parking Token"
    3737msgstr "Token Parkingu"
    3838
    39 #: parksystem.php:432
     39#: parksystem.php:533
    4040msgid "Parking token displayed on reservation pages"
    4141msgstr "Token parkingu wyświetlany na stronach rezerwacji"
    4242
    43 #: parksystem.php:437
    44 msgid "Body Background Color"
    45 msgstr "Kolor tła widgetów"
    46 
    47 #: parksystem.php:441
     43#: parksystem.php:550
     44msgid "Widget Body Background Color"
     45msgstr "Kolor tła widgetu rezerwacji"
     46
     47#: parksystem.php:554
    4848msgid "Body background color for the iframe widget"
    49 msgstr "Kolor tła widgetów"
    50 
    51 #: parksystem.php:446
     49msgstr "Kolor tła strony dla widżetu iframe"
     50
     51#: parksystem.php:559
    5252msgid "Text Color"
    5353msgstr "Kolor tekstu"
    5454
    55 #: parksystem.php:450
     55#: parksystem.php:563
    5656msgid "Text color for the iframe widget"
    57 msgstr "Kolor tekstu widgetów"
    58 
    59 #: parksystem.php:455
     57msgstr "Kolor tekstu dla widżetu iframe"
     58
     59#: parksystem.php:568
    6060msgid "Input Background Color"
    6161msgstr "Kolor tła pól tekstowych"
    6262
    63 #: parksystem.php:459
     63#: parksystem.php:572
    6464msgid "Background color for input fields"
    6565msgstr "Kolor tła pól tekstowych"
    6666
    67 #: parksystem.php:464
     67#: parksystem.php:577
    6868msgid "Label Text Color"
    6969msgstr "Kolor tekstu etykiet"
    7070
    71 #: parksystem.php:468
     71#: parksystem.php:581
    7272msgid "Text color for form labels"
    7373msgstr "Kolor tekstu etykiet pól formularza"
    7474
    75 #: parksystem.php:473
     75#: parksystem.php:586
    7676msgid "Card Background Color"
    7777msgstr "Kolor tła kart"
    7878
    79 #: parksystem.php:477
     79#: parksystem.php:590
    8080msgid "Background color for card elements"
    81 msgstr "Kolor tła kart"
    82 
    83 #: parksystem.php:482
     81msgstr "Kolor tła elementów kart"
     82
     83#: parksystem.php:595
    8484msgid "Input Hover Background Color"
    8585msgstr "Kolor tła pól tekstowych przy najechaniu"
    8686
    87 #: parksystem.php:486
     87#: parksystem.php:599
    8888msgid "Background color for input fields on hover"
    8989msgstr "Kolor tła pól tekstowych przy najechaniu myszką"
    9090
    91 #: parksystem.php:528
     91#: parksystem.php:538
     92msgid "Use new reservation form"
     93msgstr "Użyj nowego formularza rezerwacji"
     94
     95#: parksystem.php:543
     96msgid "Use new reservation form (order2)"
     97msgstr "Użyj nowego formularza rezerwacji (order2)"
     98
     99#: parksystem.php:545
     100msgid "Enable the new reservation form with additional styling options"
     101msgstr "Włącz nowy formularz rezerwacji z dodatkowymi opcjami stylowania"
     102
     103#: parksystem.php:604
     104msgid "Secondary Text Color"
     105msgstr "Kolor tekstu drugorzędnego"
     106
     107#: parksystem.php:608
     108msgid "Secondary text color for the iframe widget"
     109msgstr "Kolor tekstu drugorzędnego dla widżetu iframe"
     110
     111#: parksystem.php:613
     112msgid "Card Text Color"
     113msgstr "Kolor tekstu kart"
     114
     115#: parksystem.php:617
     116msgid "Text color for card body content"
     117msgstr "Kolor tekstu treści kart"
     118
     119#: parksystem.php:622
     120msgid "Card Header Text Color"
     121msgstr "Kolor tekstu nagłówków kart"
     122
     123#: parksystem.php:626
     124msgid "Text color for card headers"
     125msgstr "Kolor tekstu nagłówków kart"
     126
     127#: parksystem.php:631
     128msgid "Active Color"
     129msgstr "Kolor aktywny"
     130
     131#: parksystem.php:635
     132msgid "Primary/active button color"
     133msgstr "Kolor przycisków głównych/aktywnych"
     134
     135#: parksystem.php:640
     136msgid "Active Text Color"
     137msgstr "Kolor tekstu na przyciskach aktywnych"
     138
     139#: parksystem.php:644
     140msgid "Text color on primary buttons"
     141msgstr "Kolor tekstu na przyciskach głównych"
     142
     143#: parksystem.php:625
     144msgid "Input Text Color"
     145msgstr "Kolor tekstu pól tekstowych"
     146
     147#: parksystem.php:629
     148msgid "Text color inside input fields"
     149msgstr "Kolor tekstu wewnątrz pól tekstowych"
     150
     151#: parksystem.php:634
     152msgid "Input Border Color"
     153msgstr "Kolor obramowania pól tekstowych"
     154
     155#: parksystem.php:638
     156msgid "Border color for input fields"
     157msgstr "Kolor obramowania pól tekstowych"
     158
     159#: parksystem.php:660
     160msgid "Card Border Color"
     161msgstr "Kolor obramowania kart"
     162
     163#: parksystem.php:664
     164msgid "Border color for card elements"
     165msgstr "Kolor obramowania elementów kart"
     166
     167#: parksystem.php:681
     168msgid "Error Color"
     169msgstr "Kolor błędów"
     170
     171#: parksystem.php:685
     172msgid "Color for error labels and messages"
     173msgstr "Kolor etykiet błędów i komunikatów"
     174
     175#: parksystem.php:695
    92176msgid "Redirecting..."
    93177msgstr "Przekierowywanie..."
    94178
    95 #: parksystem.php:528
     179#: parksystem.php:695
    96180msgid "Click here if you are not redirected."
    97181msgstr "Kliknij tutaj, jeśli nie nastąpiło przekierowanie."
     
    101185msgstr "Domyślny Szablon"
    102186
    103 #: parksystem.php:491
     187#: parksystem.php:658
    104188msgid "Page Template"
    105189msgstr "Szablon Strony"
    106190
    107 #: parksystem.php:502
     191#: parksystem.php:669
    108192msgid "Page template to use for ParkSystem widget pages (/rezerwuj/ and /potwierdzenie/)"
    109193msgstr "Szablon strony do użycia dla stron widgetów ParkSystem (/rezerwuj/ i /potwierdzenie/)"
     
    111195#. Plugin Name of the plugin
    112196#: parksystem.php
    113 #: parksystem.php:195
     197#: parksystem.php:200
    114198msgid "ParkSystem"
    115199msgstr "ParkSystem"
     
    130214msgstr "https://parksystem.online"
    131215
    132 #: parksystem.php:213
     216#: parksystem.php:218
    133217msgid "Widgets"
    134218msgstr "Widżety"
    135219
    136 #: parksystem.php:546
     220#: parksystem.php:713
    137221msgid "Pricing Widget"
    138222msgstr "Widżet Cennika"
    139223
    140 #: parksystem.php:548
     224#: parksystem.php:715
    141225msgid "Display pricing table with optional parameters: min_days, max_days, date, iframe_id"
    142226msgstr "Wyświetl tabelę cenową z opcjonalnymi parametrami: min_days, max_days, date, iframe_id"
    143227
    144 #: parksystem.php:552
     228#: parksystem.php:719
    145229msgid "Reservation Form Widget"
    146230msgstr "Widżet Formularza Rezerwacji"
    147231
    148 #: parksystem.php:554
     232#: parksystem.php:721
    149233msgid "Display reservation form with optional parameter: iframe_id"
    150234msgstr "Wyświetl formularz rezerwacji z opcjonalnym parametrem: iframe_id"
    151235
    152 #: parksystem.php:560
     236#: parksystem.php:727
    153237msgid "ParkSystem Widgets"
    154238msgstr "Widżety ParkSystem"
    155239
    156 #: parksystem.php:561
     240#: parksystem.php:728
    157241msgid "Copy the widget codes below and paste them into your posts, pages, or widgets."
    158242msgstr "Skopiuj kody widżetów poniżej i wklej je do swoich wpisów, stron lub widżetów."
    159243
    160 #: parksystem.php:570
     244#: parksystem.php:737
    161245msgid "Basic Shortcode:"
    162246msgstr "Podstawowy Kod Krótki:"
    163247
    164 #: parksystem.php:586
    165 #: parksystem.php:610
     248#: parksystem.php:753
     249#: parksystem.php:777
    166250msgid "Copy"
    167251msgstr "Kopiuj"
    168252
    169 #: parksystem.php:594
     253#: parksystem.php:761
    170254msgid "Example with Parameters:"
    171255msgstr "Przykład z Parametrami:"
    172256
    173 #: parksystem.php:634
     257#: parksystem.php:801
    174258msgid "Copied!"
    175259msgstr "Skopiowano!"
    176260
    177 #: parksystem.php:643
     261#: parksystem.php:810
    178262msgid "Failed to copy. Please select and copy manually."
    179263msgstr "Nie udało się skopiować. Proszę zaznaczyć i skopiować ręcznie."
    180264
    181 #: parksystem.php:682
    182 #: parksystem.php:722
    183 #: parksystem.php:728
     265#: parksystem.php:849
     266#: parksystem.php:893
     267#: parksystem.php:899
    184268msgid "Parking token is not configured. Please set it in plugin settings."
    185269msgstr "Token parkingu nie jest skonfigurowany. Proszę ustawić go w ustawieniach wtyczki."
    186270
    187 #: templates/block-renderer.php:41
     271#: templates/block-renderer.php:62
    188272msgid "Template not found."
    189273msgstr "Szablon nie znaleziony."
  • parksystem/tags/1.0.2/languages/parksystem.pot

    r3463491 r3486037  
    1010"Content-Type: text/plain; charset=UTF-8\n"
    1111"Content-Transfer-Encoding: 8bit\n"
    12 "POT-Creation-Date: 2026-02-10T15:18:48+00:00\n"
     12"POT-Creation-Date: 2026-03-17T17:43:02+00:00\n"
    1313"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n"
    1414"X-Generator: WP-CLI 2.12.0\n"
     
    1717#. Plugin Name of the plugin
    1818#: parksystem.php
    19 #: parksystem.php:195
     19#: parksystem.php:200
    2020msgid "ParkSystem"
    2121msgstr ""
     
    4040msgstr ""
    4141
    42 #: parksystem.php:195
    43 #: parksystem.php:201
    44 #: parksystem.php:422
     42#: parksystem.php:200
     43#: parksystem.php:206
     44#: parksystem.php:523
    4545msgid "ParkSystem Settings"
    4646msgstr ""
    4747
    48 #: parksystem.php:201
     48#: parksystem.php:206
     49#: parksystem.php:825
     50msgid "Settings"
     51msgstr ""
     52
     53#: parksystem.php:212
     54msgid "Reservation Page"
     55msgstr ""
     56
     57#: parksystem.php:218
     58msgid "Widgets"
     59msgstr ""
     60
     61#: parksystem.php:502
     62msgid "Settings saved!"
     63msgstr ""
     64
     65#: parksystem.php:529
     66msgid "Parking Token"
     67msgstr ""
     68
     69#: parksystem.php:533
     70msgid "Parking token displayed on reservation pages"
     71msgstr ""
     72
     73#: parksystem.php:538
     74msgid "Use new reservation form"
     75msgstr ""
     76
     77#: parksystem.php:543
     78msgid "Use new reservation form (order2)"
     79msgstr ""
     80
     81#: parksystem.php:545
     82msgid "Enable the new reservation form with additional styling options"
     83msgstr ""
     84
     85#: parksystem.php:550
     86msgid "Widget Body Background Color"
     87msgstr ""
     88
     89#: parksystem.php:554
     90msgid "Body background color for the iframe widget"
     91msgstr ""
     92
     93#: parksystem.php:559
     94msgid "Text Color"
     95msgstr ""
     96
     97#: parksystem.php:563
     98msgid "Text color for the iframe widget"
     99msgstr ""
     100
     101#: parksystem.php:568
     102msgid "Input Background Color"
     103msgstr ""
     104
     105#: parksystem.php:572
     106msgid "Background color for input fields"
     107msgstr ""
     108
     109#: parksystem.php:577
     110msgid "Label Text Color"
     111msgstr ""
     112
     113#: parksystem.php:581
     114msgid "Text color for form labels"
     115msgstr ""
     116
     117#: parksystem.php:586
     118msgid "Card Background Color"
     119msgstr ""
     120
     121#: parksystem.php:590
     122msgid "Background color for card elements"
     123msgstr ""
     124
     125#: parksystem.php:595
     126msgid "Input Hover Background Color"
     127msgstr ""
     128
     129#: parksystem.php:599
     130msgid "Background color for input fields on hover"
     131msgstr ""
     132
     133#: parksystem.php:604
     134msgid "Secondary Text Color"
     135msgstr ""
     136
     137#: parksystem.php:608
     138msgid "Secondary text color for the iframe widget"
     139msgstr ""
     140
     141#: parksystem.php:613
     142msgid "Card Text Color"
     143msgstr ""
     144
     145#: parksystem.php:617
     146msgid "Text color for card body content"
     147msgstr ""
     148
     149#: parksystem.php:622
     150msgid "Card Header Text Color"
     151msgstr ""
     152
     153#: parksystem.php:626
     154msgid "Text color for card headers"
     155msgstr ""
     156
     157#: parksystem.php:631
     158msgid "Active Color"
     159msgstr ""
     160
     161#: parksystem.php:635
     162msgid "Primary/active button color"
     163msgstr ""
     164
     165#: parksystem.php:640
     166msgid "Active Text Color"
     167msgstr ""
     168
     169#: parksystem.php:644
     170msgid "Text color on primary buttons"
     171msgstr ""
     172
     173#: parksystem.php:625
     174msgid "Input Text Color"
     175msgstr ""
     176
     177#: parksystem.php:629
     178msgid "Text color inside input fields"
     179msgstr ""
     180
     181#: parksystem.php:634
     182msgid "Input Border Color"
     183msgstr ""
     184
     185#: parksystem.php:638
     186msgid "Border color for input fields"
     187msgstr ""
     188
     189#: parksystem.php:660
     190msgid "Card Border Color"
     191msgstr ""
     192
     193#: parksystem.php:664
     194msgid "Border color for card elements"
     195msgstr ""
     196
     197#: parksystem.php:681
     198msgid "Error Color"
     199msgstr ""
     200
     201#: parksystem.php:685
     202msgid "Color for error labels and messages"
     203msgstr ""
     204
    49205#: parksystem.php:658
    50 msgid "Settings"
    51 msgstr ""
    52 
    53 #: parksystem.php:207
    54 msgid "Reservation Page"
    55 msgstr ""
    56 
    57 #: parksystem.php:213
    58 msgid "Widgets"
    59 msgstr ""
    60 
    61 #: parksystem.php:408
    62 msgid "Settings saved!"
    63 msgstr ""
    64 
    65 #: parksystem.php:428
    66 msgid "Parking Token"
    67 msgstr ""
    68 
    69 #: parksystem.php:432
    70 msgid "Parking token displayed on reservation pages"
    71 msgstr ""
    72 
    73 #: parksystem.php:437
    74 msgid "Body Background Color"
    75 msgstr ""
    76 
    77 #: parksystem.php:441
    78 msgid "Body background color for the iframe widget"
    79 msgstr ""
    80 
    81 #: parksystem.php:446
    82 msgid "Text Color"
    83 msgstr ""
    84 
    85 #: parksystem.php:450
    86 msgid "Text color for the iframe widget"
    87 msgstr ""
    88 
    89 #: parksystem.php:455
    90 msgid "Input Background Color"
    91 msgstr ""
    92 
    93 #: parksystem.php:459
    94 msgid "Background color for input fields"
    95 msgstr ""
    96 
    97 #: parksystem.php:464
    98 msgid "Label Text Color"
    99 msgstr ""
    100 
    101 #: parksystem.php:468
    102 msgid "Text color for form labels"
    103 msgstr ""
    104 
    105 #: parksystem.php:473
    106 msgid "Card Background Color"
    107 msgstr ""
    108 
    109 #: parksystem.php:477
    110 msgid "Background color for card elements"
    111 msgstr ""
    112 
    113 #: parksystem.php:482
    114 msgid "Input Hover Background Color"
    115 msgstr ""
    116 
    117 #: parksystem.php:486
    118 msgid "Background color for input fields on hover"
    119 msgstr ""
    120 
    121 #: parksystem.php:491
    122206msgid "Page Template"
    123207msgstr ""
    124208
    125 #: parksystem.php:502
     209#: parksystem.php:669
    126210msgid "Page template to use for ParkSystem widget pages (/rezerwuj/ and /potwierdzenie/)"
    127211msgstr ""
    128212
    129 #: parksystem.php:528
     213#: parksystem.php:695
    130214msgid "Redirecting..."
    131215msgstr ""
    132216
    133 #: parksystem.php:528
     217#: parksystem.php:695
    134218msgid "Click here if you are not redirected."
    135219msgstr ""
    136220
    137 #: parksystem.php:546
     221#: parksystem.php:713
    138222msgid "Pricing Widget"
    139223msgstr ""
    140224
    141 #: parksystem.php:548
     225#: parksystem.php:715
    142226msgid "Display pricing table with optional parameters: min_days, max_days, date, iframe_id"
    143227msgstr ""
    144228
    145 #: parksystem.php:552
     229#: parksystem.php:719
    146230msgid "Reservation Form Widget"
    147231msgstr ""
    148232
    149 #: parksystem.php:554
     233#: parksystem.php:721
    150234msgid "Display reservation form with optional parameter: iframe_id"
    151235msgstr ""
    152236
    153 #: parksystem.php:560
     237#: parksystem.php:727
    154238msgid "ParkSystem Widgets"
    155239msgstr ""
    156240
    157 #: parksystem.php:561
     241#: parksystem.php:728
    158242msgid "Copy the widget codes below and paste them into your posts, pages, or widgets."
    159243msgstr ""
    160244
    161 #: parksystem.php:570
     245#: parksystem.php:737
    162246msgid "Basic Shortcode:"
    163247msgstr ""
    164248
    165 #: parksystem.php:586
    166 #: parksystem.php:610
     249#: parksystem.php:753
     250#: parksystem.php:777
    167251msgid "Copy"
    168252msgstr ""
    169253
    170 #: parksystem.php:594
     254#: parksystem.php:761
    171255msgid "Example with Parameters:"
    172256msgstr ""
    173257
    174 #: parksystem.php:634
     258#: parksystem.php:801
    175259msgid "Copied!"
    176260msgstr ""
    177261
    178 #: parksystem.php:643
     262#: parksystem.php:810
    179263msgid "Failed to copy. Please select and copy manually."
    180264msgstr ""
    181265
    182 #: parksystem.php:682
    183 #: parksystem.php:722
    184 #: parksystem.php:728
     266#: parksystem.php:849
     267#: parksystem.php:893
     268#: parksystem.php:899
    185269msgid "Parking token is not configured. Please set it in plugin settings."
    186270msgstr ""
    187271
    188 #: templates/block-renderer.php:41
     272#: templates/block-renderer.php:62
    189273msgid "Template not found."
    190274msgstr ""
  • parksystem/tags/1.0.2/parksystem.php

    r3463491 r3486037  
    33 * Plugin Name: ParkSystem
    44 * Description: Parking management system integration - display reservation forms, confirmation pages, and pricing tables via iframe widgets from ParkSystem.online.
    5  * Version: 1.0.1
     5 * Version: 1.0.2
    66 * Author: Jakub Lasek (ParkSystem.online)
    77 * Author URI: https://parksystem.online
     
    236236            'sanitize_callback' => 'sanitize_text_field'
    237237        ));
    238         register_setting('parksystem_settings', 'parksystem_body_bg_color', array(
     238        register_setting('parksystem_settings', 'parksystem_widget_background_color', array(
    239239            'sanitize_callback' => 'sanitize_hex_color'
    240240        ));
     
    252252        ));
    253253        register_setting('parksystem_settings', 'parksystem_input_hover_bg_color', array(
     254            'sanitize_callback' => 'sanitize_hex_color'
     255        ));
     256        register_setting('parksystem_settings', 'parksystem_input_text_color', array(
     257            'sanitize_callback' => 'sanitize_hex_color'
     258        ));
     259        register_setting('parksystem_settings', 'parksystem_input_border_color', array(
     260            'sanitize_callback' => 'sanitize_hex_color'
     261        ));
     262        register_setting('parksystem_settings', 'parksystem_use_new_form', array(
     263            'sanitize_callback' => function ($value) {
     264                return !empty($value) ? '1' : '';
     265            }
     266        ));
     267        register_setting('parksystem_settings', 'parksystem_text_color_secondary', array(
     268            'sanitize_callback' => 'sanitize_hex_color'
     269        ));
     270        register_setting('parksystem_settings', 'parksystem_card_text_color', array(
     271            'sanitize_callback' => 'sanitize_hex_color'
     272        ));
     273        register_setting('parksystem_settings', 'parksystem_card_header_text_color', array(
     274            'sanitize_callback' => 'sanitize_hex_color'
     275        ));
     276        register_setting('parksystem_settings', 'parksystem_active_color', array(
     277            'sanitize_callback' => 'sanitize_hex_color'
     278        ));
     279        register_setting('parksystem_settings', 'parksystem_active_text_color', array(
     280            'sanitize_callback' => 'sanitize_hex_color'
     281        ));
     282        register_setting('parksystem_settings', 'parksystem_card_border_color', array(
     283            'sanitize_callback' => 'sanitize_hex_color'
     284        ));
     285        register_setting('parksystem_settings', 'parksystem_error_color', array(
    254286            'sanitize_callback' => 'sanitize_hex_color'
    255287        ));
     
    284316        wp_enqueue_script('jquery');
    285317
    286         // Add inline script for color picker initialization
     318        // Add inline script for color picker initialization and new form toggle
    287319        $inline_script = "jQuery(document).ready(function($) {
    288320            $('.parksystem-color-picker').wpColorPicker();
     321            function toggleNewFormInputs() {
     322                $('.parksystem-new-form-only').toggle($('#parksystem_use_new_form').is(':checked'));
     323            }
     324            $('#parksystem_use_new_form').on('change', toggleNewFormInputs);
     325            toggleNewFormInputs();
    289326        });";
    290327        wp_add_inline_script('wp-color-picker', $inline_script);
     
    345382            function handleIframeResize() {
    346383                window.addEventListener('message', function (event) {
    347                     if (event.origin !== 'https://parksystem.online') return;
     384                    if (event.origin !== 'https://parksystem.online' && event.origin !== 'http://localhost:3000') return;
    348385
    349386                    const messageType = event.data.type;
     
    424461            }
    425462
    426             if (isset($_POST['parksystem_body_bg_color'])) {
    427                 update_option('parksystem_body_bg_color', sanitize_hex_color(wp_unslash($_POST['parksystem_body_bg_color'])));
     463            if (isset($_POST['parksystem_widget_background_color'])) {
     464                update_option('parksystem_widget_background_color', sanitize_hex_color(wp_unslash($_POST['parksystem_widget_background_color'])));
    428465            }
    429466
     
    447484                update_option('parksystem_input_hover_bg_color', sanitize_hex_color(wp_unslash($_POST['parksystem_input_hover_bg_color'])));
    448485            }
     486            if (isset($_POST['parksystem_input_text_color'])) {
     487                update_option('parksystem_input_text_color', sanitize_hex_color(wp_unslash($_POST['parksystem_input_text_color'])));
     488            }
     489            if (isset($_POST['parksystem_input_border_color'])) {
     490                update_option('parksystem_input_border_color', sanitize_hex_color(wp_unslash($_POST['parksystem_input_border_color'])));
     491            }
     492
     493            update_option('parksystem_use_new_form', isset($_POST['parksystem_use_new_form']) ? '1' : '');
     494
     495            if (isset($_POST['parksystem_text_color_secondary'])) {
     496                update_option('parksystem_text_color_secondary', sanitize_hex_color(wp_unslash($_POST['parksystem_text_color_secondary'])));
     497            }
     498            if (isset($_POST['parksystem_card_text_color'])) {
     499                update_option('parksystem_card_text_color', sanitize_hex_color(wp_unslash($_POST['parksystem_card_text_color'])));
     500            }
     501            if (isset($_POST['parksystem_card_header_text_color'])) {
     502                update_option('parksystem_card_header_text_color', sanitize_hex_color(wp_unslash($_POST['parksystem_card_header_text_color'])));
     503            }
     504            if (isset($_POST['parksystem_active_color'])) {
     505                update_option('parksystem_active_color', sanitize_hex_color(wp_unslash($_POST['parksystem_active_color'])));
     506            }
     507            if (isset($_POST['parksystem_active_text_color'])) {
     508                update_option('parksystem_active_text_color', sanitize_hex_color(wp_unslash($_POST['parksystem_active_text_color'])));
     509            }
     510            if (isset($_POST['parksystem_card_border_color'])) {
     511                update_option('parksystem_card_border_color', sanitize_hex_color(wp_unslash($_POST['parksystem_card_border_color'])));
     512            }
     513            if (isset($_POST['parksystem_error_color'])) {
     514                update_option('parksystem_error_color', sanitize_hex_color(wp_unslash($_POST['parksystem_error_color'])));
     515            }
    449516
    450517            // Flush rewrite rules to ensure custom routes work
     
    456523        $parking_token = get_option('parksystem_parking_token', '');
    457524        $page_template = get_option('parksystem_page_template', '');
    458         $body_bg_color = get_option('parksystem_body_bg_color', '');
     525        $widget_background_color = get_option('parksystem_widget_background_color', '');
    459526        $text_color = get_option('parksystem_text_color', '');
    460527        $input_bg_color = get_option('parksystem_input_bg_color', '');
     
    462529        $card_bg_color = get_option('parksystem_card_bg_color', '');
    463530        $input_hover_bg_color = get_option('parksystem_input_hover_bg_color', '');
     531        $input_text_color = get_option('parksystem_input_text_color', '');
     532        $input_border_color = get_option('parksystem_input_border_color', '');
     533        $use_new_form = get_option('parksystem_use_new_form', '');
     534        $text_color_secondary = get_option('parksystem_text_color_secondary', '');
     535        $card_text_color = get_option('parksystem_card_text_color', '');
     536        $card_header_text_color = get_option('parksystem_card_header_text_color', '');
     537        $active_color = get_option('parksystem_active_color', '');
     538        $active_text_color = get_option('parksystem_active_text_color', '');
     539        $card_border_color = get_option('parksystem_card_border_color', '');
     540        $error_color = get_option('parksystem_error_color', '');
    464541        $available_templates = $this->get_available_page_templates();
    465542?>
     
    480557                    <tr>
    481558                        <th scope="row">
    482                             <label for="parksystem_body_bg_color"><?php esc_html_e('Body Background Color', 'parksystem'); ?></label>
    483                         </th>
    484                         <td>
    485                             <input type="text" id="parksystem_body_bg_color" name="parksystem_body_bg_color" value="<?php echo esc_attr($body_bg_color); ?>" class="parksystem-color-picker" />
     559                            <label for="parksystem_use_new_form"><?php esc_html_e('Use new reservation form', 'parksystem'); ?></label>
     560                        </th>
     561                        <td>
     562                            <label for="parksystem_use_new_form">
     563                                <input type="checkbox" id="parksystem_use_new_form" name="parksystem_use_new_form" value="1" <?php checked($use_new_form, '1'); ?> />
     564                                <?php esc_html_e('Use new reservation form (order2)', 'parksystem'); ?>
     565                            </label>
     566                            <p class="description"><?php esc_html_e('Enable the new reservation form with additional styling options', 'parksystem'); ?></p>
     567                        </td>
     568                    </tr>
     569                    <tr>
     570                        <th scope="row">
     571                            <label for="parksystem_widget_background_color"><?php esc_html_e('Widget Body Background Color', 'parksystem'); ?></label>
     572                        </th>
     573                        <td>
     574                            <input type="text" id="parksystem_widget_background_color" name="parksystem_widget_background_color" value="<?php echo esc_attr($widget_background_color); ?>" class="parksystem-color-picker" />
    486575                            <p class="description"><?php esc_html_e('Body background color for the iframe widget', 'parksystem'); ?></p>
    487576                        </td>
     
    530619                            <input type="text" id="parksystem_input_hover_bg_color" name="parksystem_input_hover_bg_color" value="<?php echo esc_attr($input_hover_bg_color); ?>" class="parksystem-color-picker" />
    531620                            <p class="description"><?php esc_html_e('Background color for input fields on hover', 'parksystem'); ?></p>
     621                        </td>
     622                    </tr>
     623                    <tr class="parksystem-new-form-only" style="<?php echo $use_new_form ? '' : 'display:none'; ?>">
     624                        <th scope="row">
     625                            <label for="parksystem_input_text_color"><?php esc_html_e('Input Text Color', 'parksystem'); ?></label>
     626                        </th>
     627                        <td>
     628                            <input type="text" id="parksystem_input_text_color" name="parksystem_input_text_color" value="<?php echo esc_attr($input_text_color); ?>" class="parksystem-color-picker" />
     629                            <p class="description"><?php esc_html_e('Text color inside input fields', 'parksystem'); ?></p>
     630                        </td>
     631                    </tr>
     632                    <tr class="parksystem-new-form-only" style="<?php echo $use_new_form ? '' : 'display:none'; ?>">
     633                        <th scope="row">
     634                            <label for="parksystem_input_border_color"><?php esc_html_e('Input Border Color', 'parksystem'); ?></label>
     635                        </th>
     636                        <td>
     637                            <input type="text" id="parksystem_input_border_color" name="parksystem_input_border_color" value="<?php echo esc_attr($input_border_color); ?>" class="parksystem-color-picker" />
     638                            <p class="description"><?php esc_html_e('Border color for input fields', 'parksystem'); ?></p>
     639                        </td>
     640                    </tr>
     641                    <tr class="parksystem-new-form-only" style="<?php echo $use_new_form ? '' : 'display:none'; ?>">
     642                        <th scope="row">
     643                            <label for="parksystem_text_color_secondary"><?php esc_html_e('Secondary Text Color', 'parksystem'); ?></label>
     644                        </th>
     645                        <td>
     646                            <input type="text" id="parksystem_text_color_secondary" name="parksystem_text_color_secondary" value="<?php echo esc_attr($text_color_secondary); ?>" class="parksystem-color-picker" />
     647                            <p class="description"><?php esc_html_e('Secondary text color for the iframe widget', 'parksystem'); ?></p>
     648                        </td>
     649                    </tr>
     650                    <tr class="parksystem-new-form-only" style="<?php echo $use_new_form ? '' : 'display:none'; ?>">
     651                        <th scope="row">
     652                            <label for="parksystem_card_text_color"><?php esc_html_e('Card Text Color', 'parksystem'); ?></label>
     653                        </th>
     654                        <td>
     655                            <input type="text" id="parksystem_card_text_color" name="parksystem_card_text_color" value="<?php echo esc_attr($card_text_color); ?>" class="parksystem-color-picker" />
     656                            <p class="description"><?php esc_html_e('Text color for card body content', 'parksystem'); ?></p>
     657                        </td>
     658                    </tr>
     659                    <tr class="parksystem-new-form-only" style="<?php echo $use_new_form ? '' : 'display:none'; ?>">
     660                        <th scope="row">
     661                            <label for="parksystem_card_header_text_color"><?php esc_html_e('Card Header Text Color', 'parksystem'); ?></label>
     662                        </th>
     663                        <td>
     664                            <input type="text" id="parksystem_card_header_text_color" name="parksystem_card_header_text_color" value="<?php echo esc_attr($card_header_text_color); ?>" class="parksystem-color-picker" />
     665                            <p class="description"><?php esc_html_e('Text color for card headers', 'parksystem'); ?></p>
     666                        </td>
     667                    </tr>
     668                    <tr class="parksystem-new-form-only" style="<?php echo $use_new_form ? '' : 'display:none'; ?>">
     669                        <th scope="row">
     670                            <label for="parksystem_active_color"><?php esc_html_e('Active Color', 'parksystem'); ?></label>
     671                        </th>
     672                        <td>
     673                            <input type="text" id="parksystem_active_color" name="parksystem_active_color" value="<?php echo esc_attr($active_color); ?>" class="parksystem-color-picker" />
     674                            <p class="description"><?php esc_html_e('Primary/active button color', 'parksystem'); ?></p>
     675                        </td>
     676                    </tr>
     677                    <tr class="parksystem-new-form-only" style="<?php echo $use_new_form ? '' : 'display:none'; ?>">
     678                        <th scope="row">
     679                            <label for="parksystem_active_text_color"><?php esc_html_e('Active Text Color', 'parksystem'); ?></label>
     680                        </th>
     681                        <td>
     682                            <input type="text" id="parksystem_active_text_color" name="parksystem_active_text_color" value="<?php echo esc_attr($active_text_color); ?>" class="parksystem-color-picker" />
     683                            <p class="description"><?php esc_html_e('Text color on primary buttons', 'parksystem'); ?></p>
     684                        </td>
     685                    </tr>
     686                    <tr class="parksystem-new-form-only" style="<?php echo $use_new_form ? '' : 'display:none'; ?>">
     687                        <th scope="row">
     688                            <label for="parksystem_card_border_color"><?php esc_html_e('Card Border Color', 'parksystem'); ?></label>
     689                        </th>
     690                        <td>
     691                            <input type="text" id="parksystem_card_border_color" name="parksystem_card_border_color" value="<?php echo esc_attr($card_border_color); ?>" class="parksystem-color-picker" />
     692                            <p class="description"><?php esc_html_e('Border color for card elements', 'parksystem'); ?></p>
     693                        </td>
     694                    </tr>
     695                    <tr class="parksystem-new-form-only" style="<?php echo $use_new_form ? '' : 'display:none'; ?>">
     696                        <th scope="row">
     697                            <label for="parksystem_error_color"><?php esc_html_e('Error Color', 'parksystem'); ?></label>
     698                        </th>
     699                        <td>
     700                            <input type="text" id="parksystem_error_color" name="parksystem_error_color" value="<?php echo esc_attr($error_color); ?>" class="parksystem-color-picker" />
     701                            <p class="description"><?php esc_html_e('Color for error labels and messages', 'parksystem'); ?></p>
    532702                        </td>
    533703                    </tr>
     
    8921062        }
    8931063
    894         $body_bg_color = get_option('parksystem_body_bg_color', '');
     1064        $widget_background_color = get_option('parksystem_widget_background_color', '');
    8951065        $text_color = get_option('parksystem_text_color', '');
    8961066        $input_bg_color = get_option('parksystem_input_bg_color', '');
     1067        $input_hover_bg_color = get_option('parksystem_input_hover_bg_color', '');
     1068        $input_text_color = get_option('parksystem_input_text_color', '');
     1069        $input_border_color = get_option('parksystem_input_border_color', '');
    8971070        $label_text_color = get_option('parksystem_label_text_color', '');
    8981071        $card_bg_color = get_option('parksystem_card_bg_color', '');
    899         $input_hover_bg_color = get_option('parksystem_input_hover_bg_color', '');
     1072        $text_color_secondary = get_option('parksystem_text_color_secondary', '');
     1073        $card_text_color = get_option('parksystem_card_text_color', '');
     1074        $card_header_text_color = get_option('parksystem_card_header_text_color', '');
     1075        $active_color = get_option('parksystem_active_color', '');
     1076        $active_text_color = get_option('parksystem_active_text_color', '');
     1077        $card_border_color = get_option('parksystem_card_border_color', '');
     1078        $error_color = get_option('parksystem_error_color', '');
    9001079
    9011080        $iframeParams = array(
     
    9041083
    9051084        // Add color parameters if they are not blank
    906         if (!empty($body_bg_color)) {
    907             $iframeParams['body_bg_color'] = $body_bg_color;
     1085        if (!empty($widget_background_color)) {
     1086            $iframeParams['body_bg_color'] = $widget_background_color;
    9081087        }
    9091088        if (!empty($text_color)) {
     
    9211100        if (!empty($input_hover_bg_color)) {
    9221101            $iframeParams['input_hover_bg_color'] = $input_hover_bg_color;
     1102        }
     1103        if (!empty($input_text_color)) {
     1104            $iframeParams['input_text_color'] = $input_text_color;
     1105        }
     1106        if (!empty($input_border_color)) {
     1107            $iframeParams['input_border_color'] = $input_border_color;
     1108        }
     1109        if (!empty($text_color_secondary)) {
     1110            $iframeParams['text_color_secondary'] = $text_color_secondary;
     1111        }
     1112        if (!empty($card_text_color)) {
     1113            $iframeParams['card_text_color'] = $card_text_color;
     1114        }
     1115        if (!empty($card_header_text_color)) {
     1116            $iframeParams['card_header_text_color'] = $card_header_text_color;
     1117        }
     1118        if (!empty($active_color)) {
     1119            $iframeParams['active_color'] = $active_color;
     1120        }
     1121        if (!empty($active_text_color)) {
     1122            $iframeParams['active_text_color'] = $active_text_color;
     1123        }
     1124        if (!empty($card_border_color)) {
     1125            $iframeParams['card_border_color'] = $card_border_color;
     1126        }
     1127        if (!empty($error_color)) {
     1128            $iframeParams['error_color'] = $error_color;
    9231129        }
    9241130
     
    9381144        }
    9391145
     1146        $use_new_form = get_option('parksystem_use_new_form', '');
     1147        $order_path = $use_new_form ? '/order2' : '/order';
     1148
    9401149        $parking_token_sanitized = sanitize_text_field($parking_token);
    941         $iframe_url = 'https://parksystem.online/widget/' . $parking_token_sanitized . '/order';
     1150        $iframe_url = 'https://parksystem.online/widget/' . $parking_token_sanitized . $order_path;
    9421151
    9431152        if (!empty($iframeParams)) {
  • parksystem/tags/1.0.2/readme.txt

    r3463514 r3486037  
    44Requires at least: 5.0
    55Tested up to: 6.9
    6 Stable tag: 1.0.1
     6Stable tag: 1.0.2
    77Requires PHP: 7.4
    88License: GPL2
     
    4545== Changelog ==
    4646
     47= 1.0.2 =
     48* Add optional new reservation form (order2) with toggle in settings
     49* Add extended styling options for new form: input text/border colors, secondary text, card text/header/border colors, active/error colors
     50* Rename "Body Background Color" to "Widget Body Background Color"
     51* Add localhost origin support for iframe message handling (development)
     52* Update Polish translations
     53
    4754= 1.0.1 =
    4855* Improved code organization and WordPress coding standards compliance
     
    6269== Upgrade Notice ==
    6370
     71= 1.0.2 =
     72Adds new reservation form option with extended styling controls. Enable in ParkSystem > Settings.
     73
    6474= 1.0.1 =
    6575This update improves code quality and WordPress standards compliance. No action required.
  • parksystem/trunk/languages/parksystem-pl_PL.po

    r3463514 r3486037  
    1414"X-Generator: Poedit\n"
    1515
    16 #: parksystem.php:195
    17 #: parksystem.php:201
    18 #: parksystem.php:422
     16#: parksystem.php:200
     17#: parksystem.php:206
     18#: parksystem.php:523
    1919msgid "ParkSystem Settings"
    2020msgstr "Ustawienia ParkSystem"
    2121
    22 #: parksystem.php:201
    23 #: parksystem.php:658
     22#: parksystem.php:206
     23#: parksystem.php:825
    2424msgid "Settings"
    2525msgstr "Ustawienia"
    2626
    27 #: parksystem.php:207
     27#: parksystem.php:212
    2828msgid "Reservation Page"
    2929msgstr "Strona Rezerwacji"
    3030
    31 #: parksystem.php:408
     31#: parksystem.php:502
    3232msgid "Settings saved!"
    3333msgstr "Ustawienia zapisane!"
    3434
    35 #: parksystem.php:428
     35#: parksystem.php:529
    3636msgid "Parking Token"
    3737msgstr "Token Parkingu"
    3838
    39 #: parksystem.php:432
     39#: parksystem.php:533
    4040msgid "Parking token displayed on reservation pages"
    4141msgstr "Token parkingu wyświetlany na stronach rezerwacji"
    4242
    43 #: parksystem.php:437
    44 msgid "Body Background Color"
    45 msgstr "Kolor tła widgetów"
    46 
    47 #: parksystem.php:441
     43#: parksystem.php:550
     44msgid "Widget Body Background Color"
     45msgstr "Kolor tła widgetu rezerwacji"
     46
     47#: parksystem.php:554
    4848msgid "Body background color for the iframe widget"
    49 msgstr "Kolor tła widgetów"
    50 
    51 #: parksystem.php:446
     49msgstr "Kolor tła strony dla widżetu iframe"
     50
     51#: parksystem.php:559
    5252msgid "Text Color"
    5353msgstr "Kolor tekstu"
    5454
    55 #: parksystem.php:450
     55#: parksystem.php:563
    5656msgid "Text color for the iframe widget"
    57 msgstr "Kolor tekstu widgetów"
    58 
    59 #: parksystem.php:455
     57msgstr "Kolor tekstu dla widżetu iframe"
     58
     59#: parksystem.php:568
    6060msgid "Input Background Color"
    6161msgstr "Kolor tła pól tekstowych"
    6262
    63 #: parksystem.php:459
     63#: parksystem.php:572
    6464msgid "Background color for input fields"
    6565msgstr "Kolor tła pól tekstowych"
    6666
    67 #: parksystem.php:464
     67#: parksystem.php:577
    6868msgid "Label Text Color"
    6969msgstr "Kolor tekstu etykiet"
    7070
    71 #: parksystem.php:468
     71#: parksystem.php:581
    7272msgid "Text color for form labels"
    7373msgstr "Kolor tekstu etykiet pól formularza"
    7474
    75 #: parksystem.php:473
     75#: parksystem.php:586
    7676msgid "Card Background Color"
    7777msgstr "Kolor tła kart"
    7878
    79 #: parksystem.php:477
     79#: parksystem.php:590
    8080msgid "Background color for card elements"
    81 msgstr "Kolor tła kart"
    82 
    83 #: parksystem.php:482
     81msgstr "Kolor tła elementów kart"
     82
     83#: parksystem.php:595
    8484msgid "Input Hover Background Color"
    8585msgstr "Kolor tła pól tekstowych przy najechaniu"
    8686
    87 #: parksystem.php:486
     87#: parksystem.php:599
    8888msgid "Background color for input fields on hover"
    8989msgstr "Kolor tła pól tekstowych przy najechaniu myszką"
    9090
    91 #: parksystem.php:528
     91#: parksystem.php:538
     92msgid "Use new reservation form"
     93msgstr "Użyj nowego formularza rezerwacji"
     94
     95#: parksystem.php:543
     96msgid "Use new reservation form (order2)"
     97msgstr "Użyj nowego formularza rezerwacji (order2)"
     98
     99#: parksystem.php:545
     100msgid "Enable the new reservation form with additional styling options"
     101msgstr "Włącz nowy formularz rezerwacji z dodatkowymi opcjami stylowania"
     102
     103#: parksystem.php:604
     104msgid "Secondary Text Color"
     105msgstr "Kolor tekstu drugorzędnego"
     106
     107#: parksystem.php:608
     108msgid "Secondary text color for the iframe widget"
     109msgstr "Kolor tekstu drugorzędnego dla widżetu iframe"
     110
     111#: parksystem.php:613
     112msgid "Card Text Color"
     113msgstr "Kolor tekstu kart"
     114
     115#: parksystem.php:617
     116msgid "Text color for card body content"
     117msgstr "Kolor tekstu treści kart"
     118
     119#: parksystem.php:622
     120msgid "Card Header Text Color"
     121msgstr "Kolor tekstu nagłówków kart"
     122
     123#: parksystem.php:626
     124msgid "Text color for card headers"
     125msgstr "Kolor tekstu nagłówków kart"
     126
     127#: parksystem.php:631
     128msgid "Active Color"
     129msgstr "Kolor aktywny"
     130
     131#: parksystem.php:635
     132msgid "Primary/active button color"
     133msgstr "Kolor przycisków głównych/aktywnych"
     134
     135#: parksystem.php:640
     136msgid "Active Text Color"
     137msgstr "Kolor tekstu na przyciskach aktywnych"
     138
     139#: parksystem.php:644
     140msgid "Text color on primary buttons"
     141msgstr "Kolor tekstu na przyciskach głównych"
     142
     143#: parksystem.php:625
     144msgid "Input Text Color"
     145msgstr "Kolor tekstu pól tekstowych"
     146
     147#: parksystem.php:629
     148msgid "Text color inside input fields"
     149msgstr "Kolor tekstu wewnątrz pól tekstowych"
     150
     151#: parksystem.php:634
     152msgid "Input Border Color"
     153msgstr "Kolor obramowania pól tekstowych"
     154
     155#: parksystem.php:638
     156msgid "Border color for input fields"
     157msgstr "Kolor obramowania pól tekstowych"
     158
     159#: parksystem.php:660
     160msgid "Card Border Color"
     161msgstr "Kolor obramowania kart"
     162
     163#: parksystem.php:664
     164msgid "Border color for card elements"
     165msgstr "Kolor obramowania elementów kart"
     166
     167#: parksystem.php:681
     168msgid "Error Color"
     169msgstr "Kolor błędów"
     170
     171#: parksystem.php:685
     172msgid "Color for error labels and messages"
     173msgstr "Kolor etykiet błędów i komunikatów"
     174
     175#: parksystem.php:695
    92176msgid "Redirecting..."
    93177msgstr "Przekierowywanie..."
    94178
    95 #: parksystem.php:528
     179#: parksystem.php:695
    96180msgid "Click here if you are not redirected."
    97181msgstr "Kliknij tutaj, jeśli nie nastąpiło przekierowanie."
     
    101185msgstr "Domyślny Szablon"
    102186
    103 #: parksystem.php:491
     187#: parksystem.php:658
    104188msgid "Page Template"
    105189msgstr "Szablon Strony"
    106190
    107 #: parksystem.php:502
     191#: parksystem.php:669
    108192msgid "Page template to use for ParkSystem widget pages (/rezerwuj/ and /potwierdzenie/)"
    109193msgstr "Szablon strony do użycia dla stron widgetów ParkSystem (/rezerwuj/ i /potwierdzenie/)"
     
    111195#. Plugin Name of the plugin
    112196#: parksystem.php
    113 #: parksystem.php:195
     197#: parksystem.php:200
    114198msgid "ParkSystem"
    115199msgstr "ParkSystem"
     
    130214msgstr "https://parksystem.online"
    131215
    132 #: parksystem.php:213
     216#: parksystem.php:218
    133217msgid "Widgets"
    134218msgstr "Widżety"
    135219
    136 #: parksystem.php:546
     220#: parksystem.php:713
    137221msgid "Pricing Widget"
    138222msgstr "Widżet Cennika"
    139223
    140 #: parksystem.php:548
     224#: parksystem.php:715
    141225msgid "Display pricing table with optional parameters: min_days, max_days, date, iframe_id"
    142226msgstr "Wyświetl tabelę cenową z opcjonalnymi parametrami: min_days, max_days, date, iframe_id"
    143227
    144 #: parksystem.php:552
     228#: parksystem.php:719
    145229msgid "Reservation Form Widget"
    146230msgstr "Widżet Formularza Rezerwacji"
    147231
    148 #: parksystem.php:554
     232#: parksystem.php:721
    149233msgid "Display reservation form with optional parameter: iframe_id"
    150234msgstr "Wyświetl formularz rezerwacji z opcjonalnym parametrem: iframe_id"
    151235
    152 #: parksystem.php:560
     236#: parksystem.php:727
    153237msgid "ParkSystem Widgets"
    154238msgstr "Widżety ParkSystem"
    155239
    156 #: parksystem.php:561
     240#: parksystem.php:728
    157241msgid "Copy the widget codes below and paste them into your posts, pages, or widgets."
    158242msgstr "Skopiuj kody widżetów poniżej i wklej je do swoich wpisów, stron lub widżetów."
    159243
    160 #: parksystem.php:570
     244#: parksystem.php:737
    161245msgid "Basic Shortcode:"
    162246msgstr "Podstawowy Kod Krótki:"
    163247
    164 #: parksystem.php:586
    165 #: parksystem.php:610
     248#: parksystem.php:753
     249#: parksystem.php:777
    166250msgid "Copy"
    167251msgstr "Kopiuj"
    168252
    169 #: parksystem.php:594
     253#: parksystem.php:761
    170254msgid "Example with Parameters:"
    171255msgstr "Przykład z Parametrami:"
    172256
    173 #: parksystem.php:634
     257#: parksystem.php:801
    174258msgid "Copied!"
    175259msgstr "Skopiowano!"
    176260
    177 #: parksystem.php:643
     261#: parksystem.php:810
    178262msgid "Failed to copy. Please select and copy manually."
    179263msgstr "Nie udało się skopiować. Proszę zaznaczyć i skopiować ręcznie."
    180264
    181 #: parksystem.php:682
    182 #: parksystem.php:722
    183 #: parksystem.php:728
     265#: parksystem.php:849
     266#: parksystem.php:893
     267#: parksystem.php:899
    184268msgid "Parking token is not configured. Please set it in plugin settings."
    185269msgstr "Token parkingu nie jest skonfigurowany. Proszę ustawić go w ustawieniach wtyczki."
    186270
    187 #: templates/block-renderer.php:41
     271#: templates/block-renderer.php:62
    188272msgid "Template not found."
    189273msgstr "Szablon nie znaleziony."
  • parksystem/trunk/languages/parksystem.pot

    r3463491 r3486037  
    1010"Content-Type: text/plain; charset=UTF-8\n"
    1111"Content-Transfer-Encoding: 8bit\n"
    12 "POT-Creation-Date: 2026-02-10T15:18:48+00:00\n"
     12"POT-Creation-Date: 2026-03-17T17:43:02+00:00\n"
    1313"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n"
    1414"X-Generator: WP-CLI 2.12.0\n"
     
    1717#. Plugin Name of the plugin
    1818#: parksystem.php
    19 #: parksystem.php:195
     19#: parksystem.php:200
    2020msgid "ParkSystem"
    2121msgstr ""
     
    4040msgstr ""
    4141
    42 #: parksystem.php:195
    43 #: parksystem.php:201
    44 #: parksystem.php:422
     42#: parksystem.php:200
     43#: parksystem.php:206
     44#: parksystem.php:523
    4545msgid "ParkSystem Settings"
    4646msgstr ""
    4747
    48 #: parksystem.php:201
     48#: parksystem.php:206
     49#: parksystem.php:825
     50msgid "Settings"
     51msgstr ""
     52
     53#: parksystem.php:212
     54msgid "Reservation Page"
     55msgstr ""
     56
     57#: parksystem.php:218
     58msgid "Widgets"
     59msgstr ""
     60
     61#: parksystem.php:502
     62msgid "Settings saved!"
     63msgstr ""
     64
     65#: parksystem.php:529
     66msgid "Parking Token"
     67msgstr ""
     68
     69#: parksystem.php:533
     70msgid "Parking token displayed on reservation pages"
     71msgstr ""
     72
     73#: parksystem.php:538
     74msgid "Use new reservation form"
     75msgstr ""
     76
     77#: parksystem.php:543
     78msgid "Use new reservation form (order2)"
     79msgstr ""
     80
     81#: parksystem.php:545
     82msgid "Enable the new reservation form with additional styling options"
     83msgstr ""
     84
     85#: parksystem.php:550
     86msgid "Widget Body Background Color"
     87msgstr ""
     88
     89#: parksystem.php:554
     90msgid "Body background color for the iframe widget"
     91msgstr ""
     92
     93#: parksystem.php:559
     94msgid "Text Color"
     95msgstr ""
     96
     97#: parksystem.php:563
     98msgid "Text color for the iframe widget"
     99msgstr ""
     100
     101#: parksystem.php:568
     102msgid "Input Background Color"
     103msgstr ""
     104
     105#: parksystem.php:572
     106msgid "Background color for input fields"
     107msgstr ""
     108
     109#: parksystem.php:577
     110msgid "Label Text Color"
     111msgstr ""
     112
     113#: parksystem.php:581
     114msgid "Text color for form labels"
     115msgstr ""
     116
     117#: parksystem.php:586
     118msgid "Card Background Color"
     119msgstr ""
     120
     121#: parksystem.php:590
     122msgid "Background color for card elements"
     123msgstr ""
     124
     125#: parksystem.php:595
     126msgid "Input Hover Background Color"
     127msgstr ""
     128
     129#: parksystem.php:599
     130msgid "Background color for input fields on hover"
     131msgstr ""
     132
     133#: parksystem.php:604
     134msgid "Secondary Text Color"
     135msgstr ""
     136
     137#: parksystem.php:608
     138msgid "Secondary text color for the iframe widget"
     139msgstr ""
     140
     141#: parksystem.php:613
     142msgid "Card Text Color"
     143msgstr ""
     144
     145#: parksystem.php:617
     146msgid "Text color for card body content"
     147msgstr ""
     148
     149#: parksystem.php:622
     150msgid "Card Header Text Color"
     151msgstr ""
     152
     153#: parksystem.php:626
     154msgid "Text color for card headers"
     155msgstr ""
     156
     157#: parksystem.php:631
     158msgid "Active Color"
     159msgstr ""
     160
     161#: parksystem.php:635
     162msgid "Primary/active button color"
     163msgstr ""
     164
     165#: parksystem.php:640
     166msgid "Active Text Color"
     167msgstr ""
     168
     169#: parksystem.php:644
     170msgid "Text color on primary buttons"
     171msgstr ""
     172
     173#: parksystem.php:625
     174msgid "Input Text Color"
     175msgstr ""
     176
     177#: parksystem.php:629
     178msgid "Text color inside input fields"
     179msgstr ""
     180
     181#: parksystem.php:634
     182msgid "Input Border Color"
     183msgstr ""
     184
     185#: parksystem.php:638
     186msgid "Border color for input fields"
     187msgstr ""
     188
     189#: parksystem.php:660
     190msgid "Card Border Color"
     191msgstr ""
     192
     193#: parksystem.php:664
     194msgid "Border color for card elements"
     195msgstr ""
     196
     197#: parksystem.php:681
     198msgid "Error Color"
     199msgstr ""
     200
     201#: parksystem.php:685
     202msgid "Color for error labels and messages"
     203msgstr ""
     204
    49205#: parksystem.php:658
    50 msgid "Settings"
    51 msgstr ""
    52 
    53 #: parksystem.php:207
    54 msgid "Reservation Page"
    55 msgstr ""
    56 
    57 #: parksystem.php:213
    58 msgid "Widgets"
    59 msgstr ""
    60 
    61 #: parksystem.php:408
    62 msgid "Settings saved!"
    63 msgstr ""
    64 
    65 #: parksystem.php:428
    66 msgid "Parking Token"
    67 msgstr ""
    68 
    69 #: parksystem.php:432
    70 msgid "Parking token displayed on reservation pages"
    71 msgstr ""
    72 
    73 #: parksystem.php:437
    74 msgid "Body Background Color"
    75 msgstr ""
    76 
    77 #: parksystem.php:441
    78 msgid "Body background color for the iframe widget"
    79 msgstr ""
    80 
    81 #: parksystem.php:446
    82 msgid "Text Color"
    83 msgstr ""
    84 
    85 #: parksystem.php:450
    86 msgid "Text color for the iframe widget"
    87 msgstr ""
    88 
    89 #: parksystem.php:455
    90 msgid "Input Background Color"
    91 msgstr ""
    92 
    93 #: parksystem.php:459
    94 msgid "Background color for input fields"
    95 msgstr ""
    96 
    97 #: parksystem.php:464
    98 msgid "Label Text Color"
    99 msgstr ""
    100 
    101 #: parksystem.php:468
    102 msgid "Text color for form labels"
    103 msgstr ""
    104 
    105 #: parksystem.php:473
    106 msgid "Card Background Color"
    107 msgstr ""
    108 
    109 #: parksystem.php:477
    110 msgid "Background color for card elements"
    111 msgstr ""
    112 
    113 #: parksystem.php:482
    114 msgid "Input Hover Background Color"
    115 msgstr ""
    116 
    117 #: parksystem.php:486
    118 msgid "Background color for input fields on hover"
    119 msgstr ""
    120 
    121 #: parksystem.php:491
    122206msgid "Page Template"
    123207msgstr ""
    124208
    125 #: parksystem.php:502
     209#: parksystem.php:669
    126210msgid "Page template to use for ParkSystem widget pages (/rezerwuj/ and /potwierdzenie/)"
    127211msgstr ""
    128212
    129 #: parksystem.php:528
     213#: parksystem.php:695
    130214msgid "Redirecting..."
    131215msgstr ""
    132216
    133 #: parksystem.php:528
     217#: parksystem.php:695
    134218msgid "Click here if you are not redirected."
    135219msgstr ""
    136220
    137 #: parksystem.php:546
     221#: parksystem.php:713
    138222msgid "Pricing Widget"
    139223msgstr ""
    140224
    141 #: parksystem.php:548
     225#: parksystem.php:715
    142226msgid "Display pricing table with optional parameters: min_days, max_days, date, iframe_id"
    143227msgstr ""
    144228
    145 #: parksystem.php:552
     229#: parksystem.php:719
    146230msgid "Reservation Form Widget"
    147231msgstr ""
    148232
    149 #: parksystem.php:554
     233#: parksystem.php:721
    150234msgid "Display reservation form with optional parameter: iframe_id"
    151235msgstr ""
    152236
    153 #: parksystem.php:560
     237#: parksystem.php:727
    154238msgid "ParkSystem Widgets"
    155239msgstr ""
    156240
    157 #: parksystem.php:561
     241#: parksystem.php:728
    158242msgid "Copy the widget codes below and paste them into your posts, pages, or widgets."
    159243msgstr ""
    160244
    161 #: parksystem.php:570
     245#: parksystem.php:737
    162246msgid "Basic Shortcode:"
    163247msgstr ""
    164248
    165 #: parksystem.php:586
    166 #: parksystem.php:610
     249#: parksystem.php:753
     250#: parksystem.php:777
    167251msgid "Copy"
    168252msgstr ""
    169253
    170 #: parksystem.php:594
     254#: parksystem.php:761
    171255msgid "Example with Parameters:"
    172256msgstr ""
    173257
    174 #: parksystem.php:634
     258#: parksystem.php:801
    175259msgid "Copied!"
    176260msgstr ""
    177261
    178 #: parksystem.php:643
     262#: parksystem.php:810
    179263msgid "Failed to copy. Please select and copy manually."
    180264msgstr ""
    181265
    182 #: parksystem.php:682
    183 #: parksystem.php:722
    184 #: parksystem.php:728
     266#: parksystem.php:849
     267#: parksystem.php:893
     268#: parksystem.php:899
    185269msgid "Parking token is not configured. Please set it in plugin settings."
    186270msgstr ""
    187271
    188 #: templates/block-renderer.php:41
     272#: templates/block-renderer.php:62
    189273msgid "Template not found."
    190274msgstr ""
  • parksystem/trunk/parksystem.php

    r3463491 r3486037  
    33 * Plugin Name: ParkSystem
    44 * Description: Parking management system integration - display reservation forms, confirmation pages, and pricing tables via iframe widgets from ParkSystem.online.
    5  * Version: 1.0.1
     5 * Version: 1.0.2
    66 * Author: Jakub Lasek (ParkSystem.online)
    77 * Author URI: https://parksystem.online
     
    236236            'sanitize_callback' => 'sanitize_text_field'
    237237        ));
    238         register_setting('parksystem_settings', 'parksystem_body_bg_color', array(
     238        register_setting('parksystem_settings', 'parksystem_widget_background_color', array(
    239239            'sanitize_callback' => 'sanitize_hex_color'
    240240        ));
     
    252252        ));
    253253        register_setting('parksystem_settings', 'parksystem_input_hover_bg_color', array(
     254            'sanitize_callback' => 'sanitize_hex_color'
     255        ));
     256        register_setting('parksystem_settings', 'parksystem_input_text_color', array(
     257            'sanitize_callback' => 'sanitize_hex_color'
     258        ));
     259        register_setting('parksystem_settings', 'parksystem_input_border_color', array(
     260            'sanitize_callback' => 'sanitize_hex_color'
     261        ));
     262        register_setting('parksystem_settings', 'parksystem_use_new_form', array(
     263            'sanitize_callback' => function ($value) {
     264                return !empty($value) ? '1' : '';
     265            }
     266        ));
     267        register_setting('parksystem_settings', 'parksystem_text_color_secondary', array(
     268            'sanitize_callback' => 'sanitize_hex_color'
     269        ));
     270        register_setting('parksystem_settings', 'parksystem_card_text_color', array(
     271            'sanitize_callback' => 'sanitize_hex_color'
     272        ));
     273        register_setting('parksystem_settings', 'parksystem_card_header_text_color', array(
     274            'sanitize_callback' => 'sanitize_hex_color'
     275        ));
     276        register_setting('parksystem_settings', 'parksystem_active_color', array(
     277            'sanitize_callback' => 'sanitize_hex_color'
     278        ));
     279        register_setting('parksystem_settings', 'parksystem_active_text_color', array(
     280            'sanitize_callback' => 'sanitize_hex_color'
     281        ));
     282        register_setting('parksystem_settings', 'parksystem_card_border_color', array(
     283            'sanitize_callback' => 'sanitize_hex_color'
     284        ));
     285        register_setting('parksystem_settings', 'parksystem_error_color', array(
    254286            'sanitize_callback' => 'sanitize_hex_color'
    255287        ));
     
    284316        wp_enqueue_script('jquery');
    285317
    286         // Add inline script for color picker initialization
     318        // Add inline script for color picker initialization and new form toggle
    287319        $inline_script = "jQuery(document).ready(function($) {
    288320            $('.parksystem-color-picker').wpColorPicker();
     321            function toggleNewFormInputs() {
     322                $('.parksystem-new-form-only').toggle($('#parksystem_use_new_form').is(':checked'));
     323            }
     324            $('#parksystem_use_new_form').on('change', toggleNewFormInputs);
     325            toggleNewFormInputs();
    289326        });";
    290327        wp_add_inline_script('wp-color-picker', $inline_script);
     
    345382            function handleIframeResize() {
    346383                window.addEventListener('message', function (event) {
    347                     if (event.origin !== 'https://parksystem.online') return;
     384                    if (event.origin !== 'https://parksystem.online' && event.origin !== 'http://localhost:3000') return;
    348385
    349386                    const messageType = event.data.type;
     
    424461            }
    425462
    426             if (isset($_POST['parksystem_body_bg_color'])) {
    427                 update_option('parksystem_body_bg_color', sanitize_hex_color(wp_unslash($_POST['parksystem_body_bg_color'])));
     463            if (isset($_POST['parksystem_widget_background_color'])) {
     464                update_option('parksystem_widget_background_color', sanitize_hex_color(wp_unslash($_POST['parksystem_widget_background_color'])));
    428465            }
    429466
     
    447484                update_option('parksystem_input_hover_bg_color', sanitize_hex_color(wp_unslash($_POST['parksystem_input_hover_bg_color'])));
    448485            }
     486            if (isset($_POST['parksystem_input_text_color'])) {
     487                update_option('parksystem_input_text_color', sanitize_hex_color(wp_unslash($_POST['parksystem_input_text_color'])));
     488            }
     489            if (isset($_POST['parksystem_input_border_color'])) {
     490                update_option('parksystem_input_border_color', sanitize_hex_color(wp_unslash($_POST['parksystem_input_border_color'])));
     491            }
     492
     493            update_option('parksystem_use_new_form', isset($_POST['parksystem_use_new_form']) ? '1' : '');
     494
     495            if (isset($_POST['parksystem_text_color_secondary'])) {
     496                update_option('parksystem_text_color_secondary', sanitize_hex_color(wp_unslash($_POST['parksystem_text_color_secondary'])));
     497            }
     498            if (isset($_POST['parksystem_card_text_color'])) {
     499                update_option('parksystem_card_text_color', sanitize_hex_color(wp_unslash($_POST['parksystem_card_text_color'])));
     500            }
     501            if (isset($_POST['parksystem_card_header_text_color'])) {
     502                update_option('parksystem_card_header_text_color', sanitize_hex_color(wp_unslash($_POST['parksystem_card_header_text_color'])));
     503            }
     504            if (isset($_POST['parksystem_active_color'])) {
     505                update_option('parksystem_active_color', sanitize_hex_color(wp_unslash($_POST['parksystem_active_color'])));
     506            }
     507            if (isset($_POST['parksystem_active_text_color'])) {
     508                update_option('parksystem_active_text_color', sanitize_hex_color(wp_unslash($_POST['parksystem_active_text_color'])));
     509            }
     510            if (isset($_POST['parksystem_card_border_color'])) {
     511                update_option('parksystem_card_border_color', sanitize_hex_color(wp_unslash($_POST['parksystem_card_border_color'])));
     512            }
     513            if (isset($_POST['parksystem_error_color'])) {
     514                update_option('parksystem_error_color', sanitize_hex_color(wp_unslash($_POST['parksystem_error_color'])));
     515            }
    449516
    450517            // Flush rewrite rules to ensure custom routes work
     
    456523        $parking_token = get_option('parksystem_parking_token', '');
    457524        $page_template = get_option('parksystem_page_template', '');
    458         $body_bg_color = get_option('parksystem_body_bg_color', '');
     525        $widget_background_color = get_option('parksystem_widget_background_color', '');
    459526        $text_color = get_option('parksystem_text_color', '');
    460527        $input_bg_color = get_option('parksystem_input_bg_color', '');
     
    462529        $card_bg_color = get_option('parksystem_card_bg_color', '');
    463530        $input_hover_bg_color = get_option('parksystem_input_hover_bg_color', '');
     531        $input_text_color = get_option('parksystem_input_text_color', '');
     532        $input_border_color = get_option('parksystem_input_border_color', '');
     533        $use_new_form = get_option('parksystem_use_new_form', '');
     534        $text_color_secondary = get_option('parksystem_text_color_secondary', '');
     535        $card_text_color = get_option('parksystem_card_text_color', '');
     536        $card_header_text_color = get_option('parksystem_card_header_text_color', '');
     537        $active_color = get_option('parksystem_active_color', '');
     538        $active_text_color = get_option('parksystem_active_text_color', '');
     539        $card_border_color = get_option('parksystem_card_border_color', '');
     540        $error_color = get_option('parksystem_error_color', '');
    464541        $available_templates = $this->get_available_page_templates();
    465542?>
     
    480557                    <tr>
    481558                        <th scope="row">
    482                             <label for="parksystem_body_bg_color"><?php esc_html_e('Body Background Color', 'parksystem'); ?></label>
    483                         </th>
    484                         <td>
    485                             <input type="text" id="parksystem_body_bg_color" name="parksystem_body_bg_color" value="<?php echo esc_attr($body_bg_color); ?>" class="parksystem-color-picker" />
     559                            <label for="parksystem_use_new_form"><?php esc_html_e('Use new reservation form', 'parksystem'); ?></label>
     560                        </th>
     561                        <td>
     562                            <label for="parksystem_use_new_form">
     563                                <input type="checkbox" id="parksystem_use_new_form" name="parksystem_use_new_form" value="1" <?php checked($use_new_form, '1'); ?> />
     564                                <?php esc_html_e('Use new reservation form (order2)', 'parksystem'); ?>
     565                            </label>
     566                            <p class="description"><?php esc_html_e('Enable the new reservation form with additional styling options', 'parksystem'); ?></p>
     567                        </td>
     568                    </tr>
     569                    <tr>
     570                        <th scope="row">
     571                            <label for="parksystem_widget_background_color"><?php esc_html_e('Widget Body Background Color', 'parksystem'); ?></label>
     572                        </th>
     573                        <td>
     574                            <input type="text" id="parksystem_widget_background_color" name="parksystem_widget_background_color" value="<?php echo esc_attr($widget_background_color); ?>" class="parksystem-color-picker" />
    486575                            <p class="description"><?php esc_html_e('Body background color for the iframe widget', 'parksystem'); ?></p>
    487576                        </td>
     
    530619                            <input type="text" id="parksystem_input_hover_bg_color" name="parksystem_input_hover_bg_color" value="<?php echo esc_attr($input_hover_bg_color); ?>" class="parksystem-color-picker" />
    531620                            <p class="description"><?php esc_html_e('Background color for input fields on hover', 'parksystem'); ?></p>
     621                        </td>
     622                    </tr>
     623                    <tr class="parksystem-new-form-only" style="<?php echo $use_new_form ? '' : 'display:none'; ?>">
     624                        <th scope="row">
     625                            <label for="parksystem_input_text_color"><?php esc_html_e('Input Text Color', 'parksystem'); ?></label>
     626                        </th>
     627                        <td>
     628                            <input type="text" id="parksystem_input_text_color" name="parksystem_input_text_color" value="<?php echo esc_attr($input_text_color); ?>" class="parksystem-color-picker" />
     629                            <p class="description"><?php esc_html_e('Text color inside input fields', 'parksystem'); ?></p>
     630                        </td>
     631                    </tr>
     632                    <tr class="parksystem-new-form-only" style="<?php echo $use_new_form ? '' : 'display:none'; ?>">
     633                        <th scope="row">
     634                            <label for="parksystem_input_border_color"><?php esc_html_e('Input Border Color', 'parksystem'); ?></label>
     635                        </th>
     636                        <td>
     637                            <input type="text" id="parksystem_input_border_color" name="parksystem_input_border_color" value="<?php echo esc_attr($input_border_color); ?>" class="parksystem-color-picker" />
     638                            <p class="description"><?php esc_html_e('Border color for input fields', 'parksystem'); ?></p>
     639                        </td>
     640                    </tr>
     641                    <tr class="parksystem-new-form-only" style="<?php echo $use_new_form ? '' : 'display:none'; ?>">
     642                        <th scope="row">
     643                            <label for="parksystem_text_color_secondary"><?php esc_html_e('Secondary Text Color', 'parksystem'); ?></label>
     644                        </th>
     645                        <td>
     646                            <input type="text" id="parksystem_text_color_secondary" name="parksystem_text_color_secondary" value="<?php echo esc_attr($text_color_secondary); ?>" class="parksystem-color-picker" />
     647                            <p class="description"><?php esc_html_e('Secondary text color for the iframe widget', 'parksystem'); ?></p>
     648                        </td>
     649                    </tr>
     650                    <tr class="parksystem-new-form-only" style="<?php echo $use_new_form ? '' : 'display:none'; ?>">
     651                        <th scope="row">
     652                            <label for="parksystem_card_text_color"><?php esc_html_e('Card Text Color', 'parksystem'); ?></label>
     653                        </th>
     654                        <td>
     655                            <input type="text" id="parksystem_card_text_color" name="parksystem_card_text_color" value="<?php echo esc_attr($card_text_color); ?>" class="parksystem-color-picker" />
     656                            <p class="description"><?php esc_html_e('Text color for card body content', 'parksystem'); ?></p>
     657                        </td>
     658                    </tr>
     659                    <tr class="parksystem-new-form-only" style="<?php echo $use_new_form ? '' : 'display:none'; ?>">
     660                        <th scope="row">
     661                            <label for="parksystem_card_header_text_color"><?php esc_html_e('Card Header Text Color', 'parksystem'); ?></label>
     662                        </th>
     663                        <td>
     664                            <input type="text" id="parksystem_card_header_text_color" name="parksystem_card_header_text_color" value="<?php echo esc_attr($card_header_text_color); ?>" class="parksystem-color-picker" />
     665                            <p class="description"><?php esc_html_e('Text color for card headers', 'parksystem'); ?></p>
     666                        </td>
     667                    </tr>
     668                    <tr class="parksystem-new-form-only" style="<?php echo $use_new_form ? '' : 'display:none'; ?>">
     669                        <th scope="row">
     670                            <label for="parksystem_active_color"><?php esc_html_e('Active Color', 'parksystem'); ?></label>
     671                        </th>
     672                        <td>
     673                            <input type="text" id="parksystem_active_color" name="parksystem_active_color" value="<?php echo esc_attr($active_color); ?>" class="parksystem-color-picker" />
     674                            <p class="description"><?php esc_html_e('Primary/active button color', 'parksystem'); ?></p>
     675                        </td>
     676                    </tr>
     677                    <tr class="parksystem-new-form-only" style="<?php echo $use_new_form ? '' : 'display:none'; ?>">
     678                        <th scope="row">
     679                            <label for="parksystem_active_text_color"><?php esc_html_e('Active Text Color', 'parksystem'); ?></label>
     680                        </th>
     681                        <td>
     682                            <input type="text" id="parksystem_active_text_color" name="parksystem_active_text_color" value="<?php echo esc_attr($active_text_color); ?>" class="parksystem-color-picker" />
     683                            <p class="description"><?php esc_html_e('Text color on primary buttons', 'parksystem'); ?></p>
     684                        </td>
     685                    </tr>
     686                    <tr class="parksystem-new-form-only" style="<?php echo $use_new_form ? '' : 'display:none'; ?>">
     687                        <th scope="row">
     688                            <label for="parksystem_card_border_color"><?php esc_html_e('Card Border Color', 'parksystem'); ?></label>
     689                        </th>
     690                        <td>
     691                            <input type="text" id="parksystem_card_border_color" name="parksystem_card_border_color" value="<?php echo esc_attr($card_border_color); ?>" class="parksystem-color-picker" />
     692                            <p class="description"><?php esc_html_e('Border color for card elements', 'parksystem'); ?></p>
     693                        </td>
     694                    </tr>
     695                    <tr class="parksystem-new-form-only" style="<?php echo $use_new_form ? '' : 'display:none'; ?>">
     696                        <th scope="row">
     697                            <label for="parksystem_error_color"><?php esc_html_e('Error Color', 'parksystem'); ?></label>
     698                        </th>
     699                        <td>
     700                            <input type="text" id="parksystem_error_color" name="parksystem_error_color" value="<?php echo esc_attr($error_color); ?>" class="parksystem-color-picker" />
     701                            <p class="description"><?php esc_html_e('Color for error labels and messages', 'parksystem'); ?></p>
    532702                        </td>
    533703                    </tr>
     
    8921062        }
    8931063
    894         $body_bg_color = get_option('parksystem_body_bg_color', '');
     1064        $widget_background_color = get_option('parksystem_widget_background_color', '');
    8951065        $text_color = get_option('parksystem_text_color', '');
    8961066        $input_bg_color = get_option('parksystem_input_bg_color', '');
     1067        $input_hover_bg_color = get_option('parksystem_input_hover_bg_color', '');
     1068        $input_text_color = get_option('parksystem_input_text_color', '');
     1069        $input_border_color = get_option('parksystem_input_border_color', '');
    8971070        $label_text_color = get_option('parksystem_label_text_color', '');
    8981071        $card_bg_color = get_option('parksystem_card_bg_color', '');
    899         $input_hover_bg_color = get_option('parksystem_input_hover_bg_color', '');
     1072        $text_color_secondary = get_option('parksystem_text_color_secondary', '');
     1073        $card_text_color = get_option('parksystem_card_text_color', '');
     1074        $card_header_text_color = get_option('parksystem_card_header_text_color', '');
     1075        $active_color = get_option('parksystem_active_color', '');
     1076        $active_text_color = get_option('parksystem_active_text_color', '');
     1077        $card_border_color = get_option('parksystem_card_border_color', '');
     1078        $error_color = get_option('parksystem_error_color', '');
    9001079
    9011080        $iframeParams = array(
     
    9041083
    9051084        // Add color parameters if they are not blank
    906         if (!empty($body_bg_color)) {
    907             $iframeParams['body_bg_color'] = $body_bg_color;
     1085        if (!empty($widget_background_color)) {
     1086            $iframeParams['body_bg_color'] = $widget_background_color;
    9081087        }
    9091088        if (!empty($text_color)) {
     
    9211100        if (!empty($input_hover_bg_color)) {
    9221101            $iframeParams['input_hover_bg_color'] = $input_hover_bg_color;
     1102        }
     1103        if (!empty($input_text_color)) {
     1104            $iframeParams['input_text_color'] = $input_text_color;
     1105        }
     1106        if (!empty($input_border_color)) {
     1107            $iframeParams['input_border_color'] = $input_border_color;
     1108        }
     1109        if (!empty($text_color_secondary)) {
     1110            $iframeParams['text_color_secondary'] = $text_color_secondary;
     1111        }
     1112        if (!empty($card_text_color)) {
     1113            $iframeParams['card_text_color'] = $card_text_color;
     1114        }
     1115        if (!empty($card_header_text_color)) {
     1116            $iframeParams['card_header_text_color'] = $card_header_text_color;
     1117        }
     1118        if (!empty($active_color)) {
     1119            $iframeParams['active_color'] = $active_color;
     1120        }
     1121        if (!empty($active_text_color)) {
     1122            $iframeParams['active_text_color'] = $active_text_color;
     1123        }
     1124        if (!empty($card_border_color)) {
     1125            $iframeParams['card_border_color'] = $card_border_color;
     1126        }
     1127        if (!empty($error_color)) {
     1128            $iframeParams['error_color'] = $error_color;
    9231129        }
    9241130
     
    9381144        }
    9391145
     1146        $use_new_form = get_option('parksystem_use_new_form', '');
     1147        $order_path = $use_new_form ? '/order2' : '/order';
     1148
    9401149        $parking_token_sanitized = sanitize_text_field($parking_token);
    941         $iframe_url = 'https://parksystem.online/widget/' . $parking_token_sanitized . '/order';
     1150        $iframe_url = 'https://parksystem.online/widget/' . $parking_token_sanitized . $order_path;
    9421151
    9431152        if (!empty($iframeParams)) {
  • parksystem/trunk/readme.txt

    r3463514 r3486037  
    44Requires at least: 5.0
    55Tested up to: 6.9
    6 Stable tag: 1.0.1
     6Stable tag: 1.0.2
    77Requires PHP: 7.4
    88License: GPL2
     
    4545== Changelog ==
    4646
     47= 1.0.2 =
     48* Add optional new reservation form (order2) with toggle in settings
     49* Add extended styling options for new form: input text/border colors, secondary text, card text/header/border colors, active/error colors
     50* Rename "Body Background Color" to "Widget Body Background Color"
     51* Add localhost origin support for iframe message handling (development)
     52* Update Polish translations
     53
    4754= 1.0.1 =
    4855* Improved code organization and WordPress coding standards compliance
     
    6269== Upgrade Notice ==
    6370
     71= 1.0.2 =
     72Adds new reservation form option with extended styling controls. Enable in ParkSystem > Settings.
     73
    6474= 1.0.1 =
    6575This update improves code quality and WordPress standards compliance. No action required.
Note: See TracChangeset for help on using the changeset viewer.