2-step-verification-code.html 5.7 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129
  1. <!doctype html>
  2. <!--
  3. * Tabler - Premium and Open Source dashboard template with responsive and high quality UI.
  4. * @version 1.0.0-beta20
  5. * @link https://tabler.io
  6. * Copyright 2018-2023 The Tabler Authors
  7. * Copyright 2018-2023 codecalm.net Paweł Kuna
  8. * Licensed under MIT (https://github.com/tabler/tabler/blob/master/LICENSE)
  9. -->
  10. <html lang="en">
  11. <head>
  12. <meta charset="utf-8"/>
  13. <meta name="viewport" content="width=device-width, initial-scale=1, viewport-fit=cover"/>
  14. <meta http-equiv="X-UA-Compatible" content="ie=edge"/>
  15. <title>2-Step Verification - Tabler - Premium and Open Source dashboard template with responsive and high quality UI.</title>
  16. <!-- CSS files -->
  17. <link href="./dist/css/tabler.min.css?1692870487" rel="stylesheet"/>
  18. <link href="./dist/css/tabler-flags.min.css?1692870487" rel="stylesheet"/>
  19. <link href="./dist/css/tabler-payments.min.css?1692870487" rel="stylesheet"/>
  20. <link href="./dist/css/tabler-vendors.min.css?1692870487" rel="stylesheet"/>
  21. <link href="./dist/css/demo.min.css?1692870487" rel="stylesheet"/>
  22. <style>
  23. @import url('https://rsms.me/inter/inter.css');
  24. :root {
  25. --tblr-font-sans-serif: 'Inter Var', -apple-system, BlinkMacSystemFont, San Francisco, Segoe UI, Roboto, Helvetica Neue, sans-serif;
  26. }
  27. body {
  28. font-feature-settings: "cv03", "cv04", "cv11";
  29. }
  30. </style>
  31. </head>
  32. <body class=" d-flex flex-column">
  33. <script src="./dist/js/demo-theme.min.js?1692870487"></script>
  34. <div class="page page-center">
  35. <div class="container container-tight py-4">
  36. <div class="text-center mb-4">
  37. <a href="." class="navbar-brand navbar-brand-autodark">
  38. <img src="./static/logo.svg" width="110" height="32" alt="Tabler" class="navbar-brand-image">
  39. </a>
  40. </div>
  41. <form
  42. class="card card-md"
  43. action="./"
  44. method="get"
  45. autocomplete="off"
  46. novalidate
  47. >
  48. <div class="card-body">
  49. <h2 class="card-title card-title-lg text-center mb-4">Authenticate Your Account</h2>
  50. <p class="my-4 text-center">Please confirm your account by entering the authorization code sent to <strong>+1 856-672-8552</strong>.</p>
  51. <div class="my-5">
  52. <div class="row g-4">
  53. <div class="col">
  54. <div class="row g-2">
  55. <div class="col">
  56. <input type="text" class="form-control form-control-lg text-center py-3" maxlength="1" inputmode="numeric" pattern="[0-9]*" data-code-input />
  57. </div>
  58. <div class="col">
  59. <input type="text" class="form-control form-control-lg text-center py-3" maxlength="1" inputmode="numeric" pattern="[0-9]*" data-code-input />
  60. </div>
  61. <div class="col">
  62. <input type="text" class="form-control form-control-lg text-center py-3" maxlength="1" inputmode="numeric" pattern="[0-9]*" data-code-input />
  63. </div>
  64. </div>
  65. </div>
  66. <div class="col">
  67. <div class="row g-2">
  68. <div class="col">
  69. <input type="text" class="form-control form-control-lg text-center py-3" maxlength="1" inputmode="numeric" pattern="[0-9]*" data-code-input />
  70. </div>
  71. <div class="col">
  72. <input type="text" class="form-control form-control-lg text-center py-3" maxlength="1" inputmode="numeric" pattern="[0-9]*" data-code-input />
  73. </div>
  74. <div class="col">
  75. <input type="text" class="form-control form-control-lg text-center py-3" maxlength="1" inputmode="numeric" pattern="[0-9]*" data-code-input />
  76. </div>
  77. </div>
  78. </div>
  79. </div>
  80. </div>
  81. <div class="my-4">
  82. <label class="form-check">
  83. <input type="checkbox" class="form-check-input" />
  84. Dont't ask for codes again on this device
  85. </label>
  86. </div>
  87. <div class="form-footer">
  88. <div class="btn-list flex-nowrap">
  89. <a href="./2-step-verification.html" class="btn w-100">
  90. Cancel
  91. </a>
  92. <a href="#" class="btn btn-primary w-100">
  93. Verify
  94. </a>
  95. </div>
  96. </div>
  97. </div>
  98. </form>
  99. <div class="text-center text-secondary mt-3">
  100. It may take a minute to receive your code. Haven't received it? <a href="./">Resend a new code.</a>
  101. </div>
  102. </div>
  103. </div>
  104. <!-- Libs JS -->
  105. <!-- Tabler Core -->
  106. <script src="./dist/js/tabler.min.js?1692870487" defer></script>
  107. <script src="./dist/js/demo.min.js?1692870487" defer></script>
  108. <script>
  109. document.addEventListener("DOMContentLoaded", function() {
  110. var inputs = document.querySelectorAll('[data-code-input]');
  111. // Attach an event listener to each input element
  112. for(let i = 0; i < inputs.length; i++) {
  113. inputs[i].addEventListener('input', function(e) {
  114. // If the input field has a character, and there is a next input field, focus it
  115. if(e.target.value.length === e.target.maxLength && i + 1 < inputs.length) {
  116. inputs[i + 1].focus();
  117. }
  118. });
  119. inputs[i].addEventListener('keydown', function(e) {
  120. // If the input field is empty and the keyCode for Backspace (8) is detected, and there is a previous input field, focus it
  121. if(e.target.value.length === 0 && e.keyCode === 8 && i > 0) {
  122. inputs[i - 1].focus();
  123. }
  124. });
  125. }
  126. });
  127. </script>
  128. </body>
  129. </html>