2024-08-20 15:10:41 -06:00
|
|
|
<script>
|
|
|
|
(function(){
|
|
|
|
function toggle()
|
|
|
|
{
|
2024-08-24 19:52:05 -06:00
|
|
|
const p = htmx.findAll(".password-toggle input");
|
2024-08-20 15:10:41 -06:00
|
|
|
const t = p[0].type === "text" ? "password" : "text";
|
|
|
|
for (let i = 0; i < p.length; i++) {
|
|
|
|
p[i].type = t;
|
|
|
|
}
|
|
|
|
}
|
2024-08-24 19:52:05 -06:00
|
|
|
const b = htmx.findAll(".password-toggle button.icon.eye");
|
2024-08-20 15:10:41 -06:00
|
|
|
for (let i = 0; i < b.length; i++) {
|
|
|
|
htmx.on(b[i], "click", toggle);
|
|
|
|
}
|
|
|
|
})();
|
|
|
|
</script>
|