reprise directement sur la base de la correction
This commit is contained in:
2
web/META-INF/context.xml
Normal file
2
web/META-INF/context.xml
Normal file
@@ -0,0 +1,2 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<Context path="/sdis29V2025-Morgann"/>
|
41
web/WEB-INF/authentifJSP.jsp
Normal file
41
web/WEB-INF/authentifJSP.jsp
Normal file
@@ -0,0 +1,41 @@
|
||||
<%--
|
||||
Document : authentifJSP
|
||||
Created on : 23 oct. 2021, 10:02:18
|
||||
Author : domin
|
||||
--%>
|
||||
<%@include file= "jspf/debutJSP.jspf" %>
|
||||
<body>
|
||||
<c:set var="page" value="1" scope="request" />
|
||||
<%@include file= "jspf/header.jspf" %>
|
||||
<div class="container">
|
||||
|
||||
<section id="contenuAffiche">
|
||||
<fieldset id="authentif">
|
||||
<legend>
|
||||
Authentification
|
||||
</legend>
|
||||
<form id="fAuthentif" method="POST" action="authentification">
|
||||
<div class="mb-3 mt-3">
|
||||
<label for="ztLogin"> Login * </label>
|
||||
<input type="text" placeholder="login" id="ztLogin"
|
||||
autocomplete="username" name="ztLogin" class="form-control" required />
|
||||
</div>
|
||||
<div class="mb-3">
|
||||
<label for="ztMDP"> Mot de passe * </label>
|
||||
<input type="password" placeholder="mdp" id="ztMDP"
|
||||
name="ztMDP" class="form-control" required />
|
||||
</div>
|
||||
<div class="text-center">
|
||||
<button type="submit" value="Valider" class="btn btn-danger"><i class="bi bi-check2"></i> Valider</button>
|
||||
</div>
|
||||
</form>
|
||||
${message}
|
||||
</fieldset>
|
||||
</section> <!-- /section id contenuAffiche -->
|
||||
<%@include file= "jspf/footer.jspf" %>
|
||||
</div> <!-- /div class container -->
|
||||
|
||||
<!-- Bootstrap Bundle with Popper -->
|
||||
<script src="https://cdn.jsdelivr.net/npm/bootstrap@5.1.3/dist/js/bootstrap.bundle.min.js" integrity="sha384-ka7Sk0Gln4gmtz2MlQnikT1wXgYsOg+OMhuP+IlRH9sENBO0LRn5q+8nbTov4+1p" crossorigin="anonymous"></script>
|
||||
</body>
|
||||
</html>
|
16
web/WEB-INF/jspf/debutJSP.jspf
Normal file
16
web/WEB-INF/jspf/debutJSP.jspf
Normal file
@@ -0,0 +1,16 @@
|
||||
<%-- jspf/debutJSP.jsp --%>
|
||||
<%@page contentType="text/html" pageEncoding="UTF-8"%>
|
||||
<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %>
|
||||
<!DOCTYPE html>
|
||||
<html>
|
||||
<head>
|
||||
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1">
|
||||
|
||||
<!-- Bootstrap CSS -->
|
||||
<link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/bootstrap-icons@1.6.1/font/bootstrap-icons.css">
|
||||
<link href="https://cdn.jsdelivr.net/npm/bootstrap@5.1.3/dist/css/bootstrap.min.css" rel="stylesheet" integrity="sha384-1BmE4kWBq78iYhFldvKuhfTAU6auU8tT94WrHftjDbrCEXSU1oBoqyl2QvZ6jIW3" crossorigin="anonymous">
|
||||
<link href="css/mycss.css" rel="stylesheet" />
|
||||
<link rel="shortcut icon" type="image/x-icon" href="images/favicon.ico" />
|
||||
<title>SDIS29</title>
|
||||
</head>
|
5
web/WEB-INF/jspf/footer.jspf
Normal file
5
web/WEB-INF/jspf/footer.jspf
Normal file
@@ -0,0 +1,5 @@
|
||||
<%-- jspf/footer.jspf --%>
|
||||
<%@ page pageEncoding="UTF-8" %>
|
||||
<footer>
|
||||
<p>SDIS 29 - 58, avenue de Keradennec - 29337 QUIMPER CEDEX - 02 98 10 31 50</p>
|
||||
</footer>
|
21
web/WEB-INF/jspf/formChoixPompier.jspf
Normal file
21
web/WEB-INF/jspf/formChoixPompier.jspf
Normal file
@@ -0,0 +1,21 @@
|
||||
<%-- any content can be specified here e.g.: --%>
|
||||
<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %>
|
||||
<%@ page pageEncoding="UTF-8" %>
|
||||
|
||||
<form action="pompier" method="POST" id="fChoixPompier" name="fChoixPompier">
|
||||
<div class="row">
|
||||
<div class="col-md-9">
|
||||
<label for="ldrPompier">Choix du pompier : </label>
|
||||
ici se trouvera la liste déroulante des pompiers
|
||||
</div>
|
||||
<div class="col-md-3" id="btAfficherPompier" name="btAfficherPompier">
|
||||
<!--<input class="btn btn-danger" name="btAfficherPompier" type="submit" value="Afficher" /> -->
|
||||
<button class="btn btn-danger" name="btAfficherPompier" value="Afficher" type="submit"><i class="bi bi-eye-fill"></i> Afficher</button>
|
||||
<button class="btn btn-danger ms-5" name="btAfficherPompier" value="Ajouter" type="submit"> <i class="bi bi-plus-lg"></i> Ajouter</button>
|
||||
</div>
|
||||
</div>
|
||||
</form>
|
||||
|
||||
|
||||
|
||||
|
8
web/WEB-INF/jspf/formulairePompier.jspf
Normal file
8
web/WEB-INF/jspf/formulairePompier.jspf
Normal file
@@ -0,0 +1,8 @@
|
||||
<%@ page pageEncoding="UTF-8" %>
|
||||
<form>
|
||||
<img src="images/pompier.png"<br>
|
||||
<input type="text" id="ztNom" name="nom" value="${sessionScope.lePompierConnecte.getNom()}" readonly>
|
||||
<input type="text" id="ztPrenom" name="prenom" value="${sessionScope.lePompierConnecte.getPrenom()}" readonly><br>
|
||||
<input type="text" id="ztAdresse" name="adresse" value="${sessionScope.lePompierConnecte.getAdresse()}" readonly><br>
|
||||
<input type="text" id="ztGrade" name="grade" value="${sessionScope.lePompierConnecte.getLeGrade().getValeur()}" readonly>
|
||||
</form>
|
45
web/WEB-INF/jspf/header.jspf
Normal file
45
web/WEB-INF/jspf/header.jspf
Normal file
@@ -0,0 +1,45 @@
|
||||
<%-- jspf/header.jspf --%>
|
||||
<%@ page pageEncoding="UTF-8" %>
|
||||
<c:set var="blancs8" value=" " scope="page" />
|
||||
<header>
|
||||
<div class="container" id="entete">
|
||||
|
||||
<img id="logo" src="images/logo-sdis.png" alt='logo sdis29' />
|
||||
<div id="identite">
|
||||
<div id="login">
|
||||
<c:choose>
|
||||
<c:when test="${empty sessionScope.lePompierConnecte}">
|
||||
<h4>Bienvenue</h4>
|
||||
</c:when>
|
||||
<c:otherwise>
|
||||
<h4>Bienvenue ${sessionScope.lePompierConnecte.getNom()} ${sessionScope.lePompierConnecte.getPrenom()}
|
||||
</h4>
|
||||
|
||||
<button type="button" class="btn btn-warning fs-4" title="Déconnexion">
|
||||
<a href="authentification">
|
||||
<i class="bi bi-box-arrow-right heading" width="32" height="32" fill="currentColor"></i> Déconnexion
|
||||
</a>
|
||||
</button>
|
||||
</c:otherwise>
|
||||
</c:choose>
|
||||
</div>
|
||||
<h4>Service Départemental d'Incendie et de Secours du Finistère</h4>
|
||||
|
||||
Afficher ici les coordonnées de la caserne du pompier connecté
|
||||
|
||||
<nav class="navbar navbar-expand-sm bg-danger navbar-dark">
|
||||
<div class="container-fluid">
|
||||
<ul class="navbar-nav">
|
||||
<li class="nav-item">
|
||||
<span class="nav-link"><pre>${blancs8}</pre> </span>
|
||||
</li>
|
||||
<li class="nav-item">
|
||||
Barre de navigation ici
|
||||
</li>
|
||||
</ul>
|
||||
|
||||
</div>
|
||||
</nav>
|
||||
</div> <!-- fin id=identie -->
|
||||
</div> <!-- fin class=container -->
|
||||
</header>
|
50
web/WEB-INF/pompierJSP.jsp
Normal file
50
web/WEB-INF/pompierJSP.jsp
Normal file
@@ -0,0 +1,50 @@
|
||||
<%--
|
||||
pompierJSP.jsp
|
||||
--%>
|
||||
<%@page contentType="text/html" pageEncoding="UTF-8"%>
|
||||
<%@include file= "jspf/debutJSP.jspf" %>
|
||||
<body>
|
||||
|
||||
<%@include file= "jspf/header.jspf" %>
|
||||
<div class="container">
|
||||
<section id="contenuAffiche" class="row">
|
||||
<c:set var="legend" value="Mes données" scope="page" />
|
||||
<c:if test="${sessionScope.lePompierConnecte.getLeStatut().getCode() eq 2}" var="testChef" scope="page">
|
||||
<c:if test="${sessionScope.lePompierConnecte.getId() ne lePompier.getId()}" var="testAffich" scope="page">
|
||||
<c:set var="legend" scope="page">
|
||||
Données du pompier
|
||||
</c:set>
|
||||
<c:if test="${sessionScope.lePompier==null}" var="testCreation" scope="page">
|
||||
<c:set var="legend" scope="page">
|
||||
Données du pompier à créer
|
||||
</c:set>
|
||||
</c:if>
|
||||
<fieldset class="row mb-10 text-center">
|
||||
<%@include file= "jspf/formChoixPompier.jspf" %>
|
||||
</fieldset>
|
||||
</c:if>
|
||||
</c:if>
|
||||
|
||||
<fieldset class="row mt-1 mb-10">
|
||||
<legend>
|
||||
${legend}
|
||||
</legend>
|
||||
|
||||
<%@include file= "jspf/formulairePompier.jspf" %>
|
||||
</fieldset>
|
||||
</section>
|
||||
|
||||
<%@include file= "jspf/footer.jspf" %>
|
||||
</div> <!-- /div class container -->
|
||||
|
||||
<!-- Bootstrap Bundle with Popper -->
|
||||
<script src="https://cdn.jsdelivr.net/npm/bootstrap@5.1.3/dist/js/bootstrap.bundle.min.js" integrity="sha384-ka7Sk0Gln4gmtz2MlQnikT1wXgYsOg+OMhuP+IlRH9sENBO0LRn5q+8nbTov4+1p" crossorigin="anonymous"></script>
|
||||
|
||||
<!-- Code postaux -->
|
||||
<script src="js/ctrlCodePostal.js"></script>
|
||||
</body>
|
||||
</html>
|
||||
|
||||
|
||||
|
||||
|
26
web/WEB-INF/web.xml
Normal file
26
web/WEB-INF/web.xml
Normal file
@@ -0,0 +1,26 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<web-app version="3.1" xmlns="http://xmlns.jcp.org/xml/ns/javaee" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://xmlns.jcp.org/xml/ns/javaee http://xmlns.jcp.org/xml/ns/javaee/web-app_3_1.xsd">
|
||||
<filter>
|
||||
<filter-name>authentifFilter</filter-name>
|
||||
<filter-class>filter.authentifFilter</filter-class>
|
||||
</filter>
|
||||
<filter-mapping>
|
||||
<filter-name>authentifFilter</filter-name>
|
||||
<url-pattern>/*</url-pattern>
|
||||
</filter-mapping>
|
||||
<servlet>
|
||||
<servlet-name>AuthentifServlet</servlet-name>
|
||||
<servlet-class>servlet.AuthentifServlet</servlet-class>
|
||||
</servlet>
|
||||
|
||||
<servlet-mapping>
|
||||
<servlet-name>AuthentifServlet</servlet-name>
|
||||
<url-pattern>/authentification</url-pattern>
|
||||
</servlet-mapping>
|
||||
|
||||
<session-config>
|
||||
<session-timeout>
|
||||
30
|
||||
</session-timeout>
|
||||
</session-config>
|
||||
</web-app>
|
86
web/css/mycss.css
Normal file
86
web/css/mycss.css
Normal file
@@ -0,0 +1,86 @@
|
||||
/*
|
||||
css/mycss.css
|
||||
*/
|
||||
|
||||
body {
|
||||
background-color: #ECECEC;
|
||||
}
|
||||
#contenuAffiche {
|
||||
display: flex;
|
||||
justify-content:center;
|
||||
padding-top: 10px;
|
||||
padding-bottom: 10px;
|
||||
background-color: #ffffff;
|
||||
border-radius: 5px;
|
||||
}
|
||||
#authentif {
|
||||
width : 50%;
|
||||
}
|
||||
fieldset {
|
||||
border-radius: 5px;
|
||||
padding: 5px;
|
||||
border: 1px solid #DB0005;
|
||||
width: 100%;
|
||||
}
|
||||
legend {
|
||||
margin-bottom:0px;
|
||||
padding-bottom: 0px;
|
||||
}
|
||||
footer {
|
||||
margin-top: 10px;
|
||||
background-color: #EDEDED;
|
||||
text-align: center;
|
||||
font-size: smaller;
|
||||
padding: 10px;
|
||||
/*border-bottom: 3px solid #DB0005; */
|
||||
}
|
||||
header {
|
||||
background-color: #333333;
|
||||
color: #EDEDED;
|
||||
padding: 10px;
|
||||
|
||||
}
|
||||
#entete {
|
||||
display: flex;
|
||||
/* align-items: center; */
|
||||
align-items: flex-end ;
|
||||
}
|
||||
|
||||
li {
|
||||
text-align: center;
|
||||
}
|
||||
li:not(:first-child) {
|
||||
border-left: 2px solid #EDEDED;
|
||||
}
|
||||
#identite {
|
||||
width : 100%;
|
||||
}
|
||||
.navbar {
|
||||
padding: 0 0 0 0;
|
||||
border-radius: 5px;
|
||||
margin-left: -8%;
|
||||
}
|
||||
#logo {
|
||||
z-index:1; /* arriere plan */
|
||||
}
|
||||
#login {
|
||||
background-color: #EDEDED;
|
||||
color: #333333;
|
||||
display: flex;
|
||||
justify-content:space-around;
|
||||
align-items: center;
|
||||
margin-left: -8%;
|
||||
}
|
||||
|
||||
button a {
|
||||
text-decoration:none;
|
||||
color: #333333;
|
||||
}
|
||||
aside, #btAfficherPompier {
|
||||
justify-content: center;
|
||||
display: flex;
|
||||
align-items: center;
|
||||
}
|
||||
select[readonly] {
|
||||
pointer-events: none;
|
||||
}
|
BIN
web/images/favicon.ico
Normal file
BIN
web/images/favicon.ico
Normal file
Binary file not shown.
After Width: | Height: | Size: 3.3 KiB |
BIN
web/images/logo-sdis.png
Normal file
BIN
web/images/logo-sdis.png
Normal file
Binary file not shown.
After Width: | Height: | Size: 13 KiB |
BIN
web/images/pompier.png
Normal file
BIN
web/images/pompier.png
Normal file
Binary file not shown.
After Width: | Height: | Size: 3.0 KiB |
15
web/index.html
Normal file
15
web/index.html
Normal file
@@ -0,0 +1,15 @@
|
||||
<!DOCTYPE html>
|
||||
<!--
|
||||
Click nbfs://nbhost/SystemFileSystem/Templates/Licenses/license-default.txt to change this license
|
||||
Click nbfs://nbhost/SystemFileSystem/Templates/JSP_Servlet/Html.html to edit this template
|
||||
-->
|
||||
<html>
|
||||
<head>
|
||||
<title>TODO supply a title</title>
|
||||
<meta charset="UTF-8">
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
||||
</head>
|
||||
<body>
|
||||
<div>TODO write content</div>
|
||||
</body>
|
||||
</html>
|
28
web/js/ctrlCodePostal.js
Normal file
28
web/js/ctrlCodePostal.js
Normal file
@@ -0,0 +1,28 @@
|
||||
// Recherche de la ou des villes correspondantes au code postal saisi (exemple 54490 --> 7 villes)
|
||||
ztCP.onchange = function () {
|
||||
//alert("ztCP a changé");
|
||||
msgCP.textContent = "";
|
||||
zlVille.length = 0;
|
||||
const XHTTP = new XMLHttpRequest();
|
||||
XHTTP.onload = function () {
|
||||
if (this.status != 200) {
|
||||
msgCP.textContent = "Code postal erroné";
|
||||
} else {
|
||||
var lesVilles = JSON.parse(this.responseText);
|
||||
var info = "";
|
||||
if (lesVilles.length > 1) {
|
||||
info += "<optgroup label='Les villes du code postal' />";
|
||||
}
|
||||
for (var i = 0; i < lesVilles.length; i++) {
|
||||
var uneVille = lesVilles[i];
|
||||
info += "<option value='" + uneVille.libelleAcheminement + "'>";
|
||||
info += uneVille.libelleAcheminement + '</option>';
|
||||
}
|
||||
zlVille.innerHTML = info;
|
||||
}
|
||||
}
|
||||
var cp = ztCP.value;
|
||||
XHTTP.open("GET", "https://apicarto.ign.fr/api/codes-postaux/communes/" + cp);
|
||||
XHTTP.send();
|
||||
}
|
||||
|
Reference in New Issue
Block a user