No Description
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

modal-two-factor-auth.js 703B

12345678910111213141516171819202122232425262728
  1. /**
  2. * Two Factor Authentication
  3. */
  4. 'use strict';
  5. document.addEventListener('DOMContentLoaded', function (e) {
  6. (function () {
  7. const phoneMaskList = document.querySelectorAll('#twoFactorAuthInputSms');
  8. // Phone Number
  9. if (phoneMaskList) {
  10. phoneMaskList.forEach(function (phoneMask) {
  11. phoneMask.addEventListener('input', event => {
  12. const cleanValue = event.target.value.replace(/\D/g, '');
  13. phoneMask.value = formatGeneral(cleanValue, {
  14. blocks: [3, 3, 4],
  15. delimiters: [' ', ' ']
  16. });
  17. });
  18. registerCursorTracker({
  19. input: phoneMask,
  20. delimiter: ' '
  21. });
  22. });
  23. }
  24. })();
  25. });