diff --git a/configuracion.html b/configuracion.html
index 337233f..9878060 100644
--- a/configuracion.html
+++ b/configuracion.html
@@ -1237,7 +1237,7 @@
} catch(e) { showToast("Error de conexión", true); }
}
- // ==========================================
+ // ==========================================
// LÓGICA PROVEEDORES CREDENCIALES
// ==========================================
async function loadProviderCredentials() {
@@ -1246,8 +1246,12 @@
const data = await res.json();
if(data.ok) {
data.credentials.forEach(c => {
- const userInp = document.getElementById(`user_${c.provider.toLowerCase()}`);
+ const providerName = c.provider.toLowerCase();
+ const userInp = document.getElementById(`user_${providerName}`);
+ const autoInp = document.getElementById(`auto_${providerName}`); // <-- Busca el botón
+
if(userInp) userInp.value = c.username;
+ if(autoInp) autoInp.checked = c.auto_dispatch || false; // <-- Enciende o apaga
});
}
} catch(e) { console.error("Error creds"); }