Compare commits
2 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
| 5e75767f92 | |||
| 2f8c8f0829 |
+4
@@ -34,8 +34,12 @@ public class PublicInscriptionController {
|
|||||||
this.saisonRepository = saisonRepository;
|
this.saisonRepository = saisonRepository;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Value("${captcha.sitekey:1x00000000000000000000AA}")
|
||||||
|
private String captchaSiteKey;
|
||||||
|
|
||||||
@GetMapping("/demarrer")
|
@GetMapping("/demarrer")
|
||||||
public String showDemarrer(Model model) {
|
public String showDemarrer(Model model) {
|
||||||
|
model.addAttribute("captchaSiteKey", captchaSiteKey);
|
||||||
Saison activeSaison = saisonRepository.findByEstActiveTrue().orElse(null);
|
Saison activeSaison = saisonRepository.findByEstActiveTrue().orElse(null);
|
||||||
if (activeSaison == null || !activeSaison.getInscriptionsOuvertes()) {
|
if (activeSaison == null || !activeSaison.getInscriptionsOuvertes()) {
|
||||||
model.addAttribute("inscriptionsFermees", true);
|
model.addAttribute("inscriptionsFermees", true);
|
||||||
|
|||||||
@@ -30,13 +30,15 @@
|
|||||||
Les inscriptions ne sont pas ouvertes pour le moment, veuillez contacter un responsable du club.
|
Les inscriptions ne sont pas ouvertes pour le moment, veuillez contacter un responsable du club.
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<form th:unless="${inscriptionsFermees}" th:action="@{/inscription-public/demarrer}" method="post"
|
<p th:unless="${inscriptionsFermees}" class="text-gray-600 mb-8 leading-relaxed">
|
||||||
class="flex flex-col items-center">
|
Afin de sécuriser le processus et d'éviter les soumissions automatisées (robots),
|
||||||
<!-- Remplacer par la vraie clé de site Cloudflare Turnstile -->
|
nous vous demandons de bien vouloir valider le test de sécurité ci-dessous avant de continuer.
|
||||||
<div class="cf-turnstile mb-6" data-sitekey="1x00000000000000000000AA"></div>
|
</p>
|
||||||
|
|
||||||
<button type="submit"
|
<form th:unless="${inscriptionsFermees}" th:action="@{/inscription-public/demarrer}" method="post" class="flex flex-col items-center">
|
||||||
class="w-full bg-blue-600 hover:bg-blue-700 text-white font-medium py-3 px-4 rounded-lg transition-colors">
|
<div class="cf-turnstile mb-6" th:attr="data-sitekey=${captchaSiteKey}"></div>
|
||||||
|
|
||||||
|
<button type="submit" class="bg-blue-600 hover:bg-blue-700 text-white font-semibold py-3 px-8 rounded-xl shadow-md hover:shadow-lg transition-all duration-200 transform hover:-translate-y-0.5">
|
||||||
Accéder au formulaire
|
Accéder au formulaire
|
||||||
</button>
|
</button>
|
||||||
</form>
|
</form>
|
||||||
|
|||||||
@@ -10,6 +10,7 @@ services:
|
|||||||
- "5433:5432"
|
- "5433:5432"
|
||||||
volumes:
|
volumes:
|
||||||
- postgres_data:/var/lib/postgresql/data
|
- postgres_data:/var/lib/postgresql/data
|
||||||
|
restart: always
|
||||||
|
|
||||||
pgadmin:
|
pgadmin:
|
||||||
image: dpage/pgadmin4
|
image: dpage/pgadmin4
|
||||||
@@ -21,6 +22,7 @@ services:
|
|||||||
- "5050:80"
|
- "5050:80"
|
||||||
depends_on:
|
depends_on:
|
||||||
- db
|
- db
|
||||||
|
restart: always
|
||||||
|
|
||||||
app:
|
app:
|
||||||
build:
|
build:
|
||||||
|
|||||||
Reference in New Issue
Block a user