From ee1ee65a2c2a96a8abf6d2b3768a89d0c28eee19 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Germ=C3=A1n=20Correa?= Date: Fri, 3 Sep 2021 16:10:44 -0300 Subject: [PATCH] agrega cierre de registro segun setting de fecha, quda configurado para el 8 de Septiembre a las 23:59 --- src/routes.php | 4 +++- src/settings.php | 2 +- templates/registration.html | 2 +- 3 files changed, 5 insertions(+), 3 deletions(-) diff --git a/src/routes.php b/src/routes.php index e881acf..66c776f 100644 --- a/src/routes.php +++ b/src/routes.php @@ -77,9 +77,11 @@ $app->get('/registrarse', function (Request $request, Response $response, array if($this->settings["testing"]){ $recapsitekey = $this->settings["recaptcha"]["sitekeytest"]; } + $hoy=strtotime(date("Y-m-d H:i:s")); + $fechaCierre = strtotime($this->settings['close_registration']); return $this->renderer->render($response, 'registration.html', [ - 'closed' => $this->settings['close_registration'], + 'closed' => $hoy>$fechaCierre, 'sitekey' => $recapsitekey ]); }); diff --git a/src/settings.php b/src/settings.php index a67277b..03ee86e 100644 --- a/src/settings.php +++ b/src/settings.php @@ -5,7 +5,7 @@ return [ 'addContentLengthHeader' => false, // Allow the web server to send the content-length header 'debug' => true, 'testing' => true, - 'close_registration' => false, + 'close_registration' => "2021-09-08T23:59:00-0300", // Renderer settings 'renderer' => [ diff --git a/templates/registration.html b/templates/registration.html index 8918862..b891a8a 100644 --- a/templates/registration.html +++ b/templates/registration.html @@ -10,7 +10,7 @@ {% set disabled="disabled" %}
Registration has been closed!
- For any further questions, please contact: ggdworkshop@cmat.edu.uy + For any further questions, please contact: clam2021@fing.edu.uy
{% endif %}