32 lines
1.6 KiB
PHP
32 lines
1.6 KiB
PHP
// index.php
|
|
<?php
|
|
// Récupérer les données du formulaire
|
|
if (isset($_POST['contract-name']) && isset($_POST['contract-description'])) {
|
|
// Enregistrer les données dans la base de données
|
|
// ...
|
|
}
|
|
|
|
// Afficher le popup de création de contrat
|
|
?>
|
|
<button class="bg-yellow hover:bg-yellow-dark text-white font-bold py-2 px-4 rounded" id="new-contract-btn">Nouveau Contrat</button>
|
|
|
|
<!-- Nouveau contrat popup -->
|
|
<div id="new-contract-popup" class="fixed top-0 left-0 w-full h-full bg-dark bg-opacity-50 flex justify-center items-center">
|
|
<div class="bg-dark rounded-lg shadow-md p-4 w-1/2">
|
|
<h2 class="text-lg font-bold text-yellow mb-2">Nouveau Contrat</h2>
|
|
<form id="new-contract-form" method="post">
|
|
<div class="mb-4">
|
|
<label for="contract-name" class="text-sm text-gray-400">Nom du contrat</label>
|
|
<input type="text" id="contract-name" class="bg-dark border border-gray-400 text-white p-2 w-full" name="contract-name">
|
|
</div>
|
|
<div class="mb-4">
|
|
<label for="contract-description" class="text-sm text-gray-400">Description du contrat</label>
|
|
<textarea id="contract-description" class="bg-dark border border-gray-400 text-white p-2 w-full h-20" name="contract-description"></textarea>
|
|
</div>
|
|
<button class="bg-teal hover:bg-teal-dark text-white font-bold py-2 px-4 rounded">Créer</button>
|
|
<button class="bg-yellow hover:bg-yellow-dark text-white font-bold py-2 px-4 rounded ml-4">Annuler</button>
|
|
</form>
|
|
</div>
|
|
</div>
|
|
|
|
<script src="script.js"></script>
|