sdis29-1/vues/v_nouvelleIntervention.php
2023-11-24 11:36:16 +01:00

70 lines
2.8 KiB
PHP

<script src="https://code.jquery.com/jquery-3.7.1.js" integrity="sha256-eKhayi8LEQwp4NKxN+CfCh+3qOVUtJn3QNZ0TciWLP4="
crossorigin="anonymous"></script>
<div class="nouvelleInter">
<h1>Nouvelle intervention</h1>
<div class="formulaire">
<form action="">
<label for="motif">Motif de l'intervention : </label>
<select name="motif" id="motifInter">
<?php
foreach ($lesMotifs as $key => $type) {
echo '<optgroup label="' . $key . '">';
foreach ($type as $motif) {
echo ' <option value="' . $motif['pIndice'] . '">' . $motif['pLibelle'] . '</option>';
}
}
?>
</select>
<br>
<br>
<label for="adresse">Adresse de l'intervention : </label>
<input type="text" id="adresse" name="adresse">
<br>
<br>
<label for="caserne">Caserne la plus proche : </label>
<select name="caserne" id="caserneInter">
<?php
foreach ($lesCasernes as $uneCaserne) {
echo '<option value="' . $uneCaserne['cId'] . '">' . $uneCaserne['cNom'] . ' - ' . $uneCaserne['cAdresse'] . '</option>\n';
}
?>
</select>
<br>
<br>
<label for="commentaire">Commentaire sur l'intervention : </label>
<textarea name="commentaire" id="" cols="auto" rows="5"></textarea>
</form>
</div>
<div class="selectionPompier">
<div id="pompierDispo" class="pompierDispo" ondrop="dropHandler(event)" ondragover="dragoverHandler(event)">
<!-- Liste des pompiers appelable -->
<?php
$pCis = isset($_GET['caserne']) ? $_GET['caserne'] : 2904;
foreach ($lesPompiers as $key => $pompier):
?>
<div id="<?= $pompier['pId'] ?>" class="<?= $pompier['pLibelle'] ?>"
style="background-color: <?= $pompier['pValeur'] ?>" draggable="true"
ondragstart="dragstartHandler(event)">
<?= $pompier['pPrenom'] ?>
<?= $pompier['pNom'] ?>
(<?= $pompier['statut'] ?>)
</div>
<?php endforeach ?>
</div>
<div id="target" ondrop="dropHandler(event)" ondragover="dragoverHandler(event)"
ondragstart="dragstartHandler(event)" class="pompierIntervenant">
<p>Nombre de pompiers conseillé: 4</p>
</div>
</div>
</div>
<center><button type="submit" id="sendInter">Envoyer l'intervention</button></center>
<script src="include/gestionInterventions.js" type="text/javascript"></script>