diff --git a/tournaments/static/tournaments/css/style.css b/tournaments/static/tournaments/css/style.css
index a3b5bea..3998cf8 100644
--- a/tournaments/static/tournaments/css/style.css
+++ b/tournaments/static/tournaments/css/style.css
@@ -125,14 +125,19 @@ tr {
} */
.rounded-button {
- background-color: #f39200; /* Green background */
- color: white; /* White text */
+ background-color: #fae7ce; /* Green background */
+ color: #707070; /* White text */
padding: 15px 32px; /* Some padding */
font-size: 1em;
font-weight: 800;
cursor: pointer; /* Add a mouse pointer on hover */
border-radius: 16px; /* Rounded corners */
}
+.rounded-button:hover {
+ background-color: #f39200; /* Same background color on hover */
+ color: white; /* Same text color on hover */
+ text-decoration: none; /* Prevent underline on hover */
+}
.numbers {
font-feature-settings: "tnum";
@@ -705,3 +710,18 @@ h-margin {
font-size: x-small;
vertical-align: super;
}
+
+.alert {
+ color: red; /* Make the text red */
+ font-weight: bold; /* Optional: Make the text bold */
+}
+
+.destructive-button {
+ background-color: #ff4d4d; /* Red background */
+ color: white; /* White text */
+}
+
+.destructive-button:hover {
+ background-color: #cc0000; /* Darker red on hover */
+ color: white; /* White text on hover */
+}
diff --git a/tournaments/templates/profile.html b/tournaments/templates/profile.html
index ffde179..f2ce22c 100644
--- a/tournaments/templates/profile.html
+++ b/tournaments/templates/profile.html
@@ -17,7 +17,7 @@
Mot de passe oublié ?
diff --git a/tournaments/templates/registration/password_reset_complete.html b/tournaments/templates/registration/password_reset_complete.html
index a701c7b..7aac4d0 100644
--- a/tournaments/templates/registration/password_reset_complete.html
+++ b/tournaments/templates/registration/password_reset_complete.html
@@ -11,7 +11,7 @@
Votre mot de passe a été réinitialisé avec succès. Vous pouvez maintenant vous connecter avec votre nouveau mot de passe.
Retour à la connexion
diff --git a/tournaments/templates/registration/password_reset_form.html b/tournaments/templates/registration/password_reset_form.html
index 318f44d..0872462 100644
--- a/tournaments/templates/registration/password_reset_form.html
+++ b/tournaments/templates/registration/password_reset_form.html
@@ -11,7 +11,7 @@
{% csrf_token %}
-
Retour à la connexion
diff --git a/tournaments/templates/registration/signup.html b/tournaments/templates/registration/signup.html
index 7cdcee6..40ca09d 100644
--- a/tournaments/templates/registration/signup.html
+++ b/tournaments/templates/registration/signup.html
@@ -14,7 +14,7 @@
- Se désinscrire + + Se désinscrire +
{% else %}diff --git a/tournaments/views.py b/tournaments/views.py index c64c6fb..eddf5c8 100644 --- a/tournaments/views.py +++ b/tournaments/views.py @@ -619,7 +619,10 @@ def register_tournament(request, tournament_id): validator = LicenseValidator(licence_id) if validator.validate_license() is False and tournament.license_is_required is True: - messages.error(request, f"Le numéro de licence est invalide, la lettre ne correspond pas. {validator.computed_license_key}") + if len(licence_id) == 0: + messages.error(request, f"Le numéro de licence est obligatoire.") + else: + messages.error(request, f"Le numéro de licence est invalide, la lettre ne correspond pas.") return render(request, 'register_tournament.html', { 'team_form': team_form, 'add_player_form': add_player_form, @@ -691,6 +694,20 @@ def register_tournament(request, tournament_id): request.session['is_woman'] = data['is_woman'] request.session.modified = True # Ensure session is updated add_player_form.first_tournament = True + if add_player_form.names_is_valid() is False: + if len(request.session.get('team_registration', [])) == 0: + messages.error(request, "Pour confirmer votre inscription votre prénom et votre nom sont obligatoires.") + else: + messages.error(request, "Pour rajouter un partenaire, son prénom et son nom sont obligatoires.") + return render(request, 'register_tournament.html', { + 'team_form': team_form, + 'add_player_form': add_player_form, + 'tournament': tournament, + 'registration_successful': registration_successful, + 'current_players': request.session['team_registration'], + 'user_without_licence': user_without_licence + }) +