Changeset 3337017
- Timestamp:
- 07/31/2025 07:16:37 AM (8 months ago)
- Location:
- webdesk-approval-manager/trunk
- Files:
-
- 6 edited
-
includes/functions.php (modified) (2 diffs)
-
includes/shortcode.php (modified) (5 diffs)
-
includes/templates/customer-list.php (modified) (1 diff)
-
js/admin.js (modified) (1 diff)
-
js/registration.js (modified) (3 diffs)
-
readme.txt (modified) (3 diffs)
Legend:
- Unmodified
- Added
- Removed
-
webdesk-approval-manager/trunk/includes/functions.php
r3271094 r3337017 295 295 allowClear: true 296 296 }); 297 298 function moveCloseAfterText() { 299 $(".select2-selection__choice").each(function () { 300 var $item = $(this); 301 var $remove = $item.find(".select2-selection__choice__remove"); 302 if ($remove.length) { 303 // Move the remove button after the text 304 $remove.detach().appendTo($item); 305 } 306 }); 307 } 308 309 // Apply after initial load and on any change 310 $(".select2Option").on("change select2:select select2:unselect", function () { 311 setTimeout(moveCloseAfterText, 0); 312 }); 313 314 // Also apply immediately after page load 315 setTimeout(moveCloseAfterText, 100); 297 316 298 317 $("#automatic_approval_new").on("change", function() { … … 386 405 $saved_tags = explode(',', $automatic_approval_tags); 387 406 ?> 407 <style> 408 .select2-container .select2-selection--multiple { 409 height: 40px !important; /* your desired height */ 410 } 411 412 .select2-container--default .select2-selection--multiple .select2-selection__rendered { 413 line-height: 25px !important; 414 } 415 416 .select2-container--default .select2-selection--multiple .select2-selection__arrow { 417 height: 25px !important; 418 } 419 </style> 388 420 <div class="ca_wrap"> 389 421 <h1>General Settings</h1> -
webdesk-approval-manager/trunk/includes/shortcode.php
r3271094 r3337017 18 18 <label for="<?php echo esc_attr($key); ?>"><?php echo esc_html($field['label']); ?></label> 19 19 20 <?php if (in_array($field['type'], ['text', 'email' , 'password'])): ?>20 <?php if (in_array($field['type'], ['text', 'email'])): ?> 21 21 <input 22 22 type="<?php echo esc_attr($field['type']); ?>" … … 25 25 autocomplete="off" 26 26 /> 27 <?php elseif (in_array($field['type'], ['password'])): ?> 28 <div style="position: relative;"> 29 <input 30 type="<?php echo esc_attr($field['type']); ?>" 31 name="dynamic_fields[<?php echo esc_attr($key); ?>]" 32 autocomplete="off" 33 id="password2" 34 /> 35 <span id="toggle-password2" style="position: absolute; right: 10px; top: 20px; transform: translateY(-50%); cursor: pointer;"> 36 Show 37 </span> 38 </div> 27 39 <?php elseif (in_array($field['type'], ['first_name', 'last_name'])): ?> 28 40 <input … … 134 146 <div style="position: relative;"> 135 147 <input type="password" id="password" name="webdesk_approval_password" autocomplete="off" /> 136 <span id="toggle-password" style="position: absolute; right: 10px; top: 50%; transform: translateY(-50%); cursor: pointer;">148 <span id="toggle-password" style="position: absolute; right: 10px; top: 20px; transform: translateY(-50%); cursor: pointer;"> 137 149 Show 138 150 </span> … … 184 196 if ($field['type'] == 'number') { 185 197 $rules[$field_key]['customPhone'] = true; 198 } 199 if($field['type'] == 'first_name' || $field['type'] == 'last_name' ){ 200 $rules[$field_key]['onlyLetters'] = true; 186 201 } 187 202 if ($field['type'] == 'password') { … … 263 278 }); 264 279 "; 280 $inline_js2 = " 281 document.addEventListener('DOMContentLoaded', function () { 282 const togglePassword = document.getElementById('toggle-password2'); 283 const passwordField = document.getElementById('password2'); 284 285 if (togglePassword && passwordField) { 286 togglePassword.addEventListener('click', function () { 287 const type = passwordField.type === 'password' ? 'text' : 'password'; 288 passwordField.type = type; 289 togglePassword.innerHTML = type === 'password' ? 'Show' : 'Hide'; 290 }); 291 } 292 }); 293 "; 265 294 wp_add_inline_script('webdesk-approval-login', $inline_js); 295 wp_add_inline_script('webdesk-approval-registration', $inline_js2); 266 296 } 267 297 } -
webdesk-approval-manager/trunk/includes/templates/customer-list.php
r3271094 r3337017 62 62 'offset' => $offset, 63 63 'meta_query' => $meta_query, 64 'orderby' => 'ID', // or 'display_name', 'user_login', etc. 65 'order' => 'DESC' 64 66 ], $search_query); 65 67 -
webdesk-approval-manager/trunk/js/admin.js
r3271094 r3337017 123 123 jQuery(document).on("click",".preview-form-btn",function() { 124 124 jQuery('.ca-login-form').toggle(); 125 jQuery('.ca-register-form').toggle();126 125 }); 127 126 -
webdesk-approval-manager/trunk/js/registration.js
r3271094 r3337017 8 8 return /^(?=.*[A-Za-z])(?=.*\d)(?=.*[\W_]).{8,}$/.test(value); 9 9 }, "Password must contain at least one letter, one number, and one special character"); 10 11 $.validator.addMethod("onlyLetters", function(value, element) { 12 return this.optional(element) || /^[a-zA-Z\s]+$/.test(value); 13 }, "Please enter only characters."); 10 14 11 15 // Initialize form validation … … 34 38 $('.form-error-message').hide(); 35 39 $('#ca-register-form')[0].reset(); 40 setTimeout(function () { 41 $('.form-success-message').hide(); 42 }, 7000); 36 43 }, 37 44 error: function (response) { … … 39 46 $('.form-error-message').html(errorMessage).show(); 40 47 $('.form-success-message').hide(); 48 setTimeout(function () { 49 $('.form-error-message').hide(); 50 }, 7000); 41 51 } 42 52 }); -
webdesk-approval-manager/trunk/readme.txt
r3271094 r3337017 3 3 Tags: user approval, custom registration form, email notifications, user management, user registration 4 4 Requires at least: 6.0 5 Tested up to: 6. 75 Tested up to: 6.8 6 6 Requires PHP: 7.4 7 Stable tag: 1.0.1 7 Stable tag: 1.0.1 8 8 License: GPLv2 or later 9 9 License URI: https://www.gnu.org/licenses/gpl-2.0.html … … 68 68 == Changelog == 69 69 70 ### **1.0.0** 70 = 1.0.0 :: 2024-02-31 = 71 71 - Initial release with essential features for managing customer approval workflows and email automation. 72 72 - Dynamic form field management. … … 75 75 - Shortcode for frontend form. 76 76 77 = 1.0.1 :: 2025-07-31 78 * Fixed bug in ConnectException handler. 79 80 81 == Additional Information == 82 83 For support, feature requests, or bug reports, please contact us at support@webdeskinc.com. 84 77 85 == License == 78 86
Note: See TracChangeset
for help on using the changeset viewer.