Download index.html from nestasoft/admin-v3: direct link, hf CLI and curl.
- Browser
- Download file 36 kB
-
https://huggingface.co/spaces/nestasoft/admin-v3/resolve/main/index.html
- Command line
-
hf download hf://spaces/nestasoft/admin-v3/index.html
-
curl -L -o index.html https://huggingface.co/spaces/nestasoft/admin-v3/resolve/main/index.html
36 kB
| <html lang="fr"> | |
| <head> | |
| <meta charset="UTF-8"> | |
| <meta name="viewport" content="width=device-width, initial-scale=1.0"> | |
| <title>Admin Membres - Église Semence AMour</title> | |
| <script src="https://cdn.tailwindcss.com"></script> | |
| <link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/6.4.0/css/all.min.css"> | |
| <style> | |
| :root { | |
| --primary: #4F6F52; | |
| --secondary: #739072; | |
| --accent: #ECE3CE; | |
| } | |
| .sidebar { | |
| min-height: 100vh; | |
| background-color: var(--primary); | |
| } | |
| .sidebar-link:hover { | |
| background-color: var(--secondary); | |
| } | |
| .btn-primary { | |
| background-color: var(--primary); | |
| } | |
| .btn-primary:hover { | |
| background-color: var(--secondary); | |
| } | |
| .member-photo-preview { | |
| max-height: 150px; | |
| object-fit: cover; | |
| } | |
| .submenu { | |
| display: none; | |
| background-color: rgba(0,0,0,0.1); | |
| } | |
| .submenu.show { | |
| display: block; | |
| } | |
| .submenu-link { | |
| padding-left: 2.5rem; | |
| font-size: 0.9rem; | |
| } | |
| .menu-toggle { | |
| transition: transform 0.3s ease; | |
| } | |
| .menu-toggle.rotated { | |
| transform: rotate(90deg); | |
| } | |
| .tab-content { | |
| display: none; | |
| } | |
| .tab-content.active { | |
| display: block; | |
| } | |
| .tab-button.active { | |
| background-color: var(--accent); | |
| color: var(--primary); | |
| font-weight: 600; | |
| } | |
| </style> | |
| </head> | |
| <body class="bg-gray-100"> | |
| <div class="flex"> | |
| <!-- Sidebar --> | |
| <div class="sidebar w-64 text-white fixed h-full"> | |
| <div class="p-4 border-b border-green-700"> | |
| <div class="flex items-center"> | |
| <i class="fas fa-church text-2xl mr-2"></i> | |
| <span class="text-xl font-semibold">Semence AMour</span> | |
| </div> | |
| <p class="text-sm text-green-200 mt-1">Administration</p> | |
| </div> | |
| <nav class="mt-4"> | |
| <a href="#" class="sidebar-link block py-2 px-4"> | |
| <i class="fas fa-tachometer-alt mr-2"></i> Tableau de bord | |
| </a> | |
| <!-- Menu Église avec sous-menus --> | |
| <div class="church-menu"> | |
| <div class="sidebar-link flex justify-between items-center py-2 px-4 hover:bg-green-700 cursor-pointer" id="church-menu-toggle"> | |
| <div> | |
| <i class="fas fa-church mr-2"></i> Église | |
| </div> | |
| <i class="fas fa-chevron-right menu-toggle text-xs"></i> | |
| </div> | |
| <div class="submenu" id="church-submenu"> | |
| <a href="#" class="sidebar-link submenu-link block py-2 hover:bg-green-700"> | |
| <i class="fas fa-quote-left mr-2"></i> Mot du pasteur | |
| </a> | |
| <a href="#" class="sidebar-link submenu-link block py-2 hover:bg-green-700"> | |
| <i class="fas fa-history mr-2"></i> Notre histoire | |
| </a> | |
| <a href="#" class="sidebar-link submenu-link block py-2 hover:bg-green-700"> | |
| <i class="fas fa-user mr-2"></i> William Branham | |
| </a> | |
| <a href="#" class="sidebar-link submenu-link block py-2 hover:bg-green-700"> | |
| <i class="fas fa-praying-hands mr-2"></i> Pratiques | |
| </a> | |
| <a href="#" class="sidebar-link submenu-link block py-2 hover:bg-green-700"> | |
| <i class="fas fa-bible mr-2"></i> Doctrine | |
| </a> | |
| <a href="#" class="sidebar-link submenu-link block py-2 hover:bg-green-700"> | |
| <i class="fas fa-hands-helping mr-2"></i> Ministères | |
| </a> | |
| <a href="#" class="sidebar-link submenu-link block py-2 hover:bg-green-700"> | |
| <i class="fas fa-users-cog mr-2"></i> Offices | |
| </a> | |
| </div> | |
| </div> | |
| <a href="#" class="sidebar-link block py-2 px-4"> | |
| <i class="fas fa-calendar-alt mr-2"></i> Événements | |
| </a> | |
| <a href="#" class="sidebar-link block py-2 px-4 bg-green-700"> | |
| <i class="fas fa-users mr-2"></i> Membres | |
| </a> | |
| <a href="#" class="sidebar-link block py-2 px-4"> | |
| <i class="fas fa-file-alt mr-2"></i> Sermons | |
| </a> | |
| <a href="#" class="sidebar-link block py-2 px-4"> | |
| <i class="fas fa-cog mr-2"></i> Paramètres | |
| </a> | |
| </nav> | |
| </div> | |
| <!-- Main Content --> | |
| <div class="ml-64 flex-1 p-8"> | |
| <div class="flex justify-between items-center mb-8"> | |
| <h1 class="text-2xl font-bold text-gray-800"> | |
| <i class="fas fa-user-plus mr-2 text-green-700"></i> Ajouter un Membre | |
| </h1> | |
| <div> | |
| <a href="liste-membres.html" class="px-4 py-2 border border-gray-300 rounded-md shadow-sm text-sm font-medium text-gray-700 bg-white hover:bg-gray-50 focus:outline-none focus:ring-2 focus:ring-offset-2 focus:ring-green-500"> | |
| <i class="fas fa-list mr-1"></i> Voir la liste | |
| </a> | |
| </div> | |
| </div> | |
| <!-- Member Form --> | |
| <div class="bg-white rounded-lg shadow overflow-hidden"> | |
| <div class="border-b border-gray-200"> | |
| <div class="flex"> | |
| <button class="tab-button active px-6 py-4 text-sm font-medium" data-tab="info-personnelles"> | |
| Informations Personnelles | |
| </button> | |
| <button class="tab-button px-6 py-4 text-sm font-medium" data-tab="info-spirituelles"> | |
| Informations Spirituelles | |
| </button> | |
| <button class="tab-button px-6 py-4 text-sm font-medium" data-tab="info-familiales"> | |
| Informations Familiales | |
| </button> | |
| </div> | |
| </div> | |
| <form id="member-form" class="p-6 space-y-6"> | |
| <!-- Informations Personnelles Tab --> | |
| <div id="info-personnelles" class="tab-content active"> | |
| <div class="grid grid-cols-1 md:grid-cols-3 gap-6"> | |
| <!-- Photo --> | |
| <div class="col-span-1"> | |
| <label class="block text-sm font-medium text-gray-700 mb-2">Photo</label> | |
| <div class="mt-1 flex items-center"> | |
| <div class="relative"> | |
| <img id="photo-preview" class="member-photo-preview w-32 h-32 rounded-full bg-gray-200 object-cover" src="https://via.placeholder.com/150" alt="Photo du membre"> | |
| <label for="member-photo" class="absolute bottom-0 right-0 bg-white rounded-full p-2 shadow-md cursor-pointer"> | |
| <i class="fas fa-camera text-green-700"></i> | |
| <input type="file" id="member-photo" accept="image/*" class="sr-only"> | |
| </label> | |
| </div> | |
| </div> | |
| </div> | |
| <!-- Détails Personnels --> | |
| <div class="col-span-2 space-y-4"> | |
| <div class="grid grid-cols-1 md:grid-cols-2 gap-4"> | |
| <div> | |
| <label for="first-name" class="block text-sm font-medium text-gray-700">Prénom *</label> | |
| <input type="text" id="first-name" required class="mt-1 block w-full border border-gray-300 rounded-md shadow-sm py-2 px-3 focus:outline-none focus:ring-green-500 focus:border-green-500"> | |
| </div> | |
| <div> | |
| <label for="last-name" class="block text-sm font-medium text-gray-700">Nom *</label> | |
| <input type="text" id="last-name" required class="mt-1 block w-full border border-gray-300 rounded-md shadow-sm py-2 px-3 focus:outline-none focus:ring-green-500 focus:border-green-500"> | |
| </div> | |
| </div> | |
| <div class="grid grid-cols-1 md:grid-cols-2 gap-4"> | |
| <div> | |
| <label for="gender" class="block text-sm font-medium text-gray-700">Genre *</label> | |
| <select id="gender" required class="mt-1 block w-full border border-gray-300 rounded-md shadow-sm py-2 px-3 focus:outline-none focus:ring-green-500 focus:border-green-500"> | |
| <option value="">Sélectionner</option> | |
| <option value="male">Homme</option> | |
| <option value="female">Femme</option> | |
| </select> | |
| </div> | |
| <div> | |
| <label for="birth-date" class="block text-sm font-medium text-gray-700">Date de naissance</label> | |
| <input type="date" id="birth-date" class="mt-1 block w-full border border-gray-300 rounded-md shadow-sm py-2 px-3 focus:outline-none focus:ring-green-500 focus:border-green-500"> | |
| </div> | |
| </div> | |
| <div class="grid grid-cols-1 md:grid-cols-2 gap-4"> | |
| <div> | |
| <label for="phone" class="block text-sm font-medium text-gray-700">Téléphone</label> | |
| <input type="tel" id="phone" class="mt-1 block w-full border border-gray-300 rounded-md shadow-sm py-2 px-3 focus:outline-none focus:ring-green-500 focus:border-green-500"> | |
| </div> | |
| <div> | |
| <label for="email" class="block text-sm font-medium text-gray-700">Email</label> | |
| <input type="email" id="email" class="mt-1 block w-full border border-gray-300 rounded-md shadow-sm py-2 px-3 focus:outline-none focus:ring-green-500 focus:border-green-500"> | |
| </div> | |
| </div> | |
| </div> | |
| </div> | |
| <div class="mt-6 grid grid-cols-1 md:grid-cols-3 gap-4"> | |
| <div> | |
| <label for="address" class="block text-sm font-medium text-gray-700">Adresse</label> | |
| <input type="text" id="address" class="mt-1 block w-full border border-gray-300 rounded-md shadow-sm py-2 px-3 focus:outline-none focus:ring-green-500 focus:border-green-500"> | |
| </div> | |
| <div> | |
| <label for="city" class="block text-sm font-medium text-gray-700">Ville</label> | |
| <input type="text" id="city" class="mt-1 block w-full border border-gray-300 rounded-md shadow-sm py-2 px-3 focus:outline-none focus:ring-green-500 focus:border-green-500"> | |
| </div> | |
| <div> | |
| <label for="postal-code" class="block text-sm font-medium text-gray-700">Code Postal</label> | |
| <input type="text" id="postal-code" class="mt-1 block w-full border border-gray-300 rounded-md shadow-sm py-2 px-3 focus:outline-none focus:ring-green-500 focus:border-green-500"> | |
| </div> | |
| </div> | |
| <div class="mt-6"> | |
| <label for="profession" class="block text-sm font-medium text-gray-700">Profession</label> | |
| <input type="text" id="profession" class="mt-1 block w-full border border-gray-300 rounded-md shadow-sm py-2 px-3 focus:outline-none focus:ring-green-500 focus:border-green-500"> | |
| </div> | |
| </div> | |
| <!-- Informations Spirituelles Tab --> | |
| <div id="info-spirituelles" class="tab-content"> | |
| <div class="grid grid-cols-1 md:grid-cols-2 gap-6"> | |
| <div> | |
| <label for="baptism-date" class="block text-sm font-medium text-gray-700">Date de baptême</label> | |
| <input type="date" id="baptism-date" class="mt-1 block w-full border border-gray-300 rounded-md shadow-sm py-2 px-3 focus:outline-none focus:ring-green-500 focus:border-green-500"> | |
| </div> | |
| <div> | |
| <label for="baptism-place" class="block text-sm font-medium text-gray-700">Lieu de baptême</label> | |
| <input type="text" id="baptism-place" class="mt-1 block w-full border border-gray-300 rounded-md shadow-sm py-2 px-3 focus:outline-none focus:ring-green-500 focus:border-green-500"> | |
| </div> | |
| </div> | |
| <div class="mt-6 grid grid-cols-1 md:grid-cols-2 gap-6"> | |
| <div> | |
| <label for="membership-date" class="block text-sm font-medium text-gray-700">Date d'adhésion</label> | |
| <input type="date" id="membership-date" class="mt-1 block w-full border border-gray-300 rounded-md shadow-sm py-2 px-3 focus:outline-none focus:ring-green-500 focus:border-green-500"> | |
| </div> | |
| <div> | |
| <label for="membership-status" class="block text-sm font-medium text-gray-700">Statut d'adhésion</label> | |
| <select id="membership-status" class="mt-1 block w-full border border-gray-300 rounded-md shadow-sm py-2 px-3 focus:outline-none focus:ring-green-500 focus:border-green-500"> | |
| <option value="visitor">Visiteur</option> | |
| <option value="member">Membre</option> | |
| <option value="active-member">Membre actif</option> | |
| <option value="inactive-member">Membre inactif</option> | |
| </select> | |
| </div> | |
| </div> | |
| <div class="mt-6"> | |
| <label for="spiritual-gifts" class="block text-sm font-medium text-gray-700">Dons spirituels</label> | |
| <div class="mt-2 grid grid-cols-2 md:grid-cols-4 gap-2"> | |
| <div class="flex items-center"> | |
| <input type="checkbox" id="gift-teaching" class="h-4 w-4 text-green-600 focus:ring-green-500 border-gray-300 rounded"> | |
| <label for="gift-teaching" class="ml-2 block text-sm text-gray-700">Enseignement</label> | |
| </div> | |
| <div class="flex items-center"> | |
| <input type="checkbox" id="gift-prophecy" class="h-4 w-4 text-green-600 focus:ring-green-500 border-gray-300 rounded"> | |
| <label for="gift-prophecy" class="ml-2 block text-sm text-gray-700">Prophétie</label> | |
| </div> | |
| <div class="flex items-center"> | |
| <input type="checkbox" id="gift-healing" class="h-4 w-4 text-green-600 focus:ring-green-500 border-gray-300 rounded"> | |
| <label for="gift-healing" class="ml-2 block text-sm text-gray-700">Guérison</label> | |
| </div> | |
| <div class="flex items-center"> | |
| <input type="checkbox" id="gift-miracles" class="h-4 w-4 text-green-600 focus:ring-green-500 border-gray-300 rounded"> | |
| <label for="gift-miracles" class="ml-2 block text-sm text-gray-700">Miracles</label> | |
| </div> | |
| <div class="flex items-center"> | |
| <input type="checkbox" id="gift-helping" class="h-4 w-4 text-green-600 focus:ring-green-500 border-gray-300 rounded"> | |
| <label for="gift-helping" class="ml-2 block text-sm text-gray-700">Service</label> | |
| </div> | |
| <div class="flex items-center"> | |
| <input type="checkbox" id="gift-leadership" class="h-4 w-4 text-green-600 focus:ring-green-500 border-gray-300 rounded"> | |
| <label for="gift-leadership" class="ml-2 block text-sm text-gray-700">Leadership</label> | |
| </div> | |
| <div class="flex items-center"> | |
| <input type="checkbox" id="gift-mercy" class="h-4 w-4 text-green-600 focus:ring-green-500 border-gray-300 rounded"> | |
| <label for="gift-mercy" class="ml-2 block text-sm text-gray-700">Miséricorde</label> | |
| </div> | |
| <div class="flex items-center"> | |
| <input type="checkbox" id="gift-giving" class="h-4 w-4 text-green-600 focus:ring-green-500 border-gray-300 rounded"> | |
| <label for="gift-giving" class="ml-2 block text-sm text-gray-700">Générosité</label> | |
| </div> | |
| </div> | |
| </div> | |
| <div class="mt-6"> | |
| <label for="ministries" class="block text-sm font-medium text-gray-700">Ministères impliqués</label> | |
| <select id="ministries" multiple class="mt-1 block w-full border border-gray-300 rounded-md shadow-sm py-2 px-3 focus:outline-none focus:ring-green-500 focus:border-green-500"> | |
| <option value="worship">Louange</option> | |
| <option value="prayer">Intercession</option> | |
| <option value="evangelism">Évangélisation</option> | |
| <option value="teaching">Enseignement</option> | |
| <option value="youth">Jeunesse</option> | |
| <option value="children">Enfants</option> | |
| <option value="social">Action sociale</option> | |
| <option value="media">Médias</option> | |
| </select> | |
| </div> | |
| <div class="mt-6"> | |
| <label for="spiritual-notes" class="block text-sm font-medium text-gray-700">Notes spirituelles</label> | |
| <textarea id="spiritual-notes" rows="3" class="mt-1 block w-full border border-gray-300 rounded-md shadow-sm py-2 px-3 focus:outline-none focus:ring-green-500 focus:border-green-500"></textarea> | |
| </div> | |
| </div> | |
| <!-- Informations Familiales Tab --> | |
| <div id="info-familiales" class="tab-content"> | |
| <div class="grid grid-cols-1 md:grid-cols-2 gap-6"> | |
| <div> | |
| <label for="marital-status" class="block text-sm font-medium text-gray-700">Situation familiale</label> | |
| <select id="marital-status" class="mt-1 block w-full border border-gray-300 rounded-md shadow-sm py-2 px-3 focus:outline-none focus:ring-green-500 focus:border-green-500"> | |
| <option value="single">Célibataire</option> | |
| <option value="married">Marié(e)</option> | |
| <option value="divorced">Divorcé(e)</option> | |
| <option value="widowed">Veuf/Veuve</option> | |
| <option value="separated">Séparé(e)</option> | |
| </select> | |
| </div> | |
| <div id="spouse-container" class="hidden"> | |
| <label for="spouse-name" class="block text-sm font-medium text-gray-700">Nom du conjoint</label> | |
| <input type="text" id="spouse-name" class="mt-1 block w-full border border-gray-300 rounded-md shadow-sm py-2 px-3 focus:outline-none focus:ring-green-500 focus:border-green-500"> | |
| </div> | |
| </div> | |
| <div class="mt-6"> | |
| <label class="block text-sm font-medium text-gray-700">Enfants</label> | |
| <div id="children-container" class="mt-2 space-y-4"> | |
| <!-- Children will be added here dynamically --> | |
| </div> | |
| <button type="button" id="add-child-btn" class="mt-2 inline-flex items-center px-3 py-1 border border-gray-300 shadow-sm text-sm leading-4 font-medium rounded-md text-gray-700 bg-white hover:bg-gray-50 focus:outline-none focus:ring-2 focus:ring-offset-2 focus:ring-green-500"> | |
| <i class="fas fa-plus mr-1"></i> Ajouter un enfant | |
| </button> | |
| </div> | |
| <div class="mt-6"> | |
| <label for="family-notes" class="block text-sm font-medium text-gray-700">Notes familiales</label> | |
| <textarea id="family-notes" rows="3" class="mt-1 block w-full border border-gray-300 rounded-md shadow-sm py-2 px-3 focus:outline-none focus:ring-green-500 focus:border-green-500"></textarea> | |
| </div> | |
| </div> | |
| <div class="pt-6 border-t border-gray-200 flex justify-end space-x-3"> | |
| <button type="button" id="cancel-member" class="px-4 py-2 border border-gray-300 rounded-md shadow-sm text-sm font-medium text-gray-700 bg-white hover:bg-gray-50 focus:outline-none focus:ring-2 focus:ring-offset-2 focus:ring-green-500"> | |
| Annuler | |
| </button> | |
| <button type="submit" id="save-member" class="btn-primary px-4 py-2 border border-transparent rounded-md shadow-sm text-sm font-medium text-white bg-green-700 hover:bg-green-800 focus:outline-none focus:ring-2 focus:ring-offset-2 focus:ring-green-500"> | |
| Enregistrer le membre | |
| </button> | |
| </div> | |
| </form> | |
| </div> | |
| </div> | |
| </div> | |
| <script> | |
| // Initialize the app | |
| document.addEventListener('DOMContentLoaded', function() { | |
| setupMenuToggle(); | |
| setupTabs(); | |
| setupForm(); | |
| setupPhotoUpload(); | |
| }); | |
| // Setup menu toggle functionality | |
| function setupMenuToggle() { | |
| const menuToggle = document.getElementById('church-menu-toggle'); | |
| const submenu = document.getElementById('church-submenu'); | |
| const chevron = menuToggle.querySelector('.menu-toggle'); | |
| menuToggle.addEventListener('click', () => { | |
| submenu.classList.toggle('show'); | |
| chevron.classList.toggle('rotated'); | |
| }); | |
| } | |
| // Setup tab functionality | |
| function setupTabs() { | |
| const tabButtons = document.querySelectorAll('.tab-button'); | |
| const tabContents = document.querySelectorAll('.tab-content'); | |
| tabButtons.forEach(button => { | |
| button.addEventListener('click', () => { | |
| // Remove active class from all buttons and contents | |
| tabButtons.forEach(btn => btn.classList.remove('active')); | |
| tabContents.forEach(content => content.classList.remove('active')); | |
| // Add active class to clicked button and corresponding content | |
| button.classList.add('active'); | |
| const tabId = button.getAttribute('data-tab'); | |
| document.getElementById(tabId).classList.add('active'); | |
| }); | |
| }); | |
| } | |
| // Setup form functionality | |
| function setupForm() { | |
| const maritalStatus = document.getElementById('marital-status'); | |
| const spouseContainer = document.getElementById('spouse-container'); | |
| // Show/hide spouse field based on marital status | |
| maritalStatus.addEventListener('change', function() { | |
| if (this.value === 'married') { | |
| spouseContainer.classList.remove('hidden'); | |
| } else { | |
| spouseContainer.classList.add('hidden'); | |
| } | |
| }); | |
| // Add child functionality | |
| const addChildBtn = document.getElementById('add-child-btn'); | |
| const childrenContainer = document.getElementById('children-container'); | |
| let childCount = 0; | |
| addChildBtn.addEventListener('click', function() { | |
| childCount++; | |
| const childDiv = document.createElement('div'); | |
| childDiv.className = 'grid grid-cols-1 md:grid-cols-3 gap-4 items-end'; | |
| childDiv.innerHTML = ` | |
| <div> | |
| <label for="child-name-${childCount}" class="block text-sm font-medium text-gray-700">Nom complet</label> | |
| <input type="text" id="child-name-${childCount}" class="mt-1 block w-full border border-gray-300 rounded-md shadow-sm py-2 px-3 focus:outline-none focus:ring-green-500 focus:border-green-500"> | |
| </div> | |
| <div> | |
| <label for="child-gender-${childCount}" class="block text-sm font-medium text-gray-700">Genre</label> | |
| <select id="child-gender-${childCount}" class="mt-1 block w-full border border-gray-300 rounded-md shadow-sm py-2 px-3 focus:outline-none focus:ring-green-500 focus:border-green-500"> | |
| <option value="male">Garçon</option> | |
| <option value="female">Fille</option> | |
| </select> | |
| </div> | |
| <div class="flex items-end space-x-2"> | |
| <div class="flex-1"> | |
| <label for="child-birthdate-${childCount}" class="block text-sm font-medium text-gray-700">Date de naissance</label> | |
| <input type="date" id="child-birthdate-${childCount}" class="mt-1 block w-full border border-gray-300 rounded-md shadow-sm py-2 px-3 focus:outline-none focus:ring-green-500 focus:border-green-500"> | |
| </div> | |
| <button type="button" class="delete-child mb-1 px-2 py-1 text-red-600 hover:text-red-800"> | |
| <i class="fas fa-times"></i> | |
| </button> | |
| </div> | |
| `; | |
| childrenContainer.appendChild(childDiv); | |
| // Add event listener to delete button | |
| const deleteBtn = childDiv.querySelector('.delete-child'); | |
| deleteBtn.addEventListener('click', function() { | |
| childrenContainer.removeChild(childDiv); | |
| }); | |
| }); | |
| // Form submission | |
| const memberForm = document.getElementById('member-form'); | |
| memberForm.addEventListener('submit', function(e) { | |
| e.preventDefault(); | |
| // Gather form data | |
| const memberData = { | |
| personalInfo: { | |
| firstName: document.getElementById('first-name').value, | |
| lastName: document.getElementById('last-name').value, | |
| gender: document.getElementById('gender').value, | |
| birthDate: document.getElementById('birth-date').value, | |
| phone: document.getElementById('phone').value, | |
| email: document.getElementById('email').value, | |
| address: document.getElementById('address').value, | |
| city: document.getElementById('city').value, | |
| postalCode: document.getElementById('postal-code').value, | |
| profession: document.getElementById('profession').value, | |
| photo: document.getElementById('photo-preview').src | |
| }, | |
| spiritualInfo: { | |
| baptismDate: document.getElementById('baptism-date').value, | |
| baptismPlace: document.getElementById('baptism-place').value, | |
| membershipDate: document.getElementById('membership-date').value, | |
| membershipStatus: document.getElementById('membership-status').value, | |
| spiritualGifts: getSelectedGifts(), | |
| ministries: getSelectedMinistries(), | |
| spiritualNotes: document.getElementById('spiritual-notes').value | |
| }, | |
| familyInfo: { | |
| maritalStatus: document.getElementById('marital-status').value, | |
| spouseName: document.getElementById('marital-status').value === 'married' ? document.getElementById('spouse-name').value : '', | |
| children: getChildrenData(), | |
| familyNotes: document.getElementById('family-notes').value | |
| } | |
| }; | |
| // In a real app, you would save to a database here | |
| console.log('Member data to be saved:', memberData); | |
| // Show success message | |
| alert('Membre enregistré avec succès!'); | |
| // Reset form | |
| memberForm.reset(); | |
| document.getElementById('photo-preview').src = 'https://via.placeholder.com/150'; | |
| childrenContainer.innerHTML = ''; | |
| childCount = 0; | |
| }); | |
| // Cancel button | |
| document.getElementById('cancel-member').addEventListener('click', function() { | |
| if (confirm('Voulez-vous vraiment annuler ? Toutes les modifications seront perdues.')) { | |
| memberForm.reset(); | |
| document.getElementById('photo-preview').src = 'https://via.placeholder.com/150'; | |
| childrenContainer.innerHTML = ''; | |
| childCount = 0; | |
| } | |
| }); | |
| } | |
| // Get selected spiritual gifts | |
| function getSelectedGifts() { | |
| const gifts = []; | |
| if (document.getElementById('gift-teaching').checked) gifts.push('teaching'); | |
| if (document.getElementById('gift-prophecy').checked) gifts.push('prophecy'); | |
| if (document.getElementById('gift-healing').checked) gifts.push('healing'); | |
| if (document.getElementById('gift-miracles').checked) gifts.push('miracles'); | |
| if (document.getElementById('gift-helping').checked) gifts.push('helping'); | |
| if (document.getElementById('gift-leadership').checked) gifts.push('leadership'); | |
| if (document.getElementById('gift-mercy').checked) gifts.push('mercy'); | |
| if (document.getElementById('gift-giving').checked) gifts.push('giving'); | |
| return gifts; | |
| } | |
| // Get selected ministries | |
| function getSelectedMinistries() { | |
| const select = document.getElementById('ministries'); | |
| const selectedOptions = Array.from(select.selectedOptions).map(option => option.value); | |
| return selectedOptions; | |
| } | |
| // Get children data | |
| function getChildrenData() { | |
| const children = []; | |
| const childDivs = document.querySelectorAll('#children-container > div'); | |
| childDivs.forEach((div, index) => { | |
| children.push({ | |
| name: document.getElementById(`child-name-${index+1}`).value, | |
| gender: document.getElementById(`child-gender-${index+1}`).value, | |
| birthDate: document.getElementById(`child-birthdate-${index+1}`).value | |
| }); | |
| }); | |
| return children; | |
| } | |
| // Setup photo upload functionality | |
| function setupPhotoUpload() { | |
| const photoInput = document.getElementById('member-photo'); | |
| const photoPreview = document.getElementById('photo-preview'); | |
| photoInput.addEventListener('change', function(e) { | |
| const file = e.target.files[0]; | |
| if (file) { | |
| const reader = new FileReader(); | |
| reader.onload = function(event) { | |
| photoPreview.src = event.target.result; | |
| }; | |
| reader.readAsDataURL(file); | |
| } | |
| }); | |
| } | |
| </script> | |
| <p style="border-radius: 8px; text-align: center; font-size: 12px; color: #fff; margin-top: 16px;position: fixed; left: 8px; bottom: 8px; z-index: 10; background: rgba(0, 0, 0, 0.8); padding: 4px 8px;">Made with <img src="https://enzostvs-deepsite.hf.space/logo.svg" alt="DeepSite Logo" style="width: 16px; height: 16px; vertical-align: middle;display:inline-block;margin-right:3px;filter:brightness(0) invert(1);"><a href="https://enzostvs-deepsite.hf.space" style="color: #fff;text-decoration: underline;" target="_blank" >DeepSite</a> - 🧬 <a href="https://enzostvs-deepsite.hf.space?remix=nestasoft/admin-v3" style="color: #fff;text-decoration: underline;" target="_blank" >Remix</a></p></body> | |
| </html> |