Changeset 3487626
- Timestamp:
- 03/21/2026 06:59:04 AM (2 weeks ago)
- Location:
- authyo-otp-for-contact-form-7/trunk
- Files:
-
- 5 edited
-
assets/css/deactivation.css (modified) (1 diff)
-
assets/js/deactivation.js (modified) (6 diffs)
-
authyo-otp-for-contact-form-7.php (modified) (2 diffs)
-
includes/class-authyo-deactivation.php (modified) (5 diffs)
-
readme.txt (modified) (2 diffs)
Legend:
- Unmodified
- Added
- Removed
-
authyo-otp-for-contact-form-7/trunk/assets/css/deactivation.css
r3393611 r3487626 126 126 } 127 127 128 /* Contact Info Input */ 129 .authyo-cf7-deactivation-contact-wrapper { 130 margin-bottom: 20px; 131 } 132 133 .authyo-cf7-deactivation-contact-label { 134 margin: 0 0 10px 0; 135 font-size: 13px; 136 color: #50575e; 137 font-weight: 500; 138 } 139 140 .authyo-cf7-deactivation-input { 141 width: 100%; 142 padding: 10px; 143 border: 1px solid #ddd; 144 border-radius: 4px; 145 font-size: 14px; 146 box-sizing: border-box; 147 } 148 149 .authyo-cf7-deactivation-input:focus { 150 outline: none; 151 border-color: #2271b1; 152 box-shadow: 0 0 0 1px #2271b1; 153 } 154 128 155 /* Actions */ 129 156 .authyo-cf7-deactivation-actions { -
authyo-otp-for-contact-form-7/trunk/assets/js/deactivation.js
r3395581 r3487626 65 65 }), 66 66 $('<div>', { 67 class: 'authyo-cf7-deactivation-contact-wrapper', 68 html: [ 69 $('<p>', { 70 class: 'authyo-cf7-deactivation-contact-label', 71 text: DEACT.i18n.contact_label 72 }), 73 $('<input>', { 74 type: 'text', 75 id: 'authyo-cf7-deactivation-contact', 76 name: 'contact_info', 77 class: 'authyo-cf7-deactivation-input', 78 placeholder: DEACT.i18n.contact_placeholder 79 }) 80 ] 81 }), 82 $('<div>', { 67 83 class: 'authyo-cf7-deactivation-actions', 68 84 html: [ … … 164 180 165 181 // Submit feedback (non-blocking - fire and forget) 166 function submitFeedback(reason, details, c allback) {182 function submitFeedback(reason, details, contactInfo, callback) { 167 183 const data = { 168 184 action: 'authyo_cf7_submit_deactivation_feedback', 169 185 nonce: DEACT.nonce, 170 186 reason: reason, 171 details: details || '' 187 details: details || '', 188 contact_info: contactInfo || '' 172 189 }; 190 191 // Merge contact_info into data if provided 192 if (typeof reason === 'object') { 193 // This is for the REST API path if reason is an object 194 } 173 195 174 196 // Make non-blocking request - don't wait for response … … 181 203 data: { 182 204 reason: reason, 183 details: details || '' 205 details: details || '', 206 contact_info: data.contact_info 184 207 } 185 208 }).catch(function(error) { … … 276 299 277 300 const details = selectedReason === 'other' ? $('#authyo-cf7-deactivation-other').val().trim() : ''; 301 const contactInfo = $('#authyo-cf7-deactivation-contact').val().trim(); 278 302 279 303 // Validate "Other" input if selected … … 285 309 286 310 // Submit feedback (non-blocking) 287 submitFeedback(selectedReason, details, function(success) {311 submitFeedback(selectedReason, details, contactInfo, function(success) { 288 312 // Hide form, show thank you message 289 313 $('#authyo-cf7-deactivation-form').hide(); … … 299 323 e.preventDefault(); 300 324 325 const contactInfo = $('#authyo-cf7-deactivation-contact').val().trim(); 326 301 327 // Submit skipped feedback (non-blocking) and proceed immediately 302 submitFeedback('skipped', '', function() {328 submitFeedback('skipped', '', contactInfo, function() { 303 329 // Proceed with deactivation immediately 304 330 performDeactivation(); -
authyo-otp-for-contact-form-7/trunk/authyo-otp-for-contact-form-7.php
r3481798 r3487626 4 4 * Plugin URI: https://wordpress.org/plugins/authyo-otp-for-contact-form-7/ 5 5 * Description: Adds OTP verification via Authyo (Email, SMS, WhatsApp, Voice Call) to Contact Form 7 submissions for secure form validation. 6 * Version: 1.0.2 06 * Version: 1.0.21 7 7 * Author: Authyo 8 8 * Author URI: https://authyo.io/ … … 18 18 exit; 19 19 20 define('AUTHYO_CF7_VERSION', '1.0.2 0');20 define('AUTHYO_CF7_VERSION', '1.0.21'); 21 21 define('AUTHYO_CF7_FILE', __FILE__); 22 22 define('AUTHYO_CF7_PATH', plugin_dir_path(__FILE__)); -
authyo-otp-for-contact-form-7/trunk/includes/class-authyo-deactivation.php
r3442319 r3487626 138 138 'reason_other' => __('Other (please share below)', 'authyo-otp-for-contact-form-7'), 139 139 'other_placeholder' => __('Please share your feedback...', 'authyo-otp-for-contact-form-7'), 140 'contact_placeholder' => __('Email or Phone (Optional)', 'authyo-otp-for-contact-form-7'), 141 'contact_label' => __("If you don't mind, you can share your contact information so we can get in touch with you for better support", 'authyo-otp-for-contact-form-7'), 140 142 'skip' => __('Skip', 'authyo-otp-for-contact-form-7'), 141 143 'submit' => __('Submit & Deactivate', 'authyo-otp-for-contact-form-7'), … … 227 229 $reason = isset($_POST['reason']) ? sanitize_text_field(wp_unslash($_POST['reason'])) : 'skipped'; 228 230 $details = isset($_POST['details']) ? sanitize_textarea_field(wp_unslash($_POST['details'])) : ''; 231 $contact_info = isset($_POST['contact_info']) ? sanitize_text_field(wp_unslash($_POST['contact_info'])) : ''; 229 232 230 233 // Send to feedback API 231 $result = $this->send_feedback_to_api($reason, $details );234 $result = $this->send_feedback_to_api($reason, $details, $contact_info); 232 235 233 236 if (is_wp_error($result)) { … … 253 256 $reason = isset($params['reason']) ? sanitize_text_field($params['reason']) : 'skipped'; 254 257 $details = isset($params['details']) ? sanitize_textarea_field($params['details']) : ''; 258 $contact_info = isset($params['contact_info']) ? sanitize_text_field($params['contact_info']) : ''; 255 259 256 260 // Send to feedback API 257 $result = $this->send_feedback_to_api($reason, $details );261 $result = $this->send_feedback_to_api($reason, $details, $contact_info); 258 262 259 263 if (is_wp_error($result)) { … … 395 399 * Send feedback data to the feedback API 396 400 */ 397 private function send_feedback_to_api($reason, $details = '' )401 private function send_feedback_to_api($reason, $details = '', $contact_info = '') 398 402 { 399 403 // Get app_id from settings - try multiple methods to ensure we get it … … 441 445 'reason' => $reason, 442 446 'details' => $details, 447 'contact_info' => $contact_info, 443 448 'plugin' => self::PLUGIN_SLUG, 444 449 'version' => AUTHYO_CF7_VERSION, -
authyo-otp-for-contact-form-7/trunk/readme.txt
r3481798 r3487626 5 5 Tested up to: 6.9 6 6 Requires PHP: 7.4 7 Stable tag: 1.0.2 07 Stable tag: 1.0.21 8 8 License: GPLv2 or later 9 9 License URI: https://www.gnu.org/licenses/gpl-2.0.html … … 88 88 89 89 == Changelog == 90 = 1.0.21 = 91 * Improvement: performance improvement 92 90 93 = 1.0.20 = 91 94 * UI/UX: Integrated "Skip Verification" button into the method selection row.-
Note: See TracChangeset
for help on using the changeset viewer.