diff --git a/front/assets/court/court.svg b/front/assets/court/court.svg
deleted file mode 100644
index e01fd58..0000000
--- a/front/assets/court/court.svg
+++ /dev/null
@@ -1,63 +0,0 @@
-
\ No newline at end of file
diff --git a/front/views/Editor.tsx b/front/views/Editor.tsx
index cee7b98..cbb2da5 100644
--- a/front/views/Editor.tsx
+++ b/front/views/Editor.tsx
@@ -32,7 +32,7 @@ import { CourtAction } from "./editor/CourtAction"
import { BasketCourt } from "../components/editor/BasketCourt"
import { ratioWithinBase } from "../components/arrows/Pos"
import { Action, ActionKind } from "../model/tactic/Action"
-import {BASE} from "../Constants";
+import { BASE } from "../Constants"
const ERROR_STYLE: CSSProperties = {
borderColor: "red",
@@ -399,7 +399,7 @@ function EditorView({
Home
-
+
*/}

{
location.pathname = BASE + "/settings"
}}
diff --git a/public/account.svg b/public/account.svg
deleted file mode 100644
index 70d7391..0000000
--- a/public/account.svg
+++ /dev/null
@@ -1 +0,0 @@
-
\ No newline at end of file
diff --git a/src/App/Controller/AuthController.php b/src/App/Controller/AuthController.php
index 4d9eebe..386f896 100644
--- a/src/App/Controller/AuthController.php
+++ b/src/App/Controller/AuthController.php
@@ -31,24 +31,31 @@ class AuthController {
*/
public function register(array $request, MutableSessionHandle $session): HttpResponse {
$fails = [];
- $request = HttpRequest::from($request, $fails, [
- "username" => [DefaultValidators::name(), DefaultValidators::lenBetween(2, 32)],
- "password" => [DefaultValidators::lenBetween(6, 256)],
- "confirmpassword" => [DefaultValidators::lenBetween(6, 256)],
- "email" => [DefaultValidators::email(), DefaultValidators::lenBetween(5, 256)],
+ HttpRequest::from($request, $fails, [
+ "username" => [Validators::name(), Validators::lenBetween(2, 32)],
+ "password" => [Validators::lenBetween(6, 256)],
+ "confirmpassword" => [Validators::lenBetween(6, 256)],
+ "email" => [Validators::email(), Validators::lenBetween(5, 256)],
]);
+
if (!empty($fails)) {
- return ViewHttpResponse::twig("display_register.html.twig", ['fails' => $fails]);
+ if (!(in_array($request['username'], $fails)) or !(in_array($request['email'], $fails))) {
+ return ViewHttpResponse::twig("display_register.html.twig", ['fails' => $fails,'username' => $request['username'],'email' => $request['email']]);
+ }
}
+
$account = $this->model->register($request['username'], $request["password"], $request['confirmpassword'], $request['email'], $fails);
if (!empty($fails)) {
return ViewHttpResponse::twig("display_register.html.twig", ['fails' => $fails]);
}
-
$session->setAccount($account);
$target_url = $session->getInitialTarget();
- return HttpResponse::redirect($target_url ?? "/home");
+ if ($target_url != null) {
+ return HttpResponse::redirect_absolute($target_url);
+ }
+
+ return HttpResponse::redirect("/home");
}
@@ -73,7 +80,11 @@ class AuthController {
$target_url = $session->getInitialTarget();
$session->setInitialTarget(null);
- return HttpResponse::redirect($target_url ?? "/home");
+ if ($target_url != null) {
+ return HttpResponse::redirect_absolute($target_url);
+ }
+
+ return HttpResponse::redirect("/home");
}
}
diff --git a/src/App/Views/display_register.html.twig b/src/App/Views/display_register.html.twig
index 38bdb43..7b883a5 100644
--- a/src/App/Views/display_register.html.twig
+++ b/src/App/Views/display_register.html.twig
@@ -62,6 +62,10 @@
text-align: right;
}
+ .consentement{
+ font-size: small;
+ }
+
#buttons{
display: flex;
justify-content: center;
@@ -95,15 +99,18 @@
{% endfor %}
-
+
-
+
+
Vous avez déjà un compte ?
-