Plugin Directory

Changeset 2993315


Ignore:
Timestamp:
11/09/2023 02:58:13 PM (2 years ago)
Author:
registerone
Message:

v3.6.16

Location:
registerone-event-forms/trunk
Files:
2 added
7 edited

Legend:

Unmodified
Added
Removed
  • registerone-event-forms/trunk/admin/classes/RegisteroneShortcodes.php

    r2981430 r2993315  
    37153715                                                                <select name="billingCountry" id="country-alpha-2" required="" class="form-control" style="width:160px">
    37163716                                                                    <option value="">Select</option>
     3717                                                                    <option value="US">United States</option>
    37173718                                                                </select>
    37183719                                                            </div>
     
    50105011                </div>
    50115012            </div>
    5012             <div class="MapFlex-content col-sm-9">
     5013            <div class="MapFlex-content col-xs-9 col-sm-9 col-md-9 col-lg-9">
    50135014                <div class="loader"></div>
    50145015                <button id="MapFlex-nav-toggle"><span class="glyphicon glyphicon-menu-left"></span></button>
     
    53365337                            $(this).find('span').addClass("glyphicon-menu-right");
    53375338                            $(".MapFlex-nav").removeClass("col-sm-3");
     5339                            $(".MapFlex-content").removeClass("col-xs-9");
     5340                            $(".MapFlex-content").addClass("col-xs-12");
    53385341                            $(".MapFlex-content").removeClass("col-sm-9");
    53395342                            $(".MapFlex-content").addClass("col-sm-12");
     5343                            $(".MapFlex-content").removeClass("col-md-9");
     5344                            $(".MapFlex-content").addClass("col-md-12");
     5345                            $(".MapFlex-content").removeClass("col-lg-9");
     5346                            $(".MapFlex-content").addClass("col-lg-12");
    53405347                            if($(window).width()<768){
    53415348                                $(".MapFlex-content").css("height","100%");
     
    53455352                            $(this).find('span').addClass("glyphicon-menu-left");
    53465353                            $(".MapFlex-nav").addClass("col-sm-3");
     5354                            $(".MapFlex-content").removeClass("col-xs-12");
     5355                            $(".MapFlex-content").addClass("col-xs-9");
    53475356                            $(".MapFlex-content").removeClass("col-sm-12");
    53485357                            $(".MapFlex-content").addClass("col-sm-9");
     5358                            $(".MapFlex-content").removeClass("col-md-12");
     5359                            $(".MapFlex-content").addClass("col-md-9");
     5360                            $(".MapFlex-content").removeClass("col-lg-12");
     5361                            $(".MapFlex-content").addClass("col-lg-9");
    53495362                            if($(window).width()<768){
    53505363                                $(".MapFlex-content").css("height","50%");
     
    53545367                    });
    53555368                });
    5356 
    53575369            })( jQuery );
    5358 
    53595370
    53605371            async function initMap(){
     
    55615572                    };
    55625573
    5563                     $("#vendorModal").modal('show');
    5564 
    5565                     $(".booth-details-loader").show();
    5566 
    55675574                    $("#vendor-form-horizontal").empty();
    55685575                    $("#vendor-modal-title").empty();
     5576                    $("#vendor-modal-logo").attr("src", '');
     5577
     5578                    $("#vendorModal").modal('show');
     5579                    $(".booth-details-loader").show();
    55695580
    55705581                    $.post(ajax_url, post_data, function (data) {
     
    55775588                            var b_fields = json['event_a']['booth_details'];
    55785589
    5579                             // console.log(v_data);
    5580                             // logo_display_1035-649
     5590                            // $("#vendor-modal-title").text(v_data['vendor_name']);
     5591
     5592                            if(v_data['vendor_logo']){
     5593                                $("#vendor-modal-logo").attr("src", v_data['vendor_logo']);
     5594                            }
    55815595
    55825596                            $.each(b_fields, function(index, value) {
     
    55915605                                field_data_rev = field_data.split("").reverse().join("");
    55925606
    5593                                 var img_test = field_data_rev.split(".")[0];
    5594                                 img_test = img_test.split("").reverse().join("");
     5607                                //var img_test = field_data_rev.split(".")[0];
     5608                                //img_test = img_test.split("").reverse().join("");
    55955609
    55965610                                if(field_label == 'undefined'){
    55975611
    5598                                 }else if(img_test === 'jpg' || img_test === 'png' || img_test === 'gif' || img_test === 'jpeg'){
    5599                                     $('#vendor-form-horizontal').append("<div class='form-group'><img class='company-detail-logo control-label col-md-12' src=" + field_data + "></div>");
     5612                                //}else if(img_test === 'jpg' || img_test === 'png' || img_test === 'gif' || img_test === 'jpeg'){
     5613                                //    $('#vendor-form-horizontal').append("<div class='form-group'><img class='company-detail-logo control-label col-md-12' src=" + field_data + "></div>");
    56005614                                }else{
    56015615                                    $('#vendor-form-horizontal').append("<div class='form-group'><label class='control-label col-md-3'>" + field_label + "</label><label class='control-data col-md-9'>" + field_data + "</label></div>");
    56025616                                }
    56035617                            });
    5604 
    5605                             $("#vendor-modal-title").text(v_data['vendor_name']);
    5606 
    5607                             $("#vendor-modal-logo").attr("src",v_data['vendor_logo']);
    56085618
    56095619                        } catch (error) {
     
    57825792        if($this->_count_array($formData['amenities_selector_a']) > 0){
    57835793            ?>
    5784 
    57855794            <div class="col-lg-offset-2">
    57865795                <?php if(!empty($formData['amenity_note'])): ?>
     
    58545863                                        <?php if($formData['order_lock'] == 0 && $map_policy == 2): ?>
    58555864                                            <a href="<?php echo esc_url($this->_get_skip_url(['amenities' => '', 'map' => $selectorKey, 'pk' => $pk])); ?>"
    5856                                                class="btn btn-success" style="text-decoration: none; margin-left: 15px; margin-bottom: 6px; margin-top: 2px;"><?= $map_button_label ?> <?php echo $selector; ?></a>
     5865                                               class="btn btn-success"
     5866                                               style="text-decoration: none; margin-left: 15px; margin-bottom: 6px; margin-top: 2px;">
     5867                                               <?= $map_button_label ?> <?php echo $selector; ?>
     5868                                            </a>
    58575869
    58585870                                        <?php elseif($formData['order_lock'] == 1 && $map_policy == 2): ?>
     
    1015310165                            }
    1015410166                            ?>
    10155                             v3.6.15
     10167                            v3.6.16
    1015610168                            : <a href="https://app.registerone.com/privacy-policy" target="_blank">Privacy Policy</a>
    1015710169                            <?php
  • registerone-event-forms/trunk/front-end/assets/countries.json

    r2219338 r2993315  
    11[
    2   {
    3     "name": "United States",
    4     "alpha_2": "US",
    5     "alpha_3": "USA",
    6     "country-code": "840",
    7     "iso_3166-2": "ISO 3166-2:US",
    8     "region": "Americas",
    9     "sub-region": "Northern America",
    10     "intermediate-region": "",
    11     "region-code": "019",
    12     "sub-region-code": "021",
    13     "intermediate-region-code": ""
    14   },
    152  {
    163    "name": "Albania",
  • registerone-event-forms/trunk/front-end/assets/js/cart-custom.js

    r2219338 r2993315  
    2525        excluded: '#ccnum'
    2626    });
     27
     28    $('.auto-save').savy('load');
    2729});
  • registerone-event-forms/trunk/front-end/assets/js/form-cc_mask.js

    r2219338 r2993315  
    1 jQuery(document).ready(function($){
     1jQuery(document).ready(function($) {
    22
    33    var masking = {
    4       // User defined Values
    5       creditCardId : 'ccnum',
    6       maskedNumber : 'X',
    7 
    8       // object re: credit cards
    9       cardMasks : {
    10                     3: {
    11                       'card' : 'amex',
    12                       'placeholder' : 'XXXX XXXXXX XXXXX',
    13                       'pattern' : '3\[47\]\\d \\d{6} \\d{5}',
    14                       'regex': /^3[47]/,
    15                       'regLength' : 2
    16                     },
    17                     4: {
    18                       'card' : 'visa',
    19                       'placeholder' : 'XXXX XXXX XXXX XXXX',
    20                       'pattern' : '4\\d{3} \\d{4} \\d{4} \\d{4}',
    21                       'regex' : /^4/,
    22                       'regLength' : 1
    23                     },
    24                     5: {
    25                       'card' : 'mc',
    26                       'placeholder' : 'XXXX XXXX XXXX XXXX',
    27                       'pattern' : '5\[1-5\]\\d{2} \\d{4} \\d{4} \\d{4}',
    28                       'regex' : /^5[1-5]/,
    29                       'regLength' : 2
    30                     },
    31                     6: {
    32                       'card' : 'discover',
    33                       'placeholder' : 'XXXX XXXX XXXX XXXX',
    34                       'pattern' : '(6011 \\d\\d|6221 2\[6-9\]|6221 3\\d|622\[2-8\] \\d\\d|6229 \[01\]\\d|6229 2\[0-5\]|6226 4\[4-9\]|65\\d\\d \\d\\d)\\d{2} \\d{4} \\d{4}',
    35                       'regex' : /^(6011|6221 2[6-9]|6221 3|622[2-8]|6229 [01]|6229 2[0-5]|6226 4[4-9]|65)/,
    36                       'regLength' : 7
    37                     }
    38                 },
    39 
    40       init: function () {
    41         masking.createShell(document.getElementById(masking.creditCardId));
    42         masking.activateMasking(document.getElementById(masking.creditCardId));
    43       },
    44 
    45       // replaces each masked input with a shall containing the input and it's mask.
    46       // this should be credit card render in react
    47       createShell : function (input) {
    48         var text = '',
    49 
    50         // https://stackoverflow.com/questions/12625717/check-if-attributeid-exists-in-jquery
    51         // https://stackoverflow.com/questions/12161132/is-there-a-way-that-i-can-check-if-a-data-attribute-exists
    52           placeholder = input.getAttribute('placeholder');
    53 
    54           input.setAttribute('data-placeholder', placeholder);
    55           input.setAttribute('data-original-placeholder', placeholder);
    56           input.removeAttribute('placeholder');
    57 
    58           text = '<span class="shell">' +
    59           '<span aria-hidden="true" id="' + input.id +
    60           'Mask"><i></i>' + placeholder + '</span>' +
    61           input.outerHTML +
    62           '</span>';
    63 
    64           input.outerHTML = text;
    65       },
    66 
    67       setValueOfMask : function (value, placeholder) {
    68         return "<i>" + value + "</i>" + placeholder.substr(value.length);
    69       },
    70 
    71       // add event listeners. only did IE9+. Do we need attach Event?
    72       activateMasking : function (input) {
     4        // User defined Values
     5        creditCardId: 'ccnum',
     6        maskedNumber: 'X',
     7
     8        // object re: credit cards
     9        cardMasks: {
     10            3: {
     11                'card': 'amex',
     12                'placeholder': 'XXXX XXXXXX XXXXX',
     13                'pattern': '3\[47\]\\d \\d{6} \\d{5}',
     14                'regex': /^3[47]/,
     15                'regLength': 2
     16            },
     17            4: {
     18                'card': 'visa',
     19                'placeholder': 'XXXX XXXX XXXX XXXX',
     20                'pattern': '4\\d{3} \\d{4} \\d{4} \\d{4}',
     21                'regex': /^4/,
     22                'regLength': 1
     23            },
     24            5: {
     25                'card': 'mc',
     26                'placeholder': 'XXXX XXXX XXXX XXXX',
     27                'pattern': '5\[1-5\]\\d{2} \\d{4} \\d{4} \\d{4}',
     28                'regex': /^5[1-5]/,
     29                'regLength': 2
     30            },
     31            6: {
     32                'card': 'discover',
     33                'placeholder': 'XXXX XXXX XXXX XXXX',
     34                'pattern': '(6011 \\d\\d|6221 2\[6-9\]|6221 3\\d|622\[2-8\] \\d\\d|6229 \[01\]\\d|6229 2\[0-5\]|6226 4\[4-9\]|65\\d\\d \\d\\d)\\d{2} \\d{4} \\d{4}',
     35                'regex': /^(6011|6221 2[6-9]|6221 3|622[2-8]|6229 [01]|6229 2[0-5]|6226 4[4-9]|65)/,
     36                'regLength': 7
     37            }
     38        },
     39
     40        init: function() {
     41            masking.createShell(document.getElementById(masking.creditCardId));
     42            masking.activateMasking(document.getElementById(masking.creditCardId));
     43        },
     44
     45        // replaces each masked input with a shall containing the input and it's mask.
     46        // this should be credit card render in react
     47        createShell: function(input) {
     48            var text = '',
     49
     50                // https://stackoverflow.com/questions/12625717/check-if-attributeid-exists-in-jquery
     51                // https://stackoverflow.com/questions/12161132/is-there-a-way-that-i-can-check-if-a-data-attribute-exists
     52                placeholder = input.getAttribute('placeholder');
     53
     54            input.setAttribute('data-placeholder', placeholder);
     55            input.setAttribute('data-original-placeholder', placeholder);
     56            input.removeAttribute('placeholder');
     57
     58            text = '<span class="shell">' +
     59                '<span aria-hidden="true" id="' + input.id +
     60                'Mask"><i></i>' + placeholder + '</span>' +
     61                input.outerHTML +
     62                '</span>';
     63
     64            input.outerHTML = text;
     65        },
     66
     67        setValueOfMask: function(value, placeholder) {
     68            return "<i>" + value + "</i>" + placeholder.substr(value.length);
     69        },
     70
     71        // add event listeners. only did IE9+. Do we need attach Event?
     72        activateMasking: function(input) {
    7373            input.addEventListener('keyup', function(e) {
    74               masking.handleValueChange(e);
     74                masking.handleValueChange(e);
    7575            }, false);
    7676            input.addEventListener('blur', function(e) {
    77               masking.handleBlur(e);
     77                masking.handleBlur(e);
    7878            }, false);
    7979            input.addEventListener('focus', function(e) {
    80               masking.handleFocus(e);
     80                masking.handleFocus(e);
    8181            }, false);
    82       },
    83 
    84       handleValueChange : function (e) {
    85         var id = e.target.getAttribute('id'),
    86             currentMaskValue = document.querySelector('#' + id + 'Mask i'),
    87             currentInputValue = e.target.value = e.target.value.replace(/\D/g, "");
    88 
    89         // if there is no correct mask or if value hasn't changed, move on
    90         if(!currentMaskValue  || currentInputValue == currentMaskValue.innerHTML) {
    91           return;
     82        },
     83
     84        handleValueChange: function(e) {
     85            var id = e.target.getAttribute('id'),
     86                currentMaskValue = document.querySelector('#' + id + 'Mask i'),
     87                currentInputValue = e.target.value = e.target.value.replace(/\D/g, "");
     88
     89            // if there is no correct mask or if value hasn't changed, move on
     90            if (!currentMaskValue || currentInputValue == currentMaskValue.innerHTML) {
     91                return;
     92            }
     93
     94            // If value is empty, not a number or out of range, remove any current cc type selection
     95            if (!currentInputValue || currentInputValue[0] < 3 || currentInputValue[0] > 6) {
     96                e.target.value = '';
     97                masking.returnToDefault(e);
     98                return;
     99            }
     100
     101            // everything is right in the universe
     102            masking.setCreditCardType(e, currentInputValue[0]);
     103
     104        },
     105
     106        setCreditCardType: function(e, firstDigit) {
     107            var cc = masking.cardMasks[firstDigit],
     108                mask = document.getElementById(e.target.id + 'Mask');
     109
     110            // alert(registerOne.pluginsUrl);
     111            // https://forms.registerone.net/wp-content/plugins
     112            var icon_url = registerOne.pluginsUrl + '/registerone-event-forms/front-end/assets/img/icons/' + cc.card + '.png';
     113
     114            $("#ccnum").css("background-image", "url('" + icon_url + "')");
     115            // $("#cclabel").html( '<img src="' + icon_url + '">' );
     116
     117            // set the credit card class
     118            // e.target.parentNode.parentNode.classList.add(cc.card);
     119
     120            // set the credit card regex
     121            e.target.setAttribute('pattern', cc.pattern);
     122
     123            // set the credit card pattern
     124            e.target.setAttribute('data-placeholder', cc.placeholder);
     125
     126            // handle the current value
     127            e.target.value = masking.handleCurrentValue(e);
     128
     129            // set the inputmask
     130            mask.innerHTML = masking.setValueOfMask(e.target.value, cc.placeholder);
     131        },
     132
     133        returnToDefault: function(e) {
     134            console.log('return to default');
     135            var input = e.target,
     136                placeholder = input.getAttribute('data-original-placeholder');
     137
     138            // set original placeholder
     139            input.setAttribute('data-placeholder', placeholder);
     140            document.getElementById(e.target.id + 'Mask').innerHTML = "<i></i>" + placeholder;
     141
     142            // remove possible credit card classes
     143            input.parentNode.parentNode.classList.remove('error');
     144            for (var i = 3; i <= 6; i++) {
     145                e.target.parentNode.parentNode.classList.remove(masking.cardMasks[i].card);
     146            }
     147
     148            // make sure value is empty
     149            input.value = '';
     150        },
     151
     152        handleFocus: function(e) {
     153            var parentLI = e.target.parentNode.parentNode;
     154            parentLI.classList.add('focus');
     155        },
     156
     157        handleBlur: function(e) {
     158            var parentLI = e.target.parentNode.parentNode,
     159                currValue = e.target.value,
     160                pattern, mod10, mod11 = true;
     161
     162            // if value is empty, remove label parent class
     163            if (currValue.length == 0) {
     164                parentLI.classList.remove('focus');
     165            } else {
     166                pattern = new RegExp(e.target.getAttribute('pattern'));
     167                if (mod11 && currValue.replace(/\D/g, '').length == 16) {
     168                    console.log(masking.testMod11(currValue));
     169                }
     170                if (currValue.match(pattern) && masking.testMod10(currValue)) {
     171                    parentLI.classList.remove('error');
     172                } else {
     173                    parentLI.classList.add('error');
     174                }
     175            }
     176        },
     177
     178        testMod10: function(value) {
     179            var strippedValue = value.replace(/\D/g, ''), // numbers only
     180                len = strippedValue.length, // 15 or amex, all others 16
     181                digit = strippedValue[len - 1], // tester digit
     182                i, myCheck,
     183                total = 0,
     184                temp;
     185            for (i = 2; i <= len; i++) {
     186                if (i % 2 == 0) {
     187                    temp = strippedValue[len - i] * 2;
     188                    if (temp >= 10) {
     189                        total += 1 + (temp % 10);
     190                    } else {
     191                        total += temp * 1;
     192                    }
     193                } else {
     194                    total += strippedValue[len - i] * 1;
     195                }
     196            }
     197            myCheck = (10 - (total % 10)) % 10;
     198            return ((myCheck + 1) % 10) == digit;
     199        },
     200
     201        testMod11: function(value) {
     202            var strippedValue = value.replace(/\D/g, ''), // numbers only
     203                len = strippedValue.length, // usually 16
     204                digit = strippedValue[len - 1], // tester digit
     205                testDigits = strippedValue.substr(0, len - 1), // 15 or 12 digits
     206                i, myCheck,
     207                total = 0,
     208                temp;
     209
     210            for (i = len - 1; i > 0;) {
     211                temp = Number(testDigits[--i]);
     212                if (i % 2 == 0) {
     213                    temp *= 2;
     214                }
     215
     216                if (temp > 9) {
     217                    temp -= 9;
     218                }
     219
     220                total += temp;
     221                //console.log(total + " : " + temp);
     222            }
     223            console.log("Total: " + total);
     224
     225            /*
     226               if card number is 16 digit, then fetch first 15 digits (card15) and last digit is check-digit
     227               else if card number is 13 digit, then fetch first 12 digits (card12) and last digit is check-digit
     228               as we don't have 13 digit card numbers, we're only doing 16 test.*/
     229
     230
     231            myCheck = (10 - (total % 10)) % 10;
     232            myCheck = (myCheck + 1) % 10;
     233            console.log("MyCheck: " + myCheck);
     234            var PAN = '' + testDigits + myCheck;
     235            console.log("Passed PAN {}" + strippedValue);
     236            console.log("Calculated PAN {}" + PAN);
     237            if (myCheck == digit && PAN == strippedValue) {
     238                return true;
     239            } else {
     240                return false;
     241            }
     242        },
     243
     244        // tests whether there is an error in the credit card number at a specifi
     245        testRegExProgression: function(e, value) {
     246            var cc = masking.cardMasks[value[0]];
     247            if (value.length >= cc.regLength) {
     248                if (!cc.regex.test(value) && !e.target.parentNode.parentNode.classList.contains('error')) {
     249                    // show error message instead
     250                    e.target.parentNode.parentNode.classList.add('error');
     251                    masking.errorOnKeyEntry('You have an error in your credit card number', e);
     252                }
     253            } else {
     254                // remove error notfications if they deleted the excess characters
     255                e.target.parentNode.parentNode.classList.remove('error');
     256            }
     257
     258        },
     259
     260        handleCurrentValue: function(e) {
     261            var placeholder = e.target.getAttribute('data-placeholder'),
     262                value = e.target.value,
     263                l = placeholder.length,
     264                newValue = '',
     265                i, j, isInt, strippedValue;
     266
     267            // strip special characters
     268            strippedValue = value.replace(/\D/g, "");
     269
     270            for (i = 0, j = 0; i < l; i++) {
     271                var x =
     272                    isInt = !isNaN(parseInt(strippedValue[j]));
     273                matchesNumber = masking.maskedNumber.indexOf(placeholder[i]) >= 0;
     274
     275                if (matchesNumber && isInt) {
     276                    newValue += strippedValue[j++];
     277                } else if (!isInt && matchesNumber) {
     278                    // masking.errorOnKeyEntry(); // write your own error handling function
     279                    return newValue;
     280                } else {
     281                    newValue += placeholder[i];
     282                }
     283                // break if no characters left and the pattern is non-special character
     284                if (strippedValue[j] == undefined) {
     285                    break;
     286                }
     287            }
     288            masking.testRegExProgression(e, newValue);
     289
     290            return newValue;
     291        },
     292
     293        errorOnKeyEntry: function(message, e) {
     294            console.log(message);
    92295        }
    93 
    94         // If value is empty, not a number or out of range, remove any current cc type selection
    95         if (!currentInputValue || currentInputValue[0] < 3 || currentInputValue[0] > 6) {
    96           e.target.value = '';
    97           masking.returnToDefault(e);
    98           return;
    99         }
    100 
    101         // everything is right in the universe
    102         masking.setCreditCardType(e, currentInputValue[0]);
    103 
    104       },
    105 
    106       setCreditCardType : function (e, firstDigit) {
    107         var cc = masking.cardMasks[firstDigit],
    108             mask = document.getElementById(e.target.id + 'Mask');
    109 
    110           // alert(registerOne.pluginsUrl);
    111           // https://forms.registerone.net/wp-content/plugins
    112           var icon_url = registerOne.pluginsUrl + '/registerone-event-forms/front-end/assets/img/icons/' + cc.card + '.png';
    113 
    114           $("#ccnum").css("background-image", "url('" + icon_url + "')");
    115           // $("#cclabel").html( '<img src="' + icon_url + '">' );
    116 
    117           // set the credit card class
    118           // e.target.parentNode.parentNode.classList.add(cc.card);
    119 
    120           // set the credit card regex
    121           e.target.setAttribute('pattern', cc.pattern);
    122 
    123           // set the credit card pattern
    124           e.target.setAttribute('data-placeholder', cc.placeholder);
    125 
    126           // handle the current value
    127           e.target.value = masking.handleCurrentValue(e);
    128 
    129           // set the inputmask
    130           mask.innerHTML = masking.setValueOfMask(e.target.value, cc.placeholder);
    131       },
    132 
    133       returnToDefault : function(e) {
    134         console.log('return to default');
    135           var input = e.target,
    136               placeholder = input.getAttribute('data-original-placeholder');
    137 
    138           // set original placeholder
    139           input.setAttribute('data-placeholder', placeholder);
    140           document.getElementById(e.target.id + 'Mask').innerHTML = "<i></i>" + placeholder;
    141 
    142           // remove possible credit card classes
    143          input.parentNode.parentNode.classList.remove('error');
    144          for (var i = 3; i <= 6; i++) {
    145             e.target.parentNode.parentNode.classList.remove(masking.cardMasks[i].card);
    146          }
    147 
    148         // make sure value is empty
    149         input.value = '';
    150       },
    151 
    152       handleFocus : function (e) {
    153         var parentLI = e.target.parentNode.parentNode;
    154         parentLI.classList.add('focus');
    155       },
    156 
    157       handleBlur : function (e) {
    158         var parentLI = e.target.parentNode.parentNode,
    159             currValue = e.target.value,
    160             pattern, mod10, mod11 = true;
    161 
    162           // if value is empty, remove label parent class
    163           if(currValue.length == 0) {
    164             parentLI.classList.remove('focus');
    165           } else {
    166             pattern = new RegExp(e.target.getAttribute('pattern'));
    167             if (mod11 && currValue.replace(/\D/g,'').length == 16) {
    168                 console.log(masking.testMod11(currValue));
    169             }
    170             if (currValue.match(pattern) && masking.testMod10(currValue)) {
    171               parentLI.classList.remove('error');
    172             } else {
    173               parentLI.classList.add('error');
    174             }
    175           }
    176       },
    177 
    178       testMod10: function(value) {
    179         var strippedValue = value.replace(/\D/g,''), // numbers only
    180             len = strippedValue.length, // 15 or amex, all others 16
    181             digit = strippedValue[len-1], // tester digit
    182             i, myCheck,
    183             total = 0,
    184             temp;
    185          for (i = 2; i <= len; i++) {
    186             if(i % 2 == 0) {
    187               temp = strippedValue[len-i] * 2;
    188               if(temp >= 10) {
    189                 total += 1 + (temp % 10);
    190               } else {
    191                 total += temp * 1;
    192               }
    193             } else {
    194               total += strippedValue[len-i] * 1;
    195             }
    196          }
    197           myCheck = (10 - (total % 10)) % 10;
    198          return ((myCheck + 1) % 10) == digit;
    199       },
    200 
    201       testMod11: function (value) {
    202          var strippedValue = value.replace(/\D/g,''), // numbers only
    203             len = strippedValue.length, // usually 16
    204             digit = strippedValue[len-1], // tester digit
    205             testDigits = strippedValue.substr(0, len - 1), // 15 or 12 digits
    206             i, myCheck,
    207             total = 0,
    208             temp;
    209 
    210         for (i = len - 1; i > 0;) {
    211             temp = Number(testDigits[--i]);
    212             if (i % 2 == 0) {
    213                 temp *= 2;
    214             }
    215 
    216             if (temp > 9) {
    217                 temp -= 9;
    218             }
    219 
    220             total += temp;
    221             //console.log(total + " : " + temp);
    222         }
    223         console.log("Total: " + total);
    224 
    225         /*
    226            if card number is 16 digit, then fetch first 15 digits (card15) and last digit is check-digit
    227            else if card number is 13 digit, then fetch first 12 digits (card12) and last digit is check-digit
    228            as we don't have 13 digit card numbers, we're only doing 16 test.*/
    229 
    230 
    231         myCheck = (10 - (total % 10)) % 10;
    232         myCheck = (myCheck + 1) % 10;
    233         console.log("MyCheck: " + myCheck);
    234         var  PAN = '' + testDigits + myCheck;
    235         console.log("Passed PAN {}" + strippedValue);
    236         console.log("Calculated PAN {}" + PAN);
    237         if( myCheck == digit && PAN == strippedValue) {
    238           return true;
    239         } else {
    240           return false;
    241         }
    242       },
    243 
    244       // tests whether there is an error in the credit card number at a specifi
    245       testRegExProgression: function (e, value) {
    246         var cc = masking.cardMasks[value[0]];
    247         if (value.length >= cc.regLength) {
    248           if (!cc.regex.test(value) && !e.target.parentNode.parentNode.classList.contains('error')) {
    249             // show error message instead
    250             e.target.parentNode.parentNode.classList.add('error');
    251             masking.errorOnKeyEntry('You have an error in your credit card number', e);
    252           }
    253         } else {
    254           // remove error notfications if they deleted the excess characters
    255           e.target.parentNode.parentNode.classList.remove('error');
    256         }
    257 
    258       },
    259 
    260       handleCurrentValue : function (e) {
    261         var placeholder = e.target.getAttribute('data-placeholder'),
    262             value = e.target.value, l = placeholder.length, newValue = '',
    263             i, j, isInt, strippedValue;
    264 
    265         // strip special characters
    266         strippedValue = value.replace(/\D/g, "");
    267 
    268         for (i = 0, j = 0; i < l; i++) {
    269             var x =
    270             isInt = !isNaN(parseInt(strippedValue[j]));
    271             matchesNumber = masking.maskedNumber.indexOf(placeholder[i]) >= 0;
    272 
    273             if (matchesNumber && isInt) {
    274                 newValue += strippedValue[j++];
    275             } else if (!isInt && matchesNumber)  {
    276                 // masking.errorOnKeyEntry(); // write your own error handling function
    277                 return newValue;
    278             } else {
    279                 newValue += placeholder[i];
    280             }
    281             // break if no characters left and the pattern is non-special character
    282             if (strippedValue[j] == undefined) {
    283               break;
    284             }
    285         }
    286         masking.testRegExProgression(e, newValue);
    287 
    288         return newValue;
    289       },
    290 
    291       errorOnKeyEntry : function (message, e) {
    292         console.log(message);
    293       }
    294296    }
    295297
    296     if(jQuery("#ccnum").length) {
     298    if (jQuery("#ccnum").length) {
    297299        masking.init();
    298300    }
     
    300302    // var foo = document.getElementById('cc')
    301303});
    302 
  • registerone-event-forms/trunk/front-end/assets/map_custom_front.css

    r2981430 r2993315  
    8080
    8181#vendor-modal-logo {
    82     float: right;
    8382    max-height: 100px;
    84     margin-right: 20px;
     83    margin-right: 14px;
     84    max-width: 200px;
    8585}
    8686
     
    438438
    439439#map{
    440     width: 100%;
     440    width: 110%;
    441441    height: 100%;
    442442}
  • registerone-event-forms/trunk/readme.txt

    r2981430 r2993315  
    66Author: RegisterONE
    77Requires at least: 5
    8 Tested up to: 6.2
    9 Version 3.6.15
    10 Stable tag: 3.6.15
     8Tested up to: 6.4
     9Version 3.6.16
     10Stable tag: 3.6.16
    1111Requires PHP: 7.4
    1212License: GPLv2 or later
     
    2626
    2727== Features ==
    28 
    29 **NEW with v3.6.1** - **Conference/Session speaker form type with chained track selector to feed speaker profiles and conference sessions builder system.
    3028
    3129**NEW with v3.6.0** - **Booth grouping/restrictions by Applicant type (ie. Sponsors)**. This allows you to create one master form with one map that supports multiple applicant types with different booth areas restrictions. You can also setup dynamic pricing based on applicant type for maximum flexibility.
     
    138136== Changelog ==
    139137
     138= 3.6.16 =
     139* Auto-recall contact fields on cart page
     140* Moved logo in map exhibitor detail popup
     141* Fixed width CSS of main map area
     142
    140143= 3.6.15 =
    141144* FIX: Scroll issue on map vendor listing
     
    460463== Upgrade Notice ==
    461464
    462 = 3.6.15 =
    463 * FIX: Scroll issue on map vendor listing
    464 * UPDATE: Added logo in exhibitor detail popup
     465= 3.6.16 =
     466* Auto-recall contact fields on cart page
     467* Moved logo in map exhibitor detail popup
     468* Fixed width CSS of main map area
  • registerone-event-forms/trunk/registerone-wordpress-client.php

    r2981430 r2993315  
    44Plugin URI: https://www.registerone.com
    55Description: RegisterONE – Exhibitor Registration, Advanced Booth Mapping, Ticketing
    6 Version: 3.6.15
     6Version: 3.6.16
    77Author: RegisterONE
    88Author URI: http://www.registerone.com
     
    324324            global $post;
    325325
    326             $script_rev = '202210280918';
     326            $script_rev = '202311090808';
    327327
    328328            if( is_a( $post, 'WP_Post' ) && has_shortcode( $post->post_content, $this->short_code)){
     
    656656                    ));
    657657
     658                    wp_register_script('dwc savy-store-local js', REGISTERONE_WORDPRESS_CLIENT_URL . '/front-end/assets/js/savy.min.js', array(), $script_rev);
     659                    wp_enqueue_script('dwc savy-store-local js');
     660                   
    658661                    wp_register_script('dwc form-purify js', REGISTERONE_WORDPRESS_CLIENT_URL . '/front-end/assets/js/form-purify.js', array(), $script_rev);
    659662                    wp_enqueue_script('dwc form-purify js');
     
    773776                    wp_register_script('dwc parsley js', REGISTERONE_WORDPRESS_CLIENT_URL . '/front-end/assets/js/parsley.min.js', array(), $script_rev);
    774777                    wp_enqueue_script('dwc parsley js');
    775 
    776                     wp_register_script('dwc form-purify js', REGISTERONE_WORDPRESS_CLIENT_URL . '/front-end/assets/js/form-purify.js', array(), $script_rev);
    777                     wp_enqueue_script('dwc form-purify js');
    778 
    779                     wp_register_script('dwc form-fileinput js', REGISTERONE_WORDPRESS_CLIENT_URL . '/front-end/assets/js/form-fileinput.min.js', array(), $script_rev);
    780                     wp_enqueue_script('dwc form-fileinput js');
    781778
    782779                    wp_register_script('dwc jquery-ui-widget js', REGISTERONE_WORDPRESS_CLIENT_URL . '/front-end/assets/js/ui/widget.min.js', array(), $script_rev);
Note: See TracChangeset for help on using the changeset viewer.