Billing Stripe, link regia mobile e staff solo trasmissione.
Aggiunge fatturazione club, pagina regia condivisibile senza account, roster squadre e rimuove la modalità controller dall'app (v1.1.0). Co-authored-by: Cursor <cursoragent@cursor.com>
This commit is contained in:
37
backend/public/password-toggle.js
Normal file
37
backend/public/password-toggle.js
Normal file
@@ -0,0 +1,37 @@
|
||||
(function () {
|
||||
function initToggle(wrapper) {
|
||||
var input = wrapper.querySelector(".input-toggle__input");
|
||||
var btn = wrapper.querySelector(".input-toggle__btn");
|
||||
if (!input || !btn || btn.dataset.bound === "1") return;
|
||||
|
||||
btn.dataset.bound = "1";
|
||||
var icon = btn.querySelector("i");
|
||||
var hiddenLabel = btn.getAttribute("aria-label") || "Mostra";
|
||||
var visibleLabel = btn.getAttribute("data-label-hide") || "Nascondi";
|
||||
|
||||
function setVisible(visible) {
|
||||
input.type = visible ? input.dataset.visibleType || "text" : "password";
|
||||
btn.setAttribute("aria-label", visible ? visibleLabel : hiddenLabel);
|
||||
btn.setAttribute("aria-pressed", visible ? "true" : "false");
|
||||
if (icon) {
|
||||
icon.classList.toggle("fa-eye", !visible);
|
||||
icon.classList.toggle("fa-eye-slash", visible);
|
||||
}
|
||||
}
|
||||
|
||||
setVisible(false);
|
||||
btn.addEventListener("click", function () {
|
||||
setVisible(input.type === "password");
|
||||
});
|
||||
}
|
||||
|
||||
function initAll() {
|
||||
document.querySelectorAll("[data-input-toggle]").forEach(initToggle);
|
||||
}
|
||||
|
||||
if (document.readyState === "loading") {
|
||||
document.addEventListener("DOMContentLoaded", initAll);
|
||||
} else {
|
||||
initAll();
|
||||
}
|
||||
})();
|
||||
Reference in New Issue
Block a user