Changeset 2993315
- Timestamp:
- 11/09/2023 02:58:13 PM (2 years ago)
- Location:
- registerone-event-forms/trunk
- Files:
-
- 2 added
- 7 edited
-
admin/classes/RegisteroneShortcodes.php (modified) (11 diffs)
-
front-end/assets/countries.json (modified) (1 diff)
-
front-end/assets/js/cart-custom.js (modified) (1 diff)
-
front-end/assets/js/form-cc_mask.js (modified) (2 diffs)
-
front-end/assets/js/savy.js (added)
-
front-end/assets/js/savy.min.js (added)
-
front-end/assets/map_custom_front.css (modified) (2 diffs)
-
readme.txt (modified) (4 diffs)
-
registerone-wordpress-client.php (modified) (4 diffs)
Legend:
- Unmodified
- Added
- Removed
-
registerone-event-forms/trunk/admin/classes/RegisteroneShortcodes.php
r2981430 r2993315 3715 3715 <select name="billingCountry" id="country-alpha-2" required="" class="form-control" style="width:160px"> 3716 3716 <option value="">Select</option> 3717 <option value="US">United States</option> 3717 3718 </select> 3718 3719 </div> … … 5010 5011 </div> 5011 5012 </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"> 5013 5014 <div class="loader"></div> 5014 5015 <button id="MapFlex-nav-toggle"><span class="glyphicon glyphicon-menu-left"></span></button> … … 5336 5337 $(this).find('span').addClass("glyphicon-menu-right"); 5337 5338 $(".MapFlex-nav").removeClass("col-sm-3"); 5339 $(".MapFlex-content").removeClass("col-xs-9"); 5340 $(".MapFlex-content").addClass("col-xs-12"); 5338 5341 $(".MapFlex-content").removeClass("col-sm-9"); 5339 5342 $(".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"); 5340 5347 if($(window).width()<768){ 5341 5348 $(".MapFlex-content").css("height","100%"); … … 5345 5352 $(this).find('span').addClass("glyphicon-menu-left"); 5346 5353 $(".MapFlex-nav").addClass("col-sm-3"); 5354 $(".MapFlex-content").removeClass("col-xs-12"); 5355 $(".MapFlex-content").addClass("col-xs-9"); 5347 5356 $(".MapFlex-content").removeClass("col-sm-12"); 5348 5357 $(".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"); 5349 5362 if($(window).width()<768){ 5350 5363 $(".MapFlex-content").css("height","50%"); … … 5354 5367 }); 5355 5368 }); 5356 5357 5369 })( jQuery ); 5358 5359 5370 5360 5371 async function initMap(){ … … 5561 5572 }; 5562 5573 5563 $("#vendorModal").modal('show');5564 5565 $(".booth-details-loader").show();5566 5567 5574 $("#vendor-form-horizontal").empty(); 5568 5575 $("#vendor-modal-title").empty(); 5576 $("#vendor-modal-logo").attr("src", ''); 5577 5578 $("#vendorModal").modal('show'); 5579 $(".booth-details-loader").show(); 5569 5580 5570 5581 $.post(ajax_url, post_data, function (data) { … … 5577 5588 var b_fields = json['event_a']['booth_details']; 5578 5589 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 } 5581 5595 5582 5596 $.each(b_fields, function(index, value) { … … 5591 5605 field_data_rev = field_data.split("").reverse().join(""); 5592 5606 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(""); 5595 5609 5596 5610 if(field_label == 'undefined'){ 5597 5611 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>"); 5600 5614 }else{ 5601 5615 $('#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>"); 5602 5616 } 5603 5617 }); 5604 5605 $("#vendor-modal-title").text(v_data['vendor_name']);5606 5607 $("#vendor-modal-logo").attr("src",v_data['vendor_logo']);5608 5618 5609 5619 } catch (error) { … … 5782 5792 if($this->_count_array($formData['amenities_selector_a']) > 0){ 5783 5793 ?> 5784 5785 5794 <div class="col-lg-offset-2"> 5786 5795 <?php if(!empty($formData['amenity_note'])): ?> … … 5854 5863 <?php if($formData['order_lock'] == 0 && $map_policy == 2): ?> 5855 5864 <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> 5857 5869 5858 5870 <?php elseif($formData['order_lock'] == 1 && $map_policy == 2): ?> … … 10153 10165 } 10154 10166 ?> 10155 v3.6.1 510167 v3.6.16 10156 10168 : <a href="https://app.registerone.com/privacy-policy" target="_blank">Privacy Policy</a> 10157 10169 <?php -
registerone-event-forms/trunk/front-end/assets/countries.json
r2219338 r2993315 1 1 [ 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 },15 2 { 16 3 "name": "Albania", -
registerone-event-forms/trunk/front-end/assets/js/cart-custom.js
r2219338 r2993315 25 25 excluded: '#ccnum' 26 26 }); 27 28 $('.auto-save').savy('load'); 27 29 }); -
registerone-event-forms/trunk/front-end/assets/js/form-cc_mask.js
r2219338 r2993315 1 jQuery(document).ready(function($) {1 jQuery(document).ready(function($) { 2 2 3 3 var masking = { 4 // User defined Values5 creditCardId: 'ccnum',6 maskedNumber: 'X',7 8 // object re: credit cards9 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': 216 },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': 123 },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': 230 },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': 737 }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 react47 createShell : function(input) {48 var text = '',49 50 // https://stackoverflow.com/questions/12625717/check-if-attributeid-exists-in-jquery51 // https://stackoverflow.com/questions/12161132/is-there-a-way-that-i-can-check-if-a-data-attribute-exists52 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) { 73 73 input.addEventListener('keyup', function(e) { 74 masking.handleValueChange(e);74 masking.handleValueChange(e); 75 75 }, false); 76 76 input.addEventListener('blur', function(e) { 77 masking.handleBlur(e);77 masking.handleBlur(e); 78 78 }, false); 79 79 input.addEventListener('focus', function(e) { 80 masking.handleFocus(e);80 masking.handleFocus(e); 81 81 }, 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); 92 295 } 93 94 // If value is empty, not a number or out of range, remove any current cc type selection95 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 universe102 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/plugins112 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 class118 // e.target.parentNode.parentNode.classList.add(cc.card);119 120 // set the credit card regex121 e.target.setAttribute('pattern', cc.pattern);122 123 // set the credit card pattern124 e.target.setAttribute('data-placeholder', cc.placeholder);125 126 // handle the current value127 e.target.value = masking.handleCurrentValue(e);128 129 // set the inputmask130 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 placeholder139 input.setAttribute('data-placeholder', placeholder);140 document.getElementById(e.target.id + 'Mask').innerHTML = "<i></i>" + placeholder;141 142 // remove possible credit card classes143 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 empty149 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 class163 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 only180 len = strippedValue.length, // 15 or amex, all others 16181 digit = strippedValue[len-1], // tester digit182 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 only203 len = strippedValue.length, // usually 16204 digit = strippedValue[len-1], // tester digit205 testDigits = strippedValue.substr(0, len - 1), // 15 or 12 digits206 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-digit227 else if card number is 13 digit, then fetch first 12 digits (card12) and last digit is check-digit228 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 specifi245 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 instead250 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 characters255 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 characters266 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 function277 return newValue;278 } else {279 newValue += placeholder[i];280 }281 // break if no characters left and the pattern is non-special character282 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 }294 296 } 295 297 296 if (jQuery("#ccnum").length) {298 if (jQuery("#ccnum").length) { 297 299 masking.init(); 298 300 } … … 300 302 // var foo = document.getElementById('cc') 301 303 }); 302 -
registerone-event-forms/trunk/front-end/assets/map_custom_front.css
r2981430 r2993315 80 80 81 81 #vendor-modal-logo { 82 float: right;83 82 max-height: 100px; 84 margin-right: 20px; 83 margin-right: 14px; 84 max-width: 200px; 85 85 } 86 86 … … 438 438 439 439 #map{ 440 width: 1 00%;440 width: 110%; 441 441 height: 100%; 442 442 } -
registerone-event-forms/trunk/readme.txt
r2981430 r2993315 6 6 Author: RegisterONE 7 7 Requires at least: 5 8 Tested up to: 6. 29 Version 3.6.1 510 Stable tag: 3.6.1 58 Tested up to: 6.4 9 Version 3.6.16 10 Stable tag: 3.6.16 11 11 Requires PHP: 7.4 12 12 License: GPLv2 or later … … 26 26 27 27 == 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.30 28 31 29 **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. … … 138 136 == Changelog == 139 137 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 140 143 = 3.6.15 = 141 144 * FIX: Scroll issue on map vendor listing … … 460 463 == Upgrade Notice == 461 464 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 4 4 Plugin URI: https://www.registerone.com 5 5 Description: RegisterONE – Exhibitor Registration, Advanced Booth Mapping, Ticketing 6 Version: 3.6.1 56 Version: 3.6.16 7 7 Author: RegisterONE 8 8 Author URI: http://www.registerone.com … … 324 324 global $post; 325 325 326 $script_rev = '202 210280918';326 $script_rev = '202311090808'; 327 327 328 328 if( is_a( $post, 'WP_Post' ) && has_shortcode( $post->post_content, $this->short_code)){ … … 656 656 )); 657 657 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 658 661 wp_register_script('dwc form-purify js', REGISTERONE_WORDPRESS_CLIENT_URL . '/front-end/assets/js/form-purify.js', array(), $script_rev); 659 662 wp_enqueue_script('dwc form-purify js'); … … 773 776 wp_register_script('dwc parsley js', REGISTERONE_WORDPRESS_CLIENT_URL . '/front-end/assets/js/parsley.min.js', array(), $script_rev); 774 777 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');781 778 782 779 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.