<?php
/**
  * Ahead WebSoft Technologies Pvt Ltd.
  * @copyright  Copyright 2006-2026 Ahead WebSoft Technologies Pvt Ltd.
  * @license    https://www.socialengine.com/policies
*/
?>
<div class="user_showhidepassword">
  <i id="confirmtogglePassword" style="display:none;"></i>
</div>
<script>
  var confirmtogglePassword = document.querySelector('#confirmtogglePassword');
  if(document.getElementById('passconf')) {
    var passconf = document.querySelector('#passconf');
  } else if(document.getElementById('passwordConfirm')) {
    var passconf = document.querySelector('#passwordConfirm');
  } else if(document.getElementById('password_confirm')) {
    var passconf = document.querySelector('#password_confirm');
  } else if(document.getElementById('password_conf')) {
    var passconf = document.querySelector('#password_conf');
  }
  
  confirmtogglePassword.addEventListener('click', function (e) {
      // toggle the type attribute
      var type = passconf.getAttribute('type') === 'password' ? 'text' : 'password';
      passconf.setAttribute('type', type);
      // toggle the eye / eye slash icon
      this.classList.toggle('showpassword');
  });
</script>
