Actualiser js/admin.js
This commit is contained in:
+6
-1
@@ -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';
|
||||
|
||||
Reference in New Issue
Block a user