Compare commits
7 Commits
3477461fb2
...
prod/v1.3
| Author | SHA1 | Date | |
|---|---|---|---|
| f93d6eafb3 | |||
| e670e38343 | |||
| fe3a1ec36c | |||
| 44ae524626 | |||
| 829a69f1a5 | |||
| f8336fb407 | |||
| ab1094d29a |
@@ -58,3 +58,20 @@ jobs:
|
|||||||
echo "CAPTCHA_SITEKEY=${CAPTCHA_SITEKEY:-1x00000000000000000000AA}" >> .env
|
echo "CAPTCHA_SITEKEY=${CAPTCHA_SITEKEY:-1x00000000000000000000AA}" >> .env
|
||||||
docker compose down app || true
|
docker compose down app || true
|
||||||
docker compose up -d --build app
|
docker compose up -d --build app
|
||||||
|
|
||||||
|
- name: Verify application startup
|
||||||
|
run: |
|
||||||
|
echo "Waiting for application to start..."
|
||||||
|
COUNT=0
|
||||||
|
while [ $COUNT -lt 30 ]; do
|
||||||
|
if docker exec astalange_app wget -qO- http://localhost:8080/login | grep -q "Connexion"; then
|
||||||
|
echo "Application is up and login page is accessible!"
|
||||||
|
exit 0
|
||||||
|
fi
|
||||||
|
echo "Waiting... ($COUNT/30)"
|
||||||
|
sleep 5
|
||||||
|
COUNT=$((COUNT+1))
|
||||||
|
done
|
||||||
|
echo "Application failed to start or login page is not accessible."
|
||||||
|
docker logs astalange_app
|
||||||
|
exit 1
|
||||||
|
|||||||
@@ -55,4 +55,19 @@ jobs:
|
|||||||
docker compose down app || true
|
docker compose down app || true
|
||||||
docker compose up -d --build app
|
docker compose up -d --build app
|
||||||
|
|
||||||
|
- name: Verify application startup
|
||||||
|
run: |
|
||||||
|
echo "Waiting for application to start..."
|
||||||
|
COUNT=0
|
||||||
|
while [ $COUNT -lt 30 ]; do
|
||||||
|
if docker exec astalange_app wget -qO- http://localhost:8080/login | grep -q "Connexion"; then
|
||||||
|
echo "Application is up and login page is accessible!"
|
||||||
|
exit 0
|
||||||
|
fi
|
||||||
|
echo "Waiting... ($COUNT/30)"
|
||||||
|
sleep 5
|
||||||
|
COUNT=$((COUNT+1))
|
||||||
|
done
|
||||||
|
echo "Application failed to start or login page is not accessible."
|
||||||
|
docker logs astalange_app
|
||||||
|
exit 1
|
||||||
|
|||||||
@@ -5,7 +5,7 @@
|
|||||||
<parent>
|
<parent>
|
||||||
<artifactId>as-talange-parent</artifactId>
|
<artifactId>as-talange-parent</artifactId>
|
||||||
<groupId>com.astalange</groupId>
|
<groupId>com.astalange</groupId>
|
||||||
<version>1.0-SNAPSHOT</version>
|
<version>1.3</version>
|
||||||
</parent>
|
</parent>
|
||||||
<modelVersion>4.0.0</modelVersion>
|
<modelVersion>4.0.0</modelVersion>
|
||||||
|
|
||||||
|
|||||||
@@ -5,7 +5,7 @@
|
|||||||
<parent>
|
<parent>
|
||||||
<artifactId>as-talange-parent</artifactId>
|
<artifactId>as-talange-parent</artifactId>
|
||||||
<groupId>com.astalange</groupId>
|
<groupId>com.astalange</groupId>
|
||||||
<version>1.0-SNAPSHOT</version>
|
<version>1.3</version>
|
||||||
</parent>
|
</parent>
|
||||||
<modelVersion>4.0.0</modelVersion>
|
<modelVersion>4.0.0</modelVersion>
|
||||||
|
|
||||||
|
|||||||
@@ -5,7 +5,7 @@
|
|||||||
<parent>
|
<parent>
|
||||||
<artifactId>as-talange-parent</artifactId>
|
<artifactId>as-talange-parent</artifactId>
|
||||||
<groupId>com.astalange</groupId>
|
<groupId>com.astalange</groupId>
|
||||||
<version>1.0-SNAPSHOT</version>
|
<version>1.3</version>
|
||||||
</parent>
|
</parent>
|
||||||
<modelVersion>4.0.0</modelVersion>
|
<modelVersion>4.0.0</modelVersion>
|
||||||
|
|
||||||
|
|||||||
@@ -1,14 +1,23 @@
|
|||||||
package com.astalange.web.controller;
|
package com.astalange.web.controller;
|
||||||
|
|
||||||
import jakarta.servlet.http.HttpServletRequest;
|
import jakarta.servlet.http.HttpServletRequest;
|
||||||
|
import org.springframework.beans.factory.annotation.Value;
|
||||||
import org.springframework.web.bind.annotation.ControllerAdvice;
|
import org.springframework.web.bind.annotation.ControllerAdvice;
|
||||||
import org.springframework.web.bind.annotation.ModelAttribute;
|
import org.springframework.web.bind.annotation.ModelAttribute;
|
||||||
|
|
||||||
@ControllerAdvice
|
@ControllerAdvice
|
||||||
public class GlobalControllerAdvice {
|
public class GlobalControllerAdvice {
|
||||||
|
|
||||||
|
@Value("${app.version}")
|
||||||
|
private String appVersion;
|
||||||
|
|
||||||
@ModelAttribute("requestURI")
|
@ModelAttribute("requestURI")
|
||||||
public String requestURI(final HttpServletRequest request) {
|
public String requestURI(final HttpServletRequest request) {
|
||||||
return request.getRequestURI();
|
return request.getRequestURI();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ModelAttribute("appVersion")
|
||||||
|
public String appVersion() {
|
||||||
|
return appVersion;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
+3
-3
@@ -147,10 +147,10 @@ public class PublicInscriptionController {
|
|||||||
redirectAttributes.addFlashAttribute("tarif", tarifStr);
|
redirectAttributes.addFlashAttribute("tarif", tarifStr);
|
||||||
redirectAttributes.addFlashAttribute("documents", java.util.Arrays.asList(
|
redirectAttributes.addFlashAttribute("documents", java.util.Arrays.asList(
|
||||||
"Photo d’identité",
|
"Photo d’identité",
|
||||||
"Carte d’identité ou passeport de l’enfant",
|
"Carte d’identité ou passeport de l'adhérent",
|
||||||
"Livret de famille (si pas de pièce d’identité)",
|
"Livret de famille (si pas de pièce d’identité)",
|
||||||
"Adresse e-mail du représentant légal",
|
"Adresse e-mail de l'adhérent (représentant légal en cas de mineur)",
|
||||||
"Pour les enfants nés à l’étranger : passeport + justificatif de domicile des parents"
|
"Pour les adhérents nés à l'étranger : Passeport + justificatif de domicile (du représentant légal en cas de mineur)"
|
||||||
));
|
));
|
||||||
redirectAttributes.addFlashAttribute("isNouvelle", true);
|
redirectAttributes.addFlashAttribute("isNouvelle", true);
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -20,3 +20,6 @@ spring:
|
|||||||
|
|
||||||
server:
|
server:
|
||||||
port: 8080
|
port: 8080
|
||||||
|
|
||||||
|
app:
|
||||||
|
version: @project.version@
|
||||||
|
|||||||
@@ -51,6 +51,7 @@
|
|||||||
<form th:action="@{/logout}" method="post">
|
<form th:action="@{/logout}" method="post">
|
||||||
<button type="submit" class="text-sm text-red-600 hover:text-red-700 font-medium">Déconnexion</button>
|
<button type="submit" class="text-sm text-red-600 hover:text-red-700 font-medium">Déconnexion</button>
|
||||||
</form>
|
</form>
|
||||||
|
<div class="mt-2 text-[10px] text-gray-400">v<span th:text="${appVersion}">1.0-SNAPSHOT</span></div>
|
||||||
</div>
|
</div>
|
||||||
</aside>
|
</aside>
|
||||||
</body>
|
</body>
|
||||||
|
|||||||
@@ -8,10 +8,14 @@
|
|||||||
<link href="https://fonts.googleapis.com/css2?family=Inter:wght@400;500;600;700&display=swap" rel="stylesheet">
|
<link href="https://fonts.googleapis.com/css2?family=Inter:wght@400;500;600;700&display=swap" rel="stylesheet">
|
||||||
<style>
|
<style>
|
||||||
body { font-family: 'Inter', sans-serif; }
|
body { font-family: 'Inter', sans-serif; }
|
||||||
.was-validated input:invalid {
|
.was-validated input:invalid, .was-validated select:invalid {
|
||||||
border-color: #ef4444 !important;
|
border-color: #ef4444 !important;
|
||||||
background-color: #fef2f2 !important;
|
background-color: #fef2f2 !important;
|
||||||
}
|
}
|
||||||
|
.was-validated input[type="radio"]:invalid, .was-validated input[type="checkbox"]:invalid {
|
||||||
|
outline: 2px solid #ef4444;
|
||||||
|
outline-offset: 2px;
|
||||||
|
}
|
||||||
</style>
|
</style>
|
||||||
</head>
|
</head>
|
||||||
<body class="bg-gray-50 flex items-center justify-center min-h-screen py-12">
|
<body class="bg-gray-50 flex items-center justify-center min-h-screen py-12">
|
||||||
@@ -28,7 +32,7 @@
|
|||||||
</ul>
|
</ul>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<form th:action="@{/inscription-public/formulaire}" th:object="${preInscription}" method="post" class="space-y-6">
|
<form th:action="@{/inscription-public/formulaire}" th:object="${preInscription}" method="post" class="space-y-6" novalidate>
|
||||||
<input type="hidden" name="token" th:value="${tokenUuid}" />
|
<input type="hidden" name="token" th:value="${tokenUuid}" />
|
||||||
|
|
||||||
<div class="space-y-3">
|
<div class="space-y-3">
|
||||||
@@ -59,7 +63,7 @@
|
|||||||
<li>Carte d’identité ou passeport de l'adhérent</li>
|
<li>Carte d’identité ou passeport de l'adhérent</li>
|
||||||
<li>Livret de famille (si pas de pièce d’identité)</li>
|
<li>Livret de famille (si pas de pièce d’identité)</li>
|
||||||
<li>Adresse e-mail de l'adhérent (représentant légal en cas de mineur)</li>
|
<li>Adresse e-mail de l'adhérent (représentant légal en cas de mineur)</li>
|
||||||
<li>Pour les adhérents nés à l’étranger : passeport + justificatif de domicile des parents</li>
|
<li>Pour les adhérents nés à l'étranger : Passeport + justificatif de domicile (du représentant légal en cas de mineur)</li>
|
||||||
</ul>
|
</ul>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
@@ -131,6 +135,9 @@
|
|||||||
<p class="text-[10px] text-gray-400 text-center mt-4 leading-tight">
|
<p class="text-[10px] text-gray-400 text-center mt-4 leading-tight">
|
||||||
Les données sont stockées de manière sécurisée, accessibles uniquement au bureau du club. Vous pouvez demander leur suppression à tout moment.
|
Les données sont stockées de manière sécurisée, accessibles uniquement au bureau du club. Vous pouvez demander leur suppression à tout moment.
|
||||||
</p>
|
</p>
|
||||||
|
<p class="text-[10px] text-gray-400 text-center mt-2">
|
||||||
|
v<span th:text="${appVersion}">1.0-SNAPSHOT</span>
|
||||||
|
</p>
|
||||||
</form>
|
</form>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
@@ -139,6 +146,15 @@
|
|||||||
form.addEventListener('submit', function(event) {
|
form.addEventListener('submit', function(event) {
|
||||||
if (!form.checkValidity()) {
|
if (!form.checkValidity()) {
|
||||||
event.preventDefault();
|
event.preventDefault();
|
||||||
|
|
||||||
|
let errorMsg = document.getElementById('form-error-msg');
|
||||||
|
if (!errorMsg) {
|
||||||
|
errorMsg = document.createElement('div');
|
||||||
|
errorMsg.id = 'form-error-msg';
|
||||||
|
errorMsg.className = 'mb-6 p-4 bg-red-50 border-l-4 border-red-500 text-red-700 text-sm rounded transition-all duration-300';
|
||||||
|
errorMsg.innerHTML = '<h3 class="font-bold">Erreur de validation</h3><p>Veuillez renseigner tous les champs obligatoires (encadrés en rouge).</p>';
|
||||||
|
form.insertBefore(errorMsg, form.firstChild);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
form.classList.add('was-validated');
|
form.classList.add('was-validated');
|
||||||
|
|
||||||
|
|||||||
@@ -13,7 +13,7 @@
|
|||||||
|
|
||||||
<groupId>com.astalange</groupId>
|
<groupId>com.astalange</groupId>
|
||||||
<artifactId>as-talange-parent</artifactId>
|
<artifactId>as-talange-parent</artifactId>
|
||||||
<version>1.0-SNAPSHOT</version>
|
<version>1.3</version>
|
||||||
<packaging>pom</packaging>
|
<packaging>pom</packaging>
|
||||||
|
|
||||||
<name>as-talange-parent</name>
|
<name>as-talange-parent</name>
|
||||||
|
|||||||
Reference in New Issue
Block a user