<?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="oldtogglePassword"  style="display:none;"></i>
</div>
<script>
  var oldtogglePassword = document.querySelector('#oldtogglePassword');
  if(document.getElementById('oldPassword')) {
    var oldPassword = document.querySelector('#oldPassword');
  }
  
  oldtogglePassword.addEventListener('click', function (e) {
      // toggle the type attribute
      var type = oldPassword.getAttribute('type') === 'password' ? 'text' : 'password';
      oldPassword.setAttribute('type', type);
      // toggle the eye / eye slash icon
      this.classList.toggle('showpassword');
  });
</script>
