Plugin Directory

Changeset 3337017


Ignore:
Timestamp:
07/31/2025 07:16:37 AM (8 months ago)
Author:
webdesksolution
Message:

Fixed bug in ConnectException handler

Location:
webdesk-approval-manager/trunk
Files:
6 edited

Legend:

Unmodified
Added
Removed
  • webdesk-approval-manager/trunk/includes/functions.php

    r3271094 r3337017  
    295295                allowClear: true
    296296            });
     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);
    297316
    298317            $("#automatic_approval_new").on("change", function() {
     
    386405    $saved_tags = explode(',', $automatic_approval_tags);
    387406    ?>
     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>
    388420    <div class="ca_wrap">
    389421        <h1>General Settings</h1>
  • webdesk-approval-manager/trunk/includes/shortcode.php

    r3271094 r3337017  
    1818                    <label for="<?php echo esc_attr($key); ?>"><?php echo esc_html($field['label']); ?></label>
    1919
    20                     <?php if (in_array($field['type'], ['text', 'email', 'password'])): ?>
     20                    <?php if (in_array($field['type'], ['text', 'email'])): ?>
    2121                        <input
    2222                            type="<?php echo esc_attr($field['type']); ?>"
     
    2525                            autocomplete="off"
    2626                        />
     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>
    2739                    <?php elseif (in_array($field['type'], ['first_name', 'last_name'])): ?>
    2840                        <input
     
    134146                <div style="position: relative;">
    135147                    <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;">
    137149                    Show
    138150                    </span>
     
    184196                if ($field['type'] == 'number') {
    185197                    $rules[$field_key]['customPhone'] = true;
     198                }
     199                if($field['type'] == 'first_name' || $field['type'] == 'last_name' ){
     200                    $rules[$field_key]['onlyLetters'] = true;
    186201                }
    187202                if ($field['type'] == 'password') {
     
    263278            });
    264279        ";
     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        ";
    265294        wp_add_inline_script('webdesk-approval-login', $inline_js);
     295        wp_add_inline_script('webdesk-approval-registration', $inline_js2);
    266296    }
    267297}
  • webdesk-approval-manager/trunk/includes/templates/customer-list.php

    r3271094 r3337017  
    6262        'offset'     => $offset,
    6363        'meta_query' => $meta_query,
     64        'orderby'    => 'ID', // or 'display_name', 'user_login', etc.
     65        'order'      => 'DESC'
    6466    ], $search_query);
    6567
  • webdesk-approval-manager/trunk/js/admin.js

    r3271094 r3337017  
    123123jQuery(document).on("click",".preview-form-btn",function() {
    124124    jQuery('.ca-login-form').toggle();
    125     jQuery('.ca-register-form').toggle();
    126125});
    127126
  • webdesk-approval-manager/trunk/js/registration.js

    r3271094 r3337017  
    88            return /^(?=.*[A-Za-z])(?=.*\d)(?=.*[\W_]).{8,}$/.test(value);
    99        }, "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.");
    1014
    1115        // Initialize form validation
     
    3438                        $('.form-error-message').hide();
    3539                        $('#ca-register-form')[0].reset();
     40                        setTimeout(function () {
     41                            $('.form-success-message').hide();
     42                        }, 7000);
    3643                    },
    3744                    error: function (response) {
     
    3946                        $('.form-error-message').html(errorMessage).show();
    4047                        $('.form-success-message').hide();
     48                        setTimeout(function () {
     49                            $('.form-error-message').hide();
     50                        }, 7000);
    4151                    }
    4252                });
  • webdesk-approval-manager/trunk/readme.txt

    r3271094 r3337017  
    33Tags: user approval, custom registration form, email notifications, user management, user registration 
    44Requires at least: 6.0 
    5 Tested up to: 6.7 
     5Tested up to: 6.8 
    66Requires PHP: 7.4 
    7 Stable tag: 1.0.1 
     7Stable tag: 1.0.1
    88License: GPLv2 or later 
    99License URI: https://www.gnu.org/licenses/gpl-2.0.html 
     
    6868== Changelog ==
    6969
    70 ### **1.0.0**
     70= 1.0.0 :: 2024-02-31 =
    7171- Initial release with essential features for managing customer approval workflows and email automation.
    7272- Dynamic form field management.
     
    7575- Shortcode for frontend form.
    7676
     77= 1.0.1 :: 2025-07-31
     78* Fixed bug in ConnectException handler.
     79
     80
     81== Additional Information ==
     82
     83For support, feature requests, or bug reports, please contact us at support@webdeskinc.com.
     84
    7785== License ==
    7886
Note: See TracChangeset for help on using the changeset viewer.