Advertisement
Guest User

centuryaccountingnc

a guest
Jan 23rd, 2020
138
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 10.44 KB | None | 0 0
  1. <script src="https://kit.fontawesome.com/da28a7cbae.js"></script>
  2. <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
  3. <style>
  4. .captcha {
  5. padding-bottom: 1em !important;
  6. }
  7. .wForm .captcha .oneField {
  8. margin: 0;
  9. padding: 0;
  10. }
  11. </style>
  12. <script type="text/javascript">
  13. // initialize our variables
  14. var captchaReady = 0;
  15. var wFORMSReady = 0;
  16.  
  17. // when wForms is loaded call this
  18. var wformsReadyCallback = function () {
  19. // using this var to denote if wForms is loaded
  20. wFORMSReady = 1;
  21. // call our recaptcha function which is dependent on both
  22. // wForms and an async call to google
  23. // note the meat of this function wont fire until both
  24. // wFORMSReady = 1 and captchaReady = 1
  25. onloadCallback();
  26. }
  27. var gCaptchaReadyCallback = function() {
  28. // using this var to denote if captcha is loaded
  29. captchaReady = 1;
  30. // call our recaptcha function which is dependent on both
  31. // wForms and an async call to google
  32. // note the meat of this function wont fire until both
  33. // wFORMSReady = 1 and captchaReady = 1
  34. onloadCallback();
  35. };
  36.  
  37. // add event listener to fire when wForms is fully loaded
  38. document.addEventListener("wFORMSLoaded", wformsReadyCallback);
  39.  
  40. var enableSubmitButton = function() {
  41. var submitButton = document.getElementById('submit_button');
  42. var explanation = document.getElementById('disabled-explanation');
  43. if (submitButton != null) {
  44. submitButton.removeAttribute('disabled');
  45. if (explanation != null) {
  46. explanation.style.display = 'none';
  47. }
  48. }
  49. };
  50. var disableSubmitButton = function() {
  51. var submitButton = document.getElementById('submit_button');
  52. var explanation = document.getElementById('disabled-explanation');
  53. if (submitButton != null) {
  54. submitButton.disabled = true;
  55. if (explanation != null) {
  56. explanation.style.display = 'block';
  57. }
  58. }
  59. };
  60.  
  61. // call this on both captcha async complete and wforms fully
  62. // initialized since we can't be sure which will complete first
  63. // and we need both done for this to function just check that they are
  64. // done to fire the functionality
  65. var onloadCallback = function () {
  66. // if our captcha is ready (async call completed)
  67. // and wFORMS is completely loaded then we are ready to add
  68. // the captcha to the page
  69. if (captchaReady && wFORMSReady) {
  70. grecaptcha.render('g-recaptcha-render-div', {
  71. 'sitekey': '6LeISQ8UAAAAAL-Qe-lDcy4OIElnii__H_cEGV0C',
  72. 'theme': 'light',
  73. 'size': 'normal',
  74. 'callback': 'enableSubmitButton',
  75. 'expired-callback': 'disableSubmitButton'
  76. });
  77. var oldRecaptchaCheck = parseInt('1');
  78. if (oldRecaptchaCheck === -1) {
  79. var standardCaptcha = document.getElementById("tfa_captcha_text");
  80. standardCaptcha = standardCaptcha.parentNode.parentNode.parentNode;
  81. standardCaptcha.parentNode.removeChild(standardCaptcha);
  82. }
  83.  
  84. if (!wFORMS.instances['paging']) {
  85. document.getElementById("g-recaptcha-render-div").parentNode.parentNode.parentNode.style.display = "block";
  86. //document.getElementById("g-recaptcha-render-div").parentNode.parentNode.parentNode.removeAttribute("hidden");
  87. }
  88. document.getElementById("g-recaptcha-render-div").getAttributeNode('id').value = 'tfa_captcha_text';
  89.  
  90. var captchaError = '';
  91. if (captchaError == '1') {
  92. var errMsgText = 'The CAPTCHA was not completed successfully.';
  93. var errMsgDiv = document.createElement('div');
  94. errMsgDiv.id = "tfa_captcha_text-E";
  95. errMsgDiv.className = "err errMsg";
  96. errMsgDiv.innerText = errMsgText;
  97. var loc = document.querySelector('.g-captcha-error');
  98. loc.insertBefore(errMsgDiv, loc.childNodes[0]);
  99.  
  100. /* See wFORMS.behaviors.paging.applyTo for origin of this code */
  101. if (wFORMS.instances['paging']) {
  102. var b = wFORMS.instances['paging'][0];
  103. var pp = base2.DOM.Element.querySelector(document, wFORMS.behaviors.paging.CAPTCHA_ERROR);
  104. if (pp) {
  105. var lastPage = 1;
  106. for (var i = 1; i < 100; i++) {
  107. if (b.behavior.isLastPageIndex(i)) {
  108. lastPage = i;
  109. break;
  110. }
  111. }
  112. b.jumpTo(lastPage);
  113. }
  114. }
  115. }
  116. }
  117. };
  118. </script>
  119. <script src='https://www.google.com/recaptcha/api.js?onload=gCaptchaReadyCallback&render=explicit' async
  120. defer></script>
  121. <script type="text/javascript">
  122. document.addEventListener("DOMContentLoaded", function() {
  123. var warning = document.getElementById("javascript-warning");
  124. if (warning != null) {
  125. warning.parentNode.removeChild(warning);
  126. }
  127. var oldRecaptchaCheck = parseInt('1');
  128. if (oldRecaptchaCheck !== -1) {
  129. var explanation = document.getElementById('disabled-explanation');
  130. var submitButton = document.getElementById('submit_button');
  131. if (submitButton != null) {
  132. submitButton.disabled = true;
  133. if (explanation != null) {
  134. explanation.style.display = 'block';
  135. }
  136. }
  137. }
  138. });
  139. </script>
  140. <script type="text/javascript">
  141. document.addEventListener("DOMContentLoaded", function(){
  142. const FORM_TIME_START = Math.floor((new Date).getTime()/1000);
  143. let formElement = document.getElementById("tfa_0");
  144. if (null === formElement) {
  145. formElement = document.getElementById("0");
  146. }
  147. let appendJsTimerElement = function(){
  148. let formTimeDiff = Math.floor((new Date).getTime()/1000) - FORM_TIME_START;
  149. let cumulatedTimeElement = document.getElementById("tfa_dbCumulatedTime");
  150. if (null !== cumulatedTimeElement) {
  151. let cumulatedTime = parseInt(cumulatedTimeElement.value);
  152. if (null !== cumulatedTime && cumulatedTime > 0) {
  153. formTimeDiff += cumulatedTime;
  154. }
  155. }
  156. let jsTimeInput = document.createElement("input");
  157. jsTimeInput.setAttribute("type", "hidden");
  158. jsTimeInput.setAttribute("value", formTimeDiff.toString());
  159. jsTimeInput.setAttribute("name", "tfa_dbElapsedJsTime");
  160. jsTimeInput.setAttribute("id", "tfa_dbElapsedJsTime");
  161. jsTimeInput.setAttribute("autocomplete", "off");
  162. if (null !== formElement) {
  163. formElement.appendChild(jsTimeInput);
  164. }
  165. };
  166. if (null !== formElement) {
  167. if(formElement.addEventListener){
  168. formElement.addEventListener('submit', appendJsTimerElement, false);
  169. } else if(formElement.attachEvent){
  170. formElement.attachEvent('onsubmit', appendJsTimerElement);
  171. }
  172. }
  173. });
  174. </script>
  175.  
  176. <link href="https://www.tfaforms.com/dist/form-builder/5.0.0/wforms-layout.css?v=546" rel="stylesheet" type="text/css" />
  177.  
  178. <link href="https://www.tfaforms.com/uploads/themes/theme-52913.css" rel="stylesheet" type="text/css" />
  179. <link href="https://www.tfaforms.com/dist/form-builder/5.0.0/wforms-jsonly.css?v=546" rel="alternate stylesheet" title="This stylesheet activated by javascript" type="text/css" />
  180. <script type="text/javascript" src="https://www.tfaforms.com/wForms/3.11/js/wforms.js?v=546"></script>
  181. <script type="text/javascript">
  182. wFORMS.behaviors.prefill.skip = false;
  183. </script>
  184. <script type="text/javascript" src="https://www.tfaforms.com/wForms/3.11/js/localization-en_US.js?v=546"></script>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement