Plugin Directory

Changeset 3495138


Ignore:
Timestamp:
03/31/2026 05:22:59 AM (4 days ago)
Author:
konceptwise
Message:

Improvement: performance improvement

Location:
authyo-otp-for-contact-form-7/trunk
Files:
3 edited

Legend:

Unmodified
Added
Removed
  • authyo-otp-for-contact-form-7/trunk/assets/js/admin.js

    r3493287 r3495138  
    11521152        // Focus/Click on search input
    11531153        countrySearch.addEventListener('focus', function () {
     1154            // Always show dropdown container so any messages (even errors) are visible
     1155            countryDropdown.style.display = 'block';
     1156            isDropdownOpen = true;
     1157
    11541158            if (allCountriesData.length === 0) {
    11551159                console.warn('Authyo CF7: No countries data available. Please refresh the country list.');
    1156                 countryDropdownList.innerHTML = '<div style="padding: 15px; text-align: center; color: #d63638;">No countries available. Please refresh the country list first.</div>';
     1160                countryDropdownList.innerHTML = '<div style="padding: 15px; text-align: center; color: #d63638; font-weight: 500; border: 1px solid #f5c2c7; background: #f8d7da; border-radius: 4px; margin: 10px;">' +
     1161                    '<span class="dashicons dashicons-warning" style="vertical-align: middle; margin-right: 5px;"></span>' +
     1162                    'No countries available. Please refresh the country list in the "Country Selector Data" card above.</div>';
    11571163                return;
    11581164            }
    11591165
    1160             countryDropdown.style.display = 'block';
    1161             isDropdownOpen = true;
    11621166            renderCountryDropdown(this.value);
    11631167        });
     
    11651169        // Search as you type
    11661170        countrySearch.addEventListener('input', function () {
    1167             renderCountryDropdown(this.value);
     1171            // Always show dropdown container
    11681172            if (!isDropdownOpen) {
    11691173                countryDropdown.style.display = 'block';
    11701174                isDropdownOpen = true;
    11711175            }
     1176
     1177            if (allCountriesData.length === 0) {
     1178                // Keep showing the error message
     1179                return;
     1180            }
     1181
     1182            renderCountryDropdown(this.value);
    11721183        });
    11731184
  • authyo-otp-for-contact-form-7/trunk/authyo-otp-for-contact-form-7.php

    r3493287 r3495138  
    44 * Plugin URI:  https://wordpress.org/plugins/authyo-otp-for-contact-form-7/
    55 * Description: Adds OTP verification via Authyo (Email, SMS, WhatsApp, Voice Call) to Contact Form 7 submissions for secure form validation.
    6  * Version:     1.0.22
     6 * Version:     1.0.23
    77 * Author:      Authyo
    88 * Author URI:  https://authyo.io/
     
    1818    exit;
    1919
    20 define('AUTHYO_CF7_VERSION', '1.0.22');
     20define('AUTHYO_CF7_VERSION', '1.0.23');
    2121define('AUTHYO_CF7_FILE', __FILE__);
    2222define('AUTHYO_CF7_PATH', plugin_dir_path(__FILE__));
     
    275275        foreach ($all_countries as $country) {
    276276            $code = $country['code'] ?? $country['countryIso'] ?? $country['countryCode'] ?? $country['iso'] ?? '';
    277             $name = $country['name'] ?? $country['countryName'] ?? '';
    278             $dial_code = $country['dial_code'] ?? $country['dialCode'] ?? $country['phoneCode'] ?? $country['phone_code'] ?? '';
    279             if (!empty($code) && !empty($name)) {
     277            $name = $country['name'] ?? $country['countryName'] ?? 'Unknown';
     278            $dial = $country['dial_code'] ?? $country['dialCode'] ?? $country['phoneCode'] ?? $country['phone_code'] ?? '';
     279
     280            if ($code && $name !== 'Unknown') {
    280281                $countries_json[] = [
    281282                    'code' => $code,
    282283                    'name' => $name,
    283                     'dial_code' => $dial_code
     284                    'dial_code' => $dial
    284285                ];
    285286            }
  • authyo-otp-for-contact-form-7/trunk/readme.txt

    r3493287 r3495138  
    55Tested up to: 6.9
    66Requires PHP: 7.4
    7 Stable tag: 1.0.22
     7Stable tag: 1.0.23
    88License: GPLv2 or later
    99License URI: https://www.gnu.org/licenses/gpl-2.0.html
     
    8888
    8989== Changelog ==
     90= 1.0.23 =
     91* Improvement: performance improvement
     92
    9093= 1.0.22 =
    9194* UI/UX: Fixed country dropdown initialization and improved dropdown styling and behavior.
Note: See TracChangeset for help on using the changeset viewer.