Plugin Directory

Changeset 3145292


Ignore:
Timestamp:
09/02/2024 11:39:13 AM (19 months ago)
Author:
Tussendoor
Message:

##### 5.0.5

  • Fixed: Check whether dateTime is compatible with Carbon Parse.
  • Removed: Older styles where enqueued.
  • Update: Stats now use v2 enpoints.
  • Update: Stability improvements on activating plugin with license.
  • Update: Stability improvements in JavaScript.
  • Update: Readme.md.
Location:
open-rdw-kenteken-voertuiginformatie/trunk
Files:
15 edited

Legend:

Unmodified
Added
Removed
  • open-rdw-kenteken-voertuiginformatie/trunk/admin/AdminDashboard.php

    r3139037 r3145292  
    4444        add_action('wp_ajax_rdw_save_changes', [$this, 'rdw_save_changes']);
    4545
    46         add_action('wp_enqueue_scripts', [$this, 'add_tinymce_form']);
     46        add_action('admin_enqueue_scripts', [$this, 'add_tinymce_form']);
    4747        add_filter('mce_buttons', [$this, 'add_tinymce_button']);
    4848        add_filter('mce_external_plugins', [$this, 'register_tinymce_button']);
     
    5252        add_action('wp_ajax_open-rdw-notice-dismiss', [$this, 'admin_notice_dismiss']);
    5353
    54         // if ($license_info = $this->rdw_lisence_check(get_option('puc_license_rdw'))) {
    55         //     if ($license_info->license != 'valid') {
    56         //         $this->license_info = $license_info;
    57         //         add_action('admin_init', [$this, 'notices']);
    58         //     }
    59         // }
     54        if ($license_info = $this->rdw_lisence_check(get_option('puc_license_rdw'))) {
     55            if ($license_info->license != 'valid') {
     56                $this->license_info = $license_info;
     57                add_action('admin_init', [$this, 'notices']);
     58            }
     59        }
    6060
    6161        if (isset($_POST['rdw_formatter_save']) && !empty($_POST['rdw_formatter_save'])) {
     
    8787        $now = Carbon::now();
    8888        update_option('open-rdw-notice-dismissed', $now->addDay()->toDateString());
     89        return wp_send_json_success();
    8990    }
    9091
     
    224225    {
    225226        $view = new TinyMceDisplay();
     227
    226228        return $view->render();
    227229    }
     
    235237    {
    236238        wp_enqueue_style(self::$plugin_name, plugin_dir_url(__FILE__) . 'css/open-rdw-kenteken-voertuiginformatie-admin.css', []);
    237     }
    238 
    239     /**
    240      * Register the JavaScript for the admin area.
    241      *
    242      * @since    2.0.0
    243      */
    244     public function enqueue_scripts()
    245     {
    246         wp_enqueue_script(self::$plugin_name, plugin_dir_url(__FILE__) . 'js/open-rdw-kenteken-voertuiginformatie-admin.js', [ 'jquery' ], MainConfig::get('plugin.version'), true);
    247239    }
    248240
  • open-rdw-kenteken-voertuiginformatie/trunk/admin/js/open-rdw-kenteken-voertuiginformatie-admin.js

    r3138718 r3145292  
    4040                });
    4141            }
    42         });
    43 
    44         /**
    45          * Makes an ajax call to the backend, letting it know the open-rdw-notice
    46          * is dismissed and should be saved as dismissed.
    47          */
    48         $(document).on('click', ".open-rdw-notice-dismiss-action", function () {
    49             $.ajax({
    50                 url: ajaxurl,
    51                 data: {
    52                     action: "open-rdw-notice-dismiss",
    53                 },
    54             });
    5542        });
    5643
  • open-rdw-kenteken-voertuiginformatie/trunk/admin/logs/log.txt

    r3138769 r3145292  
    662024-08-21 06:25:17 - Open RDW PRO activation..
    772024-08-21 06:25:17 - Open RDW PRO activated.
     82024-08-27 10:32:10 - Deactivating Open RDW PRO. Byebye!
     92024-08-27 12:20:34 - Open RDW PRO activation..
     102024-08-27 12:20:34 - Open RDW PRO activated.
  • open-rdw-kenteken-voertuiginformatie/trunk/app/Api.php

    r3139133 r3145292  
    2828    public function getTussendoorToken(bool $force = false): string
    2929    {
    30         if (($force === true) || (get_option('tussendoor_token', '') === '')) {
     30        if (($force === true) || (get_option('tussendoor_token', false) === false)) {
    3131
    3232            $args = array(
     
    3535                ),
    3636                'body' => array(
    37                     'license'       => get_option('tussendoor_rdw_license'),
     37                    'license'       => get_option('rdw_tsd_license'),
    3838                    'host'          => get_site_url()
    3939                )
     
    4545            );
    4646
    47             if (wp_remote_retrieve_response_code($request) == 201) {
     47            if (wp_remote_retrieve_response_code($request) === 201) {
    4848                $response = json_decode(wp_remote_retrieve_body($request), true);
    4949                update_option('tussendoor_token', $response['token']);
     
    126126        }
    127127
    128         if (wp_remote_retrieve_response_code($response) == 401) {
    129             $this->getTussendoorToken(true);
    130             $this->call($url, $authorization, $method, $body);
    131         }
    132 
    133128        $data = json_decode(($response['body']), true);
    134129
  • open-rdw-kenteken-voertuiginformatie/trunk/app/Http/Controllers/SettingsController.php

    r3139133 r3145292  
    44
    55use App\Api;
     6use Exception;
    67use App\Updater;
    78use App\MainConfig;
     
    7879            $this->removeOldSettings();
    7980        } catch (\Exception $e) {
    80             $errorResponse['message'] = esc_html__('Er is iets mis gegaan met het opslaan van de instellingen. Neem contact op met Tussendoor B.V. wanneer de fout zich voor blijft doen.');
     81            $errorResponse['message'] = esc_html__('TSD005: Er is iets mis gegaan met het opslaan van de instellingen. Neem contact op met Tussendoor B.V. wanneer de fout zich voor blijft doen.');
    8182
    8283            if (WP_DEBUG) {
     
    99100    public function registerPlugin()
    100101    {
     102        $request = Request::fromGlobal();
     103
     104        add_filter('https_ssl_verify', '__return_false');
     105
    101106        try {
    102             $request = Request::fromGlobal();
    103 
    104             $args = array(
    105                 'headers' => array(
     107            $args = [
     108                'headers' => [
    106109                    'Content-Type'  => 'application/x-www-form-urlencoded',
    107                 ),
    108                 'body' => array(
     110                ],
     111                'body' => [
    109112                    'id'            => '24',
    110113                    'action'        => 'check_license',
    111114                    'license'       => $request->getString('license'),
    112115                    'host'          => get_site_url()
    113                 )
    114             );
     116                ]
     117            ];
    115118
    116119            $response = wp_remote_get(
     
    119122            );
    120123
    121             $licenseStatus = json_decode($response['body'])->license;
    122 
    123             if ($licenseStatus != 'valid') {
    124                 throw new \Exception();
     124            if (wp_remote_retrieve_response_code($response) !== 200) {
     125                throw new Exception();
    125126            }
    126127        } catch (\Exception $e) {
    127             wp_send_json_error(Updater::getNoticeMessage(), 500);
     128            $errorResponse['message'] = esc_html__('TSD006: De Tussendoor API gaf een foutmelding terug. Neem contact op met Tussendoor B.V. wanneer de fout zich voor blijft doen.', 'tussendoor-rdw');
     129
     130            if (WP_DEBUG) {
     131                $errorResponse['debug'] = 'WP_DEBUG(TSD006) : ' . $e->getMessage();
     132            }
     133
     134            return wp_send_json_error($errorResponse['message'], 500);
    128135        }
    129136
    130         $api = new Api;
    131         $api->getTussendoorToken(true);
     137        $licenseStatus = json_decode($response['body'])->license;
    132138
    133139        update_option('tsd_rdw_license_status', $licenseStatus);
    134140        update_option('rdw_tsd_license', $request->getString('license'));
    135141
    136         wp_send_json_success(Updater::getNoticeMessage());
     142        if ($licenseStatus == 'valid') {
     143            $api = new Api;
     144            $api->getTussendoorToken(true);
     145            return wp_send_json_success(Updater::getNoticeMessage());
     146        }
     147
     148        return wp_send_json_error(Updater::getNoticeMessage(), 500);
    137149    }
    138150
  • open-rdw-kenteken-voertuiginformatie/trunk/app/Http/Kernel.php

    r3138718 r3145292  
    165165        $plugin_admin = new AdminDashboard(self::getPluginName(), self::getPluginVersion());
    166166
    167         $this->loader->add_action('admin_enqueue_scripts', $plugin_admin, 'enqueue_styles');
    168         $this->loader->add_action('admin_enqueue_scripts', $plugin_admin, 'enqueue_scripts');
     167        $this->loader->add_action('wp_enqueue_scripts', $plugin_admin, 'enqueue_scripts');
    169168
    170169        return $this->routerManager->filter('register_main_routers', [
  • open-rdw-kenteken-voertuiginformatie/trunk/app/Models/History.php

    r3138718 r3145292  
    1212        $api = new Api;
    1313        $authorization = $api->getTussendoorToken();
    14         $url = MainConfig::get('api.url') . '/api/plugin/rdw/v1/stats/month';
     14        $url = MainConfig::get('api.url') . MainConfig::get('api.endpoints.stats.month');
    1515
    1616        try {
     
    2929        $api = new Api;
    3030        $authorization = $api->getTussendoorToken();
    31         $url = MainConfig::get('api.url') . '/api/plugin/rdw/v1/stats/today';
     31        $url = MainConfig::get('api.url') . MainConfig::get('api.endpoints.stats.today');
    3232
    3333        try {
  • open-rdw-kenteken-voertuiginformatie/trunk/assets/admin/css/tussendoor.css

    r3138718 r3145292  
    22
    33#tussendoor {
    4     font-family : 'Poppins', sans-serif;
    5     margin-left : -20px;
     4    font-family: 'Poppins', sans-serif;
     5    margin-left: -20px;
    66}
    77
    88#tussendoor .card-header {
    9     position       : relative;
    10     z-index        : 1;
    11     padding-bottom : 20px !important;
     9    position: relative;
     10    z-index: 1;
     11    padding-bottom: 20px !important;
    1212}
    1313
    1414#tussendoor .card-footer {
    15     position    : relative;
    16     z-index     : 1;
    17     padding-top : 20px !important;
     15    position: relative;
     16    z-index: 1;
     17    padding-top: 20px !important;
    1818}
    1919
    2020#tussendoor .card-header::after {
    21     position         : absolute;
    22     bottom           : 0;
    23     top              : -3rem;
    24     left             : -3rem;
    25     right            : -3rem;
    26     background-color : #f3f3f3;
    27     content          : '';
    28     z-index          : -1;
     21    position: absolute;
     22    bottom: 0;
     23    top: -3rem;
     24    left: -3rem;
     25    right: -3rem;
     26    background-color: #f3f3f3;
     27    content: '';
     28    z-index: -1;
    2929}
    3030
    3131#tussendoor .card-footer::after {
    32     position         : absolute;
    33     bottom           : -3rem;
    34     top              : 0;
    35     left             : -3rem;
    36     right            : -3rem;
    37     background-color : #f3f3f3;
    38     content          : '';
    39     z-index          : -1;
     32    position: absolute;
     33    bottom: -3rem;
     34    top: 0;
     35    left: -3rem;
     36    right: -3rem;
     37    background-color: #f3f3f3;
     38    content: '';
     39    z-index: -1;
    4040}
    4141
    4242#tussendoor .tab-pane {
    43     padding-bottom : 40px;
     43    padding-bottom: 40px;
    4444}
    4545
    4646#tussendoor .u-overflow-hidden {
    47     overflow : hidden;
     47    overflow: hidden;
    4848}
    4949
    5050.wp-core-ui #tussendoor select {
    51     max-width : unset;
     51    max-width: unset;
    5252}
    5353
    5454#tussendoor [data-toggle="tooltip"] {
    55     cursor : pointer;
     55    cursor: pointer;
    5656}
    5757
    5858#tussendoor .alert-container>div:not(.tussendoor-notice) {
    59     display : none !important;
     59    display: none !important;
    6060}
    6161
    6262.tussendoor-tooltip.show {
    63     opacity : 1 !important;
     63    opacity: 1 !important;
    6464}
    6565
    6666.tussendoor-tooltip .tooltip-inner {
    67     font-size        : 12px;
    68     background-color : var(--bs-primary);
    69     opacity          : 1 !important;
    70     max-width        : 350px;
     67    font-size: 12px;
     68    background-color: var(--bs-primary);
     69    opacity: 1 !important;
     70    max-width: 350px;
    7171}
    7272
    7373.tussendoor-tooltip .tooltip-arrow::before {
    74     border-top-color : var(--bs-primary) !important;
     74    border-top-color: var(--bs-primary) !important;
    7575}
    7676
    7777.tussendoor-tooltip.tussendoor-warning .tooltip-inner {
    78     background-color : var(--bs-warning);
    79     color            : black;
     78    background-color: var(--bs-warning);
     79    color: black;
    8080}
    8181
    8282.tussendoor-tooltip.tussendoor-warning .tooltip-arrow::before {
    83     border-top-color : var(--bs-warning) !important;
     83    border-top-color: var(--bs-warning) !important;
    8484}
    8585
    8686.tussendoor-tooltip.tussendoor-info .tooltip-inner {
    87     background-color : var(--bs-info);
     87    background-color: var(--bs-info);
    8888}
    8989
    9090.tussendoor-tooltip.tussendoor-info .tooltip-arrow::before {
    91     border-top-color : var(--bs-info) !important;
     91    border-top-color: var(--bs-info) !important;
    9292}
    9393
    9494.tussendoor-tooltip.tussendoor-danger .tooltip-inner {
    95     background-color : var(--bs-danger);
     95    background-color: var(--bs-danger);
    9696}
    9797
    9898.tussendoor-tooltip.tussendoor-danger .tooltip-arrow::before {
    99     border-top-color : var(--bs-danger) !important;
     99    border-top-color: var(--bs-danger) !important;
    100100}
    101101
    102102#tussendoor .input-group-prepend {
    103     min-width : 335px !important;
     103    min-width: 335px !important;
    104104}
    105105
     
    108108#tussendoor .input-group textarea,
    109109#tussendoor .input-group select {
    110     border-radius : 0 4px 4px 0;
    111     box-shadow    : inset 0px 0px 0px 1px #eff5ff;
     110    border-radius: 0 4px 4px 0;
     111    box-shadow: inset 0px 0px 0px 1px #eff5ff;
    112112}
    113113
    114114#tussendoor .input-group select,
    115115#tussendoor .input-group input[type="number"] {
    116     min-width : 320px;
     116    min-width: 320px;
    117117}
    118118
    119119#tussendoor label.input-group-text {
    120     border-top-right-radius    : 0;
    121     border-bottom-right-radius : 0;
     120    border-top-right-radius: 0;
     121    border-bottom-right-radius: 0;
    122122}
    123123
    124124#tussendoor .custom-control-label::before {
    125     box-shadow : none;
     125    box-shadow: none;
    126126}
    127127
    128128#tussendoor .btn-primary {
    129     background-color : #2C80FF;
    130     border-color     : #2C80FF;
    131     color            : white;
     129    background-color: #2C80FF;
     130    border-color: #2C80FF;
     131    color: white;
    132132}
    133133
    134134#tussendoor .btn-xs {
    135     --bs-btn-padding-y     : 0.15rem;
    136     --bs-btn-padding-x     : 0.35rem;
    137     --bs-btn-font-size     : 0.7rem;
    138     --bs-btn-border-radius : 0.25rem;
     135    --bs-btn-padding-y: 0.15rem;
     136    --bs-btn-padding-x: 0.35rem;
     137    --bs-btn-font-size: 0.7rem;
     138    --bs-btn-border-radius: 0.25rem;
    139139}
    140140
    141141#tussendoor button:disabled {
    142     cursor         : not-allowed;
    143     pointer-events : all !important;
     142    cursor: not-allowed;
     143    pointer-events: all !important;
    144144}
    145145
    146146#tussendoor .fs-7 {
    147     font-size : 0.8rem;
     147    font-size: 0.8rem;
    148148}
    149149
    150150#tussendoor .text-primary {
    151     color : #2C80FF !important;
     151    color: #2C80FF !important;
    152152}
    153153
    154154#tussendoor a:not(.btn) {
    155     color : #2C80FF;
     155    color: #2C80FF;
    156156}
    157157
    158158#tussendoor .ui-sortable li {
    159     cursor : grab;
     159    cursor: grab;
    160160}
    161161
    162162#tussendoor .custom-bg-light {
    163     background-color : #eff5ff;
     163    background-color: #eff5ff;
    164164}
    165165
    166166#tussendoor .custom-bg-light {
    167     background-color : #f7faff;
     167    background-color: #f7faff;
    168168}
    169169
    170170#tussendoor .cursor-pointer {
    171     cursor : pointer;
     171    cursor: pointer;
    172172}
    173173
    174174#tussendoor .custom-main-card {
    175     min-width  : 100%;
    176     min-height : 75%
     175    min-width: 100%;
     176    min-height: 75%
    177177}
    178178
    179179#tussendoor .custom-text-height-1 {
    180     display            : -webkit-box;
    181     -webkit-line-clamp : 1;
    182     -webkit-box-orient : vertical;
    183     overflow           : hidden;
     180    display: -webkit-box;
     181    -webkit-line-clamp: 1;
     182    -webkit-box-orient: vertical;
     183    overflow: hidden;
    184184}
    185185
    186186#tussendoor .custom-text-height-2 {
    187     display            : -webkit-box;
    188     -webkit-line-clamp : 2;
    189     -webkit-box-orient : vertical;
    190     overflow           : hidden;
     187    display: -webkit-box;
     188    -webkit-line-clamp: 2;
     189    -webkit-box-orient: vertical;
     190    overflow: hidden;
    191191}
    192192
    193193#tussendoor .custom-min-view-height-100 {
    194     min-height : 100vh;
     194    min-height: 100vh;
    195195}
    196196
    197197#tussendoor .custom-min-view-height-90 {
    198     min-height : 90vh;
     198    min-height: 90vh;
    199199}
    200200
    201201#tussendoor .custom--center-align {
    202     position  : absolute;
    203     left      : 50%;
    204     top       : 50%;
    205     transform : translate(-50%, -50%);
     202    position: absolute;
     203    left: 50%;
     204    top: 50%;
     205    transform: translate(-50%, -50%);
    206206}
    207207
    208208#tussendoor .tab-title h3 {
    209     font-size : 20px;
     209    font-size: 20px;
    210210}
    211211
    212212#tussendoor .tab-title h4 {
    213     font-size : 18px;
     213    font-size: 18px;
    214214}
    215215
    216216#tussendoor .wizard .tab-content {
    217     padding-bottom : 100px !important;
     217    padding-bottom: 100px !important;
    218218}
    219219
    220220#tussendoor .card-footer-content .custom-button-width {
    221     width : 100px;
     221    width: 100px;
    222222}
    223223
    224224#tussendoor .card-footer-content .custom-button-width.feedback {
    225     width : 105px;
     225    width: 105px;
    226226}
    227227
    228228#tussendoor .card-header .card-title {
    229     font-size : 30px;
     229    font-size: 30px;
    230230}
    231231
    232232#tussendoor .card-header .notice-dismiss {
    233     position : relative;
    234     padding  : 0px;
     233    position: relative;
     234    padding: 0px;
    235235}
    236236
    237237#tussendoor .card-header .alert-container {
    238     display        : flex;
    239     flex-direction : column;
     238    display: flex;
     239    flex-direction: column;
    240240}
    241241
    242242#tussendoor .card-header .notice,
    243243#tussendoor .card-header .alert {
    244     width : fit-content;
     244    width: fit-content;
    245245}
    246246
    247247#tussendoor .card-header .notice {
    248     margin-left              : 0px;
    249     margin-bottom            : 0px;
    250     --bs-alert-bg            : transparent;
    251     --bs-alert-padding-x     : 12px;
    252     --bs-alert-padding-y     : 12px;
    253     --bs-alert-margin-bottom : 1rem;
    254     --bs-alert-color         : inherit;
    255     --bs-alert-border-color  : transparent;
    256     --bs-alert-border        : 1px solid var(--bs-alert-border-color);
    257     --bs-alert-border-radius : 0.375rem;
    258     position                 : relative;
    259     padding                  : var(--bs-alert-padding-y) var(--bs-alert-padding-x);
    260     margin-bottom            : var(--bs-alert-margin-bottom);
    261     color                    : var(--bs-alert-color);
    262     background-color         : var(--bs-alert-bg);
    263     border                   : var(--bs-alert-border);
    264     border-radius            : var(--bs-alert-border-radius);
    265     font-size                : 14px;
    266     display                  : inline-block;
     248    margin-left: 0px;
     249    margin-bottom: 0px;
     250    --bs-alert-bg: transparent;
     251    --bs-alert-padding-x: 12px;
     252    --bs-alert-padding-y: 12px;
     253    --bs-alert-margin-bottom: 1rem;
     254    --bs-alert-color: inherit;
     255    --bs-alert-border-color: transparent;
     256    --bs-alert-border: 1px solid var(--bs-alert-border-color);
     257    --bs-alert-border-radius: 0.375rem;
     258    position: relative;
     259    padding: var(--bs-alert-padding-y) var(--bs-alert-padding-x);
     260    margin-bottom: var(--bs-alert-margin-bottom);
     261    color: var(--bs-alert-color);
     262    background-color: var(--bs-alert-bg);
     263    border: var(--bs-alert-border);
     264    border-radius: var(--bs-alert-border-radius);
     265    font-size: 14px;
     266    display: inline-block;
    267267}
    268268
    269269#tussendoor .alert.alert-sm {
    270     padding   : .5rem;
    271     font-size : 0.7rem;
     270    padding: .5rem;
     271    font-size: 0.7rem;
    272272}
    273273
    274274#tussendoor .card-header .notice-error,
    275275#tussendoor .alert-error {
    276     background-color : #f8d7da;
    277     border-color     : #f5c6cb;
    278     color            : #721c24;
     276    background-color: #f8d7da;
     277    border-color: #f5c6cb;
     278    color: #721c24;
    279279}
    280280
    281281#tussendoor .card-header .notice-warning,
    282282#tussendoor .alert-warning {
    283     color            : #856404;
    284     background-color : #fff3cd;
    285     border-color     : #ffeeba;
     283    color: #856404;
     284    background-color: #fff3cd;
     285    border-color: #ffeeba;
    286286}
    287287
    288288#tussendoor .card-header .notice-succes,
    289289#tussendoor .alert-succes {
    290     color            : #155724;
    291     background-color : #d4edda;
    292     border-color     : #c3e6cb;
     290    color: #155724;
     291    background-color: #d4edda;
     292    border-color: #c3e6cb;
    293293}
    294294
    295295#tussendoor .card-header .notice-info,
    296296#tussendoor .alert-info {
    297     color            : #004085;
    298     background-color : #cce5ff;
    299     border-color     : #b8daff;
     297    color: #004085;
     298    background-color: #cce5ff;
     299    border-color: #b8daff;
    300300}
    301301
    302302#tussendoor .card-inner-body .nav-item .nav-link {
    303     font-weight : 100 !important;
     303    font-weight: 100 !important;
    304304}
    305305
    306306#tussendoor .card-inner-body .nav-item .nav-link.active {
    307     font-weight : 500 !important;
     307    font-weight: 500 !important;
    308308}
    309309
    310310#tussendoor .card-inner-body .nav-item .nav-link:focus {
    311     outline    : 0 !important;
    312     box-shadow : none !important;
     311    outline: 0 !important;
     312    box-shadow: none !important;
    313313}
    314314
    315315#tussendoor .card-inner-body .nav-item .nav-link:hover,
    316316#tussendoor .card-inner-body .nav-item .nav-link:active {
    317     color : #007bff
     317    color: #007bff
    318318}
    319319
    320320#tussendoor #item_wrapper .item .part {
    321     width : 10%;
     321    width: 10%;
    322322}
    323323
    324324#tussendoor #item_wrapper .item .wide {
    325     width : 25%;
     325    width: 25%;
    326326}
    327327
    328328#tussendoor .dashboard-navigation {
    329     width : 250px;
     329    width: 250px;
    330330}
    331331
    332332#tussendoor .dashboard-panels {
    333     width : calc(80% - 250px - -2rem);
     333    width: calc(80% - 250px - -2rem);
    334334}
    335335
    336336#tussendoor .alert .custom--close-alert {
    337     cursor : pointer;
    338     top    : 2px;
    339     right  : 2px
     337    cursor: pointer;
     338    top: 2px;
     339    right: 2px
    340340}
    341341
    342342#tussendoor .u-hidden {
    343     display : none;
     343    display: none;
    344344}
    345345
    346346#tussendoor .badge-xs-custom {
    347     font-size : 9px;
     347    font-size: 9px;
    348348    top: 5px;
    349349}
     
    355355@media (min-width: 992px) {
    356356    #tussendoor .card .nav.flex-lg-column>li {
    357         border-bottom : 1px solid rgba(0, 0, 0, .125);
    358         margin        : 0;
     357        border-bottom: 1px solid rgba(0, 0, 0, .125);
     358        margin: 0;
    359359    }
    360360}
     361
     362#app-container .form input.error {
     363    border: 1px solid red;
     364}
     365
     366.modal.show .modal-dialog.tussendoor {
     367    transform: none;
     368    top: 15px;
     369}
     370
     371.modal-header.tussendoor {
     372    border-bottom: none;
     373}
     374
     375.modal-footer.tussendoor {
     376    border-top: none;
     377    justify-content: flex-start;
     378    margin-left: 35px;
     379    margin-bottom: 35px;
     380}
     381
     382.modal-body.tussendoor {
     383    padding: 0px 50px 0px 50px;
     384}
     385
     386#free-variant-notice {
     387    background-color: red;
     388    color: white;
     389    border-radius: 20px;
     390}
     391
     392.modal-dialog-extra {
     393    position: relative;
     394    max-width: 500px;
     395    margin-left: auto;
     396    margin-right: auto;
     397    pointer-events: none;
     398    top: -50px;
     399}
     400
     401.modal-dialog-extra #free-variant-notice {
     402    background-color: white;
     403    color: black;
     404    border-radius: 0px 0px 20px 20px;
     405    z-index: -1;
     406    padding-top: 35px;
     407}
     408
     409.accordion.tussendoor {
     410    margin-top: 25px;
     411    margin-bottom: 25px;
     412}
     413
     414.accordion-button:not(.collapsed) {
     415    color: black;
     416    background-color: gainsboro;
     417}
  • open-rdw-kenteken-voertuiginformatie/trunk/assets/admin/js/ajax.js

    r3138718 r3145292  
    2727                $('button[type="submit"]', form).removeClass('btn-success btn-danger').addClass('btn-primary');
    2828            }, 2000);
     29        });
     30    });
     31
     32
     33    /**
     34     * Makes an ajax call to the backend, letting it know the open-rdw-notice
     35     * is dismissed and should be saved as dismissed.
     36     */
     37    $(document).on('click', ".open-rdw-notice-dismiss-action", function () {
     38        $.ajax({
     39            url: ajaxurl,
     40            cache: false,
     41            type: "GET",
     42            data: {
     43                action: "open-rdw-notice-dismiss",
     44            },
    2945        });
    3046    });
  • open-rdw-kenteken-voertuiginformatie/trunk/assets/admin/js/dashboard.js

    r3138718 r3145292  
    1 jQuery(document).ready(function($) {
    2     const $document             = $(document);
     1jQuery(document).ready(function ($) {
     2    const $document = $(document);
    33
    4     const tooltipTriggerList    = document.querySelectorAll('[data-bs-toggle="tooltip"]');
     4    const tooltipTriggerList = document.querySelectorAll('[data-bs-toggle="tooltip"]');
    55    [...tooltipTriggerList].map(tooltipTriggerEl => new bootstrap.Tooltip(tooltipTriggerEl));
    66
     
    1212
    1313    function handleTabChangeInHistory() {
    14    
     14
    1515        let url = window.location.href;
    1616        let baseUrl = url.split('?')[0]
    17    
     17
    1818        let target = $(this).attr('id');
    1919        let searchParams = new URLSearchParams(window.location.search)
    20    
     20
    2121        searchParams.set('tab', target);
    22    
     22
    2323        let newUrl = baseUrl + '?' + searchParams.toString();
    2424        history.pushState({}, null, newUrl);
    2525    }
    2626
    27     function toggleCheckboxValue(e)
    28     {
     27    function toggleCheckboxValue(e) {
    2928        if ($(this).is(':checked')) {
    3029            $(this).attr('value', '1');
     
    3433    }
    3534
    36     function toggleExtraContentCeckbox(event)
    37     {
    38         let target      = $(event.target).data('target');
    39         let $content    = $('.js--extra-content-target[data-for=' + target + ']');
     35    function toggleExtraContentCeckbox(event) {
     36        let target = $(event.target).data('target');
     37        let $content = $('.js--extra-content-target[data-for=' + target + ']');
    4038
    41         $content.each(function() {
     39        $content.each(function () {
    4240
    43             var checkboxIsChecked   = $(event.target).is(':checked');
    44             var enableReversed      = (!checkboxIsChecked && $(this).hasClass('reversed'));
    45             var enableDefault       = (checkboxIsChecked && !$(this).hasClass('reversed'));
     41            var checkboxIsChecked = $(event.target).is(':checked');
     42            var enableReversed = (!checkboxIsChecked && $(this).hasClass('reversed'));
     43            var enableDefault = (checkboxIsChecked && !$(this).hasClass('reversed'));
    4644
    47             if (enableReversed || enableDefault) {
     45            if (enableReversed || enableDefault) {
    4846                if ($(this).hasClass('extra-content-is-flexed')) {
    4947                    $(this).css('display', 'flex');
     
    5654                disableFieldsInContent($(this));
    5755            }
    58         });
    59        
     56        });
     57
    6058    }
    6159
    6260    function toggleExtraContentSelect() {
    63         let toggleValue = $(this).data('toggle-value');
    64         let value      = $(this).val();
    65         let target      = $(this).data('target');
    66         let $content    = $('.js--extra-content-target[data-for=' + target + ']');
     61        let toggleValue = $(this).data('toggle-value');
     62        let value = $(this).val();
     63        let target = $(this).data('target');
     64        let $content = $('.js--extra-content-target[data-for=' + target + ']');
    6765
    6866        // Create array if multiple values are possible
     
    7169        }
    7270
    73         $content.each(function() {
     71        $content.each(function () {
    7472            // if toggleValue is an array and value is not in the array then hide and disable the content
    7573            // if toggleValue is a string and not equal to value then hide and disable the content
     
    8684                }
    8785            }
    88         });
     86        });
    8987    }
    9088
    91     function showAndEnableContent($content)
    92     {
     89    function showAndEnableContent($content) {
    9390        $content.slideDown();
    9491        enableFieldsInContent($content);
    9592    }
    9693
    97     function hideAndDisableContent($content)
    98     {
     94    function hideAndDisableContent($content) {
    9995        $content.slideUp();
    10096        disableFieldsInContent($content);
    10197    }
    10298
    103     function enableFieldsInContent($content)
    104     {
     99    function enableFieldsInContent($content) {
    105100        $('input', $content).prop('disabled', false).removeClass('disabled');
    106101        $('select', $content).prop('disabled', false).removeClass('disabled');
     
    108103    }
    109104
    110     function disableFieldsInContent($content)
    111     {
     105    function disableFieldsInContent($content) {
    112106        $('input', $content).prop('disabled', true).addClass('disabled');
    113107        $('select', $content).prop('disabled', true).addClass('disabled');
     
    117111    /**
    118112     * When adding custom alerts with a manual removal we can remove the alert via this method
    119      * 
     113     *
    120114     * @see alert.js
    121      * 
    122      * @param {object} e 
     115     *
     116     * @param {object} e
    123117     */
    124     function removeAlert(e)
    125     {
     118    function removeAlert(e) {
    126119        e.target.parentNode.remove();
    127120    }
  • open-rdw-kenteken-voertuiginformatie/trunk/config/plugin.php

    r3139733 r3145292  
    2727        'log_source'            => 'tussendoor-rdw',
    2828        'log_context'           => 'tsdRdwContext',
    29         'version'               => '5.0.4.8',
     29        'version'               => '5.0.5',
    3030        'php_minimum'           => '8.0',
    3131        'php_minimum_id'        => 80000,
     
    5454        'textversion'           => '2.0.0',
    5555        'version'               => 'v2',
    56         'url'                   => 'https://tussendoor.nl',
     56        'url'                   => 'https://tussendoor.test',
    5757        'timezone'              => 'Europe/Amsterdam',
    5858        'endpoints' => [
     
    6565            'stats' => [
    6666                'month'   => '/api/plugin/rdw/v2/stats/month',
    67                 'today'     => '/api/plugin/rdw/v2/stats/today'
     67                'today'   => '/api/plugin/rdw/v2/stats/today'
    6868            ],
    6969            'licenseplate' => [
  • open-rdw-kenteken-voertuiginformatie/trunk/plugin-gratis-open-rdw-kenteken-voertuiginformatie.php

    r3139733 r3145292  
    1212 * Author URI: https://www.tussendoor.nl
    1313 * Text Domain: tussendoor-rdw
    14  * Version: 5.0.4.8
     14 * Version: 5.0.5
    1515 * Tested up to: 6.6.1
    1616 * Requires at least: 6.2
     
    2828define('ORK_PLUGIN_PATH', plugins_url('tussendoor-rdw'));
    2929define('ORK_PLUGIN', __DIR__);
    30 define('ORK_VERSION', '5.0.4.8');
     30define('ORK_VERSION', '5.0.5');
    3131
    3232/**
  • open-rdw-kenteken-voertuiginformatie/trunk/readme.txt

    r3139733 r3145292  
    22Contributors: Tussendoor
    33Tags: tussendoor, rdw, kenteken, voertuig, kentekeninformatie
    4 Stable tag: 5.0.4.8
     4Stable tag: 5.0.5
    55Tested up to: 6.6.1
    66Requires at least: 6.2
     
    99License URI: http://www.gnu.org/licenses/gpl-2.0.txt
    1010
    11 Haal kenteken / voertuig informatie op van OpenRDW met de tussendoor-rdw.
     11Haal kenteken / voertuig informatie op van OpenRDW met de Open RDW Kenteken plugin.
    1212
    1313## Description
    14 Met de Open RDW Kenteken plugin van [Tussendoor](http://www.tussendoor.nl), haal je op een eenvoudige wijze kenteken en voertuig informatie op via de gratis dienst van de RDW ([Open RDW](http://www.rdw.nl/Zakelijk/Paginas/Open-data.aspx))
     14Met de Open RDW Kenteken plugin van [Tussendoor](https://www.tussendoor.nl), haal je op een eenvoudige wijze kenteken en voertuig informatie op via de gratis dienst van de RDW ([Open RDW](https://www.rdw.nl/))
    1515
    1616
     
    41412. Activeer de plugin onder de plugin pagina.
    42423. Voer de licentie in die je van Tussendoor hebt ontvangen.
    43 4. Ga naar Widgets, pagina / berichten beheer of Contact Form 7 om je eerste kentekencontrole in te bouwen en direct gratis te gebruiken.
    44 
    45 ### Screenshots
    46 
    47 1. Standaard instellingen scherm Open RDW - Informatie over integraties
    48 2. Voorbeeldscherm Contact Form 7 integratie bij Open RDW plugin
    49 3. Voorbeelscherm Widgets voor het integreren van kentekeninformatie via een widget / sidebar
    50 4. Voorbeeldscherm (stap 1) voor de shortcode invoer binnen de WYSIWYG editor
    51 5. Voorbeeldscherm (stap 2) voor de shortcode invoer binnen de WYSIWYG editor
     434. Ga naar Widgets, pagina / berichten beheer of formulier builder om je eerste kentekencontrole in te bouwen en direct gratis te gebruiken.
    5244
    5345### Changelog
     46
     47##### 5.0.5
     48* Fixed: Check whether dateTime is compatible with Carbon Parse.
     49* Removed: Older styles where enqueued.
     50* Update: Stats now use v2 enpoints.
     51* Update: Stability improvements on activating plugin with license.
     52* Update: Stability improvements in JavaScript.
     53* Update: Readme.md.
    5454
    5555##### 5.0.4.8
  • open-rdw-kenteken-voertuiginformatie/trunk/routes/DashboardRouter.php

    r3138718 r3145292  
    6666    {
    6767        /**
    68          * Filter: tussendoor_bol_enqueue_assets
     68         * Filter: tussendoor_rdw_enqueue_assets
    6969         * Can be used by third-parties or add-ons to return early and prevent the plugin from enqueuing assets
    7070         *
    7171         * @return bool
    7272         */
    73         $returnEarly = apply_filters('tussendoor_bol_enqueue_assets', (strpos($hook, MainConfig::get('plugin.tag')) === false), $hook);
     73        $returnEarly = apply_filters('tussendoor_rdw_enqueue_assets', (strpos($hook, MainConfig::get('plugin.tag')) === false), $hook);
    7474        if ($returnEarly) return;
    7575
  • open-rdw-kenteken-voertuiginformatie/trunk/views/dashboard/dashboard.home.php

    r3139733 r3145292  
    1313$currentTime = Carbon::now()->toDateString();
    1414
    15 if ($dismissTime === false || $dismissTime === '' || (Carbon::parse($currentTime)->greaterThan($dismissTime))) : ?>
     15if (
     16    $dismissTime === false ||
     17    $dismissTime === '' ||
     18    $dismissTime == '1' ||
     19    (Carbon::parse($currentTime)->greaterThan($dismissTime))
     20) : ?>
    1621    <script>
    1722        document.addEventListener('DOMContentLoaded', function() {
     
    5661    <!-- Modal -->
    5762    <div class="modal fade" id="staticBackdrop" data-bs-backdrop="static" data-bs-keyboard="false" tabindex="-1" aria-labelledby="staticBackdropLabel" aria-hidden="true">
    58         <div class="modal-dialog">
     63        <div class="modal-dialog tussendoor">
    5964            <div class="modal-content" id="free-variant-notice">
    60                 <div class="modal-header">
     65                <div class="modal-header tussendoor">
    6166                    <button type="button" class="btn-close open-rdw-notice-dismiss-action" data-bs-dismiss="modal" aria-label="Close"></button>
    6267                </div>
    63                 <div class="modal-body">
     68                <div class="modal-body tussendoor">
    6469                    <i class="fa-regular fa-calendar" style="font-size:48px; color:orange;"></i>
    6570                    <h1 class="modal-title fs-4" id="staticBackdropLabel">Vanaf 1 oktober verandert het betaalmodel van deze plugin.</h1>
    6671                </div>
    67                 <div class="modal-footer">
     72                <div class="modal-footer tussendoor">
    6873                    <p>Waarom? <a href="https://tussendoor.nl/ons-betaalmodel-verandert" target="_blank">Hier vind je meer informatie</a></p>
    6974                </div>
     
    7277        <div class="modal-dialog-extra">
    7378            <div class="modal-content" id="free-variant-notice">
    74                 <div class="modal-header">
     79                <div class="modal-header tussendoor">
    7580                </div>
    76                 <div class="modal-body">
     81                <div class="modal-body tussendoor">
    7782                    <h1 class="modal-title fs-5" id="staticBackdropLabel">Meld je aan om de gratis periode tot 1 november te verlengen.</h1>
    7883                    <br>
     
    8489                        <a href="https://tussendoor.nl/plugins/openrdw-kenteken-wordpress-plugin" target="_blank" class="btn btn-secondary rounded-pill fw-light custom-button-width me-3" type="button"> Bekijk de pakketten <i class="fa-solid fa-arrow-right"></i></a>
    8590                    </div>
    86                     <div class="accordion" id="accordionExample">
     91                    <div class="accordion tussendoor" id="accordionExample">
    8792                        <div class="accordion-item">
    8893                            <h2 class="accordion-header" id="headingOne">
     
    124129                    </div>
    125130                </div>
    126                 <div class="modal-footer"></div>
     131                <div class="modal-footer tussendoor"></div>
    127132            </div>
    128133        </div>
Note: See TracChangeset for help on using the changeset viewer.