Changeset 3145910
- Timestamp:
- 09/03/2024 11:47:24 AM (17 months ago)
- Location:
- open-rdw-kenteken-voertuiginformatie/trunk
- Files:
-
- 13 edited
-
admin/js/open-rdw-kenteken-voertuiginformatie-admin.js (modified) (1 diff)
-
admin/logs/log.txt (modified) (1 diff)
-
admin/partials/TinyMceDisplay.php (modified) (1 diff)
-
app/Concerns/HasActions.php (modified) (1 diff)
-
app/Http/Controllers/SettingsController.php (modified) (3 diffs)
-
app/Services/ContactForm7.php (modified) (2 diffs)
-
assets/admin/js/settings.js (modified) (2 diffs)
-
config/plugin.php (modified) (2 diffs)
-
plugin-gratis-open-rdw-kenteken-voertuiginformatie.php (modified) (2 diffs)
-
public/PublicDashboard.php (modified) (1 diff)
-
public/js/open-rdw-kenteken-voertuiginformatie-public.js (modified) (3 diffs)
-
readme.txt (modified) (3 diffs)
-
views/dashboard/dashboard.info.php (modified) (3 diffs)
Legend:
- Unmodified
- Added
- Removed
-
open-rdw-kenteken-voertuiginformatie/trunk/admin/js/open-rdw-kenteken-voertuiginformatie-admin.js
r3145292 r3145910 2 2 'use strict'; 3 3 4 $(window).on('load', function(){4 document.addEventListener('DOMContentLoaded', function () { 5 5 6 6 /** -
open-rdw-kenteken-voertuiginformatie/trunk/admin/logs/log.txt
r3145292 r3145910 9 9 2024-08-27 12:20:34 - Open RDW PRO activation.. 10 10 2024-08-27 12:20:34 - Open RDW PRO activated. 11 2024-09-02 14:23:35 - Deactivating Open RDW PRO. Byebye! 12 2024-09-02 14:25:19 - Open RDW PRO activation.. 13 2024-09-02 14:25:19 - Open RDW PRO activated. -
open-rdw-kenteken-voertuiginformatie/trunk/admin/partials/TinyMceDisplay.php
r3139133 r3145910 18 18 public function render() 19 19 { 20 ?> 21 <div id="rdw-thickbox" class="rdw-popup" style="display: none;"> 22 <div class="rdw-thickbox-content"> 23 <div id="rdw-thickbox-header"> 24 <h3><?php echo __('Select which fields you would like to display:', 'tussendoor-rdw') ?></h3> 25 </div> 26 <div id="rdw-thickbox-content"> 27 <div class="rdw-sort-fields rdw-expand-fields"> 28 <ul> 29 <?php $this->render_fields(); ?> 30 </ul> 31 </div> 32 </div> 33 <div id="rdw-thickbox-footer"> 34 <p> 35 <input type="button" value="<?php echo __('Cancel', 'tussendoor-rdw') ?>" class="button" onclick="tb_remove();"> 36 <input type="button" value="<?php echo __('Add shortcode', 'tussendoor-rdw') ?>" class="button button-primary" id="rdw-thickbox-submit"> 37 </p> 20 ?> 21 <div id="rdw-thickbox" class="rdw-popup" style="display: none;"> 22 <div class="rdw-thickbox-content"> 23 <div id="rdw-thickbox-header"> 24 <h3><?php echo __('Select which fields you would like to display:', 'tussendoor-rdw') ?></h3> 25 </div> 26 <div id="rdw-thickbox-content"> 27 <div class="rdw-sort-fields rdw-expand-fields"> 28 <ul> 29 <?php $this->render_fields(); ?> 30 </ul> 38 31 </div> 39 32 </div> 33 <div id="rdw-thickbox-footer"> 34 <p> 35 <input type="button" value="<?php echo __('Cancel', 'tussendoor-rdw') ?>" class="button" onclick="tb_remove();"> 36 <input type="button" value="<?php echo __('Add shortcode', 'tussendoor-rdw') ?>" class="button button-primary" id="rdw-thickbox-submit"> 37 </p> 38 </div> 40 39 </div> 41 <script type="text/javascript"> 40 </div> 41 <script type="text/javascript"> 42 if (typeof jQuery != 'undefined') { 42 43 jQuery(document).ready(function() { 43 44 jQuery('.rdw-sort-fields ul').sortable(); 44 45 }); 45 </script> 46 <?php 46 } 47 </script> 48 <?php 47 49 } 48 50 -
open-rdw-kenteken-voertuiginformatie/trunk/app/Concerns/HasActions.php
r3138718 r3145910 76 76 77 77 /** 78 * The action associated with registering the plugin 79 * 80 * @var string 81 */ 82 public static $refreshTokenAction = 'tsd_rdw_refresh_api_token_action'; 83 84 /** 78 85 * The action associated with downloading a shipping label 79 86 * -
open-rdw-kenteken-voertuiginformatie/trunk/app/Http/Controllers/SettingsController.php
r3145292 r3145910 27 27 add_action('wp_ajax_' . self::$settingsSave, [$this, 'saveSettings']); 28 28 add_action('wp_ajax_' . self::$registerPlugin, [$this, 'registerPlugin']); 29 add_action('wp_ajax_' . self::$refreshTokenAction, [$this, 'refreshTokenAction']); 29 30 } 30 31 … … 44 45 'Settings', 45 46 array( 46 'plugin_tag' => MainConfig::get('plugin.tag'), 47 'ajaxurl' => admin_url('admin-ajax.php'), 48 'save_action' => self::$settingsSave, 49 'save_orders' => self::$orderSettingsSave, 50 'save_returns' => self::$returnSettingsSave, 51 'register_action' => self::$registerPlugin, 52 'saveFailText' => esc_html__('Opslaan van de instellingen mislukt! Neem contact op met Tussendoor B.V. wanneer de fout zich voor blijft doen.', 'tussendoor-rdw'), 53 'saveText' => esc_html__('Instellingen opgeslagen!', 'tussendoor-rdw'), 47 'plugin_tag' => MainConfig::get('plugin.tag'), 48 'ajaxurl' => admin_url('admin-ajax.php'), 49 'save_action' => self::$settingsSave, 50 'save_orders' => self::$orderSettingsSave, 51 'save_returns' => self::$returnSettingsSave, 52 'register_action' => self::$registerPlugin, 53 'refresh_api_token_action' => self::$refreshTokenAction, 54 'saveFailText' => esc_html__('Opslaan van de instellingen mislukt! Neem contact op met Tussendoor B.V. wanneer de fout zich voor blijft doen.', 'tussendoor-rdw'), 55 'saveText' => esc_html__('Instellingen opgeslagen!', 'tussendoor-rdw'), 54 56 ) 55 57 ); … … 150 152 151 153 /** 154 * Register the plugin when the license is valid 155 */ 156 public function refreshTokenAction() 157 { 158 $request = Request::fromGlobal(); 159 160 add_filter('https_ssl_verify', '__return_false'); 161 162 $api = new Api; 163 $api->getTussendoorToken(true); 164 return wp_send_json_success('De Tussendoor API Token is opnieuw aangevraagd.'); 165 166 } 167 168 /** 152 169 * Remove old settings that are no longer used 153 170 * -
open-rdw-kenteken-voertuiginformatie/trunk/app/Services/ContactForm7.php
r3138718 r3145910 71 71 } 72 72 73 $atts['class'] = $tag->get_class_option(!empty($class) ? $class : null) .' open-data-rdw';74 73 $atts['class'] = $tag->get_class_option(!empty($class) ? $class : null) . ' open-data-rdw-hook'; 74 $atts['id'] = 'open-data-rdw'; 75 75 76 76 $value = (string) reset($tag->values); 77 $value = $tag->get_default_option($value);78 77 79 78 if ($tag->has_option('placeholder') || $tag->has_option('watermark')) { … … 82 81 } 83 82 84 $atts['id'] = $tag->name;85 83 $atts['value'] = $value; 86 84 $atts['type'] = 'text'; -
open-rdw-kenteken-voertuiginformatie/trunk/assets/admin/js/settings.js
r3138718 r3145910 279 279 url: Settings.ajaxurl, 280 280 data: { 281 action: Settings.register_action, 282 license: $button.parents('#register').find('#license_code').val(), 281 action: Settings.refresh_api_token_action, 283 282 }, 284 283 type: 'POST', … … 289 288 }, 290 289 }) 291 .then(function (response) { 292 293 $button.removeClass('btn-primary').addClass('btn-success'); 294 new Alert(response.data, 'success'); 295 296 setTimeout(function () { 297 $('#register').modal('toggle'); 298 }, 1000); 299 300 }) 301 .fail(function (jqXHR, textStatus) { 302 303 $button.removeClass('btn-primary').addClass('btn-warning'); 304 new Alert(jqXHR.responseJSON.data, 'danger', 'manual'); 305 306 }) 307 .always(function () { 308 $button.find('i').removeClass('fa-spinner fa-spin').addClass('fa-save'); 309 310 setTimeout(function () { 311 $button.prop('disabled', false); 312 $button.removeClass('btn-success btn-warning').addClass('btn-primary'); 313 }, 2000); 314 }); 290 .then(function (response) { 291 292 $button.removeClass('btn-primary').addClass('btn-success'); 293 new Alert(response.data, 'success'); 294 }) 295 .fail(function (jqXHR) { 296 297 $button.removeClass('btn-primary').addClass('btn-warning'); 298 new Alert(jqXHR.responseJSON.data, 'danger', 'manual'); 299 300 }) 301 .always(function () { 302 $button.find('i').removeClass('fa-spinner fa-spin').addClass('fa-save'); 303 304 setTimeout(function () { 305 $button.prop('disabled', false); 306 $button.removeClass('btn-success btn-warning').addClass('btn-primary'); 307 }, 2000); 308 }); 315 309 } 316 310 -
open-rdw-kenteken-voertuiginformatie/trunk/config/plugin.php
r3145385 r3145910 27 27 'log_source' => 'tussendoor-rdw', 28 28 'log_context' => 'tsdRdwContext', 29 'version' => '5. 0.5.1',29 'version' => '5.1.0', 30 30 'php_minimum' => '8.0', 31 31 'php_minimum_id' => 80000, … … 54 54 'textversion' => '2.0.0', 55 55 'version' => 'v2', 56 'url' => 'https://tussendoor. test',56 'url' => 'https://tussendoor.nl', 57 57 'timezone' => 'Europe/Amsterdam', 58 58 'endpoints' => [ -
open-rdw-kenteken-voertuiginformatie/trunk/plugin-gratis-open-rdw-kenteken-voertuiginformatie.php
r3145385 r3145910 12 12 * Author URI: https://www.tussendoor.nl 13 13 * Text Domain: tussendoor-rdw 14 * Version: 5. 0.5.114 * Version: 5.1.0 15 15 * Tested up to: 6.6.1 16 16 * Requires at least: 6.2 … … 28 28 define('ORK_PLUGIN_PATH', plugins_url('tussendoor-rdw')); 29 29 define('ORK_PLUGIN', __DIR__); 30 define('ORK_VERSION', '5. 0.5.1');30 define('ORK_VERSION', '5.1.0'); 31 31 32 32 /** -
open-rdw-kenteken-voertuiginformatie/trunk/public/PublicDashboard.php
r3138718 r3145910 44 44 public function ajax_check() 45 45 { 46 47 46 $data = array('errors' => true); 48 47 -
open-rdw-kenteken-voertuiginformatie/trunk/public/js/open-rdw-kenteken-voertuiginformatie-public.js
r3138718 r3145910 2 2 'use strict'; 3 3 4 $(document).on('ready', function () {4 document.addEventListener('DOMContentLoaded', function () { 5 5 6 6 /** … … 53 53 * This code is responsible for contact form 7 support and makes an ajax call to our plugin. 54 54 */ 55 $(document).on('change', ' .open-data-rdw', function() {55 $(document).on('change', '#open-data-rdw', function () { 56 56 var formID = $(this).closest('form').attr('id'); 57 57 if (formID == undefined) { … … 62 62 } 63 63 64 $('#' +formID+' #open_rdw-loading').show();65 $('#' +formID+' #open_rdw-error').hide();66 $('#' +formID+' #open_rdw-accepted').hide();64 $('#' + formID + ' #open_rdw-loading').show(); 65 $('#' + formID + ' #open_rdw-error').hide(); 66 $('#' + formID + ' #open_rdw-accepted').hide(); 67 67 68 68 var kenteken = normalizeLicense($(this).val()); 69 var data = { action: 'get_open_rdw_data', kenteken: kenteken};69 var data = { action: 'get_open_rdw_data', kenteken: kenteken }; 70 70 71 71 $(document).trigger('openrdw:before_data_load', kenteken); 72 72 73 $.post(ajax.ajax_url, data, function (res) {73 $.post(ajax.ajax_url, data, function (res) { 74 74 75 75 $('#open_rdw-loading').hide(); 76 76 if (res.errors) { 77 $('#' +formID+' #open_rdw-error').show();77 $('#' + formID + ' #open_rdw-error').show(); 78 78 } else { 79 $('#' +formID+' #open_rdw-accepted').show();79 $('#' + formID + ' #open_rdw-accepted').show(); 80 80 } 81 81 82 $.each(res.result, function (name, value) {82 $.each(res.result, function (name, value) { 83 83 if (name !== 'kenteken') { 84 $('#' +formID+' input[name="' + name + '"]').val(value).trigger('change');84 $('#' + formID + ' input[name="' + name + '"]').val(value); 85 85 } 86 86 }); -
open-rdw-kenteken-voertuiginformatie/trunk/readme.txt
r3145385 r3145910 2 2 Contributors: Tussendoor 3 3 Tags: tussendoor, rdw, kenteken, voertuig, kentekeninformatie 4 Stable tag: 5. 0.5.14 Stable tag: 5.1.0 5 5 Tested up to: 6.6.1 6 6 Requires at least: 6.2 … … 45 45 ### Changelog 46 46 47 ##### 5.1.0 48 * Fixed: An instance where jQuery was not triggered because it was loaded before DOM ready. 49 * Fixed: An jQuery issue where some CF7 requests where not working. 50 * Fixed: An issue where some CF7 forms had no ID in the HTML. 51 * Added: The option to manually get a new API token from Tussendoor if no data is returned. 52 47 53 ##### 5.0.5.1 48 54 * Hotfix: Better JS checking to prevent errors. … … 51 57 * Fixed: Check whether dateTime is compatible with Carbon Parse. 52 58 * Removed: Older styles where enqueued. 53 * Update : Stats now use v2 enpoints.54 * Update : Stability improvements on activating plugin with license.55 * Update : Stability improvements in JavaScript.56 * Update : Readme.md.59 * Updated: Stats now use v2 enpoints. 60 * Updated: Stability improvements on activating plugin with license. 61 * Updated: Stability improvements in JavaScript. 62 * Updated: Readme.md. 57 63 58 64 ##### 5.0.4.8 -
open-rdw-kenteken-voertuiginformatie/trunk/views/dashboard/dashboard.info.php
r3138718 r3145910 27 27 </div> 28 28 29 <?php30 /**31 * Action hook to add content before the version input32 */33 do_action('tussendoor_bol_before_main_version_input'); ?>34 35 29 <div class="input-group mb-3 align-items-center flex-nowrap"> 36 30 <div class="input-group-prepend"> … … 41 35 <p id="version" class="mb-0 ms-2"> 42 36 <?php 43 echo esc_html(MainConfig::get('plugin.version')); 44 if (MainConfig::get('plugin.is_beta')) { 45 ?> 46 <div class="badge text-bg-warning rounded-pill fw-light ms-2">Beta</div> 47 <?php 48 } 37 echo esc_html(MainConfig::get('plugin.version')); 38 if (MainConfig::get('plugin.is_beta')) { 49 39 ?> 50 </p> 40 <div class="badge text-bg-warning rounded-pill fw-light ms-2">Beta</div> 41 <?php 42 } 43 ?> 44 </p> 51 45 </div> 52 46 <div class="input-group mb-3 align-items-center flex-nowrap"> … … 108 102 do_action('tussendoor_bol_after_main_license_input'); ?> 109 103 </div> 104 105 <div id="auth" class="mt-5"> 106 <div class="tab-title mb-3"> 107 <h3><?php esc_html_e('Authenticatie', 'tussendoor-rdw'); ?></h3> 108 </div> 109 110 <div class="input-group mb-3 align-items-center flex-nowrap"> 111 <div class="input-group-prepend"> 112 <label class="input-group-text w-100 fw-light border-0 custom-bg-light" for="license"> 113 <?php esc_html_e('Tussendoor API Token', 'tussendoor-rdw'); ?> 114 <small> 115 <i class="fa fa-info-circle ms-2 text-info" data-bs-toggle="tooltip" data-bs-custom-class="tussendoor-tooltip tussendoor-info" title="<?php esc_attr_e('Indien het ophalen van kentekens niet werkt kun je dit proberen. Anders neem contact op met Tussendoor B.V.', 'tussendoor-rdw'); ?>"></i> 116 </small> 117 </label> 118 </div> 119 <p id="license" class="mb-0 ms-2"> 120 <span type="button" class="btn btn-sm btn-primary js--refresh-api-token"><i class="me-1 fa-solid fa-rotate"></i> <?php esc_html_e('Vernieuwen', 'tussendoor-rdw'); ?></span> 121 </p> 122 </div> 123 </div> 110 124 </div> 111 125
Note: See TracChangeset
for help on using the changeset viewer.