From 2cdbbc3cf8db36c58f4eb77286b64485811c4731 Mon Sep 17 00:00:00 2001 From: Cedric Date: Mon, 22 Jun 2026 11:10:35 +0200 Subject: [PATCH] Actualiser js/admin.js --- js/admin.js | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/js/admin.js b/js/admin.js index 7e14646..1acc8c1 100644 --- a/js/admin.js +++ b/js/admin.js @@ -338,7 +338,7 @@ function toggleFormFields() { } function switchAdminTab(tabName) { -currentAdminTab = tabName; + currentAdminTab = tabName; currentPage = 1; selectedIds.clear(); const searchInput = document.getElementById('search-input'); @@ -387,6 +387,7 @@ function openEditModal(id) { } function closeAdminModal() { document.getElementById('admin-modal').classList.remove('open'); } + async function openConfigModal() { document.getElementById('config-modal').classList.add('open'); @@ -401,12 +402,16 @@ async function openConfigModal() { if (data.tmdb_api_key) document.getElementById('tmdb-key-input').placeholder = '✅ Clé configurée (laisser vide pour ne pas changer)'; } catch(e) { console.error(e); } } + function closeConfigModal() { document.getElementById('config-modal').classList.remove('open'); } + function openPasswordModal() { document.getElementById('pwd-error').style.display = 'none'; document.getElementById('password-modal').classList.add('open'); } + function closePasswordModal() { document.getElementById('password-modal').classList.remove('open'); } + function logout() { localStorage.removeItem('token'); window.location.href = 'login.html';