fix minor text, begin register implementation
@ -1 +0,0 @@
|
||||
,germanc,AM,10.12.2017 23:23,file:///home/germanc/.config/libreoffice/4;
|
10
db/db.php
@ -13,10 +13,10 @@
|
||||
|
||||
public function insert($registro){
|
||||
$sql = 'INSERT INTO Registro (nombre,apellido,titulo,afiliacion,ciudad,'
|
||||
.'pais,email,fechaLlegada,fechaPartida,financiacion,'
|
||||
."invitado,cartaInvitacion,roomingPref,roommate,fechaRegistro)"
|
||||
.'pais,email,fechaLlegada,fechaPartida,'
|
||||
."cartaInvitacion,roomingPref,roommate,fechaRegistro)"
|
||||
.' VALUES (:nombre,:apellido,:titulo,:afiliacion,:ciudad,:pais,:email,:fechaLlegada,'
|
||||
.':fechaPartida,:financiacion,:invitado,:cartaInvitacion,:roomingPref,:roommate,:fechaRegistro);';
|
||||
.':fechaPartida,:cartaInvitacion,:roomingPref,:roommate,:fechaRegistro);';
|
||||
|
||||
$stmt = $this->pdo->prepare($sql);
|
||||
$stmt->execute([
|
||||
@ -29,8 +29,8 @@
|
||||
':email' => $registro['email'],
|
||||
':fechaLlegada' => $registro['bda'],
|
||||
':fechaPartida' => $registro['eda'],
|
||||
':financiacion' => $registro['financiacion'],
|
||||
':invitado' => $registro['invited'],
|
||||
//':financiacion' => $registro['financiacion'],
|
||||
//':invitado' => $registro['invited'],
|
||||
':cartaInvitacion' => $registro['letterinvited'],
|
||||
':roomingPref' => $registro['roomtype'],
|
||||
':roommate' => $registro['roomate'],
|
||||
|
@ -10,8 +10,8 @@ CREATE TABLE IF NOT EXISTS Registro
|
||||
email VARCHAR(80) NOT NULL UNIQUE,
|
||||
fechaLlegada DATE,
|
||||
fechaPartida DATE,
|
||||
financiacion BOOLEAN NOT NULL,
|
||||
invitado BOOLEAN NOT NULL,
|
||||
/*financiacion BOOLEAN NOT NULL,*/
|
||||
/*invitado BOOLEAN NOT NULL,*/
|
||||
cartaInvitacion BOOLEAN NOT NULL,
|
||||
roomingPref VARCHAR(50),
|
||||
roommate VARCHAR(50),
|
||||
@ -49,6 +49,8 @@ INSERT INTO Speakers(nombre,apellido,afiliacion,foto,web,confirmado)
|
||||
VALUES('Frédéric', 'Le Roux','Université Paris VI','img/speakers/fleroux.jpg','https://webusers.imj-prg.fr/~frederic.le-roux/',1);
|
||||
INSERT INTO Speakers(nombre,apellido,afiliacion,foto,web,confirmado)
|
||||
VALUES('Salvador', 'Zanata','Universidade de São Paulo','img/speakers/szanata.jpg','https://www.ime.usp.br/~sazanata/',1);
|
||||
INSERT INTO Speakers(nombre,apellido,afiliacion,foto,web,confirmado)
|
||||
VALUES('Shinegori', 'Matsumoto','Nihon University','img/speakers/smatsumoto.jpg','https://researchmap.jp/read0028300/?lang=english',1);
|
||||
|
||||
|
||||
|
||||
|
Before Width: | Height: | Size: 268 KiB |
Before Width: | Height: | Size: 94 KiB |
Before Width: | Height: | Size: 47 KiB |
Before Width: | Height: | Size: 16 KiB |
Before Width: | Height: | Size: 40 KiB |
Before Width: | Height: | Size: 1.4 MiB |
Before Width: | Height: | Size: 131 KiB |
@ -89,28 +89,32 @@ function select2Focus() {
|
||||
|
||||
},
|
||||
submitHandler: function(form){
|
||||
|
||||
var formdata = $(form).serializeArray();
|
||||
formdata.find(item => item.name === "pais").value = $("#pais").select2("data")[0].text;
|
||||
formdata.find(item => item.name === "roomtype").value = $("#roomtype").select2("data")[0].text;
|
||||
var parameters = $.param(formdata);
|
||||
|
||||
var post = $.post('api/register', parameters);
|
||||
post.done(function(data){
|
||||
if(data.success){
|
||||
validator.resetForm();
|
||||
reset($("#registerform"));
|
||||
showMsg(false,data.msg);
|
||||
}
|
||||
else{
|
||||
var errMsg = data.msg+"<ul>";
|
||||
$.each(data.errors, function(k,v){
|
||||
errMsg+="<li>"+v+"</li>";
|
||||
});
|
||||
errMsg+="</ul>";
|
||||
console.log(errMsg);
|
||||
showMsg(true,errMsg);
|
||||
}
|
||||
});
|
||||
var parameters = $.param(formdata);
|
||||
$.post('api/register', parameters)
|
||||
.done(function(data){
|
||||
alert("post done");
|
||||
|
||||
if(data.success){
|
||||
alert("peter");
|
||||
validator.resetForm();
|
||||
reset($("#registerform"));
|
||||
showMsg(false,data.msg);
|
||||
}
|
||||
else{
|
||||
|
||||
var errMsg = data.msg+"<ul>";
|
||||
$.each(data.errors, function(k,v){
|
||||
errMsg+="<li>"+v+"</li>";
|
||||
});
|
||||
errMsg+="</ul>";
|
||||
console.log(errMsg);
|
||||
showMsg(true,errMsg);
|
||||
}
|
||||
});
|
||||
|
||||
},
|
||||
errorElement: "em",
|
||||
|
@ -12,7 +12,15 @@ $app->get('/', function (Request $request, Response $response, array $args) {
|
||||
|
||||
$app->get('/registration', function (Request $request, Response $response, array $args) {
|
||||
$this->logger->info("GDDWorkshop '/registrtion' route");
|
||||
return $this->renderer->render($response, 'registration.html', ['closed' => $this->settings['close_registration']]);
|
||||
$recapsitekey = $this->settings["recaptcha"]["sitekey"];
|
||||
if($this->settings["testing"]){
|
||||
$recapsitekey = $this->settings["recaptcha"]["sitekeytest"];
|
||||
}
|
||||
return $this->renderer->render($response, 'registration.html',
|
||||
[
|
||||
'closed' => $this->settings['close_registration'],
|
||||
'sitekey' => $recapsitekey
|
||||
]);
|
||||
});
|
||||
|
||||
|
||||
@ -100,10 +108,10 @@ $app->group('/api', function($app){
|
||||
$messages->addMessageNow("submit-register-err", "Last name could not be empty");
|
||||
if(!isset($data['email'])||empty($data['email']))
|
||||
$messages->addMessageNow("submit-register-err", "E-mail could not be empty");
|
||||
if(!isset($data['financiacion'])||!is_numeric($data['financiacion']))
|
||||
$messages->addMessageNow("submit-register-err", "Question about financial support must have a selected answer");
|
||||
if(!isset($data['invited'])||!is_numeric($data['invited']))
|
||||
$messages->addMessageNow("submit-register-err", "Question about 'invited to participate in this conference' must have a selected answer");
|
||||
/*if(!isset($data['financiacion'])||!is_numeric($data['financiacion']))
|
||||
$messages->addMessageNow("submit-register-err", "Question about financial support must have a selected answer");*/
|
||||
/*if(!isset($data['invited'])||!is_numeric($data['invited']))
|
||||
$messages->addMessageNow("submit-register-err", "Question about 'invited to participate in this conference' must have a selected answer");*/
|
||||
if(!isset($data['letterinvited'])||!is_numeric($data['letterinvited']))
|
||||
$messages->addMessageNow("submit-register-err", "Question about needing a letter of invitation must have a selected answer");
|
||||
|
||||
@ -111,8 +119,13 @@ $app->group('/api', function($app){
|
||||
if(!isset($data['g-recaptcha-response'])||empty($data['g-recaptcha-response'])){
|
||||
$messages->addMessageNow("submit-register-err", "Please validate captcha!");
|
||||
}
|
||||
else {
|
||||
$recaptcha = new ReCaptcha\ReCaptcha($this->settings['recaptcha']['secret-test']);
|
||||
else {
|
||||
$recapsecret = $this->settings['recaptcha']['secret'];
|
||||
if($this->settings['testing']){
|
||||
$recapsecret = $this->settings['recaptcha']['secrettest'];
|
||||
}
|
||||
var_dump($recapsecret);
|
||||
$recaptcha = new ReCaptcha\ReCaptcha($recapsecret);
|
||||
//get remote ip from request header TODO
|
||||
$resp = $recaptcha->verify($data['g-recaptcha-response'], $_SERVER['REMOTE_ADDR']);
|
||||
if(!$resp->isSuccess()){
|
||||
@ -126,7 +139,7 @@ $app->group('/api', function($app){
|
||||
try{
|
||||
if($db->findByMail($data['email']))
|
||||
$messages->addMessageNow("submit-register-err", $data['email']." is already registered<br/>"
|
||||
."Please contact: <b>ggdworkshop@cmat.edu.uy</b>");
|
||||
."Please contact: <b>surfacedynamics2018@cmat.edu.uy</b>");
|
||||
else
|
||||
$db->insert($data);
|
||||
}
|
||||
@ -146,14 +159,14 @@ $app->group('/api', function($app){
|
||||
"msg"=>"You have been successfully registered to the GGDWorkshop",
|
||||
"data"=>$data);
|
||||
$msg = "Hello ".$data["nombre"]." ".$data["apellido"].",\n\n".
|
||||
"You have been successfully registered to the Workshop on Groups, Geometry and Dynamics!\n\n".
|
||||
"For any questions please contact ggdworkshop@cmat.edu.uy\n\n".
|
||||
"You have been successfully registered to the Surface Dynamics 2018 Workshop!\n\n".
|
||||
"For any questions please contact surfacedynamics2018@cmat.edu.uy\n\n".
|
||||
"Best!\n\n";
|
||||
$headers = 'From: ' . "ggdworkshop@cmat.edu.uy" . "\r\n" .
|
||||
'Reply-To: ' . "ggdworkshop@cmat.edu.uy" . "\r\n" .
|
||||
$headers = 'From: ' . "surfacedynamics2018@cmat.edu.uy" . "\r\n" .
|
||||
'Reply-To: ' . "surfacedynamics2018@edu.uy" . "\r\n" .
|
||||
'Content-Type: ' . "text/plain; charset=UTF-8". "\r\n" .
|
||||
'X-Mailer: PHP/' . phpversion();
|
||||
mail($data['email'], 'Successfully registered to the Workshop on Groups, Geometry and Dynamics', $msg, $headers);
|
||||
mail($data['email'], 'Successfully registered to the Surface Dynamics 2018 Workshop', $msg, $headers);
|
||||
|
||||
|
||||
|
||||
|
@ -4,6 +4,7 @@ return [
|
||||
'displayErrorDetails' => true, // set to false in production
|
||||
'addContentLengthHeader' => false, // Allow the web server to send the content-length header
|
||||
'debug' => true,
|
||||
'testing' => true,
|
||||
'close_registration' => false,
|
||||
|
||||
// Renderer settings
|
||||
@ -28,7 +29,10 @@ return [
|
||||
],
|
||||
'recaptcha' => [
|
||||
'secret' => "6LesRDsUAAAAAA6t3UgL4U4Foc9njmXX-8HIiLj_",
|
||||
'secret-test' => "6LeIxAcTAAAAAGG-vFI1TnRWxMZNFuojJ4WifJWe",
|
||||
'secrettest' => "6LeIxAcTAAAAAGG-vFI1TnRWxMZNFuojJ4WifJWe",
|
||||
'sitekey' => "6LesRDsUAAAAAJvyoODvjiza9u75qEGJmbKHEV6s",
|
||||
'sitekeytest' => "6LeIxAcTAAAAAJcZVRqyHh71UMIEGNQ_MXjiZKhI"
|
||||
],
|
||||
|
||||
],
|
||||
];
|
||||
|
@ -28,7 +28,7 @@
|
||||
<span class="icon-bar"></span>
|
||||
<span class="icon-bar"></span>
|
||||
</button>
|
||||
<a class="navbar-brand visible-xs" href="#">Surfac Dynamics Menu</a>
|
||||
<a class="navbar-brand visible-xs" href="#">Surface Dynamics Menu</a>
|
||||
</div>
|
||||
<div class="navbar-collapse collapse" id="menucollapse">
|
||||
<div class="container">
|
||||
@ -37,7 +37,7 @@
|
||||
<li id="home"><a href="/"><i class="glyphicon glyphicon-home"></i></a></li>
|
||||
<li id="program"><a href="program">Program</a></li>
|
||||
<!--<li id="committees"><a href="committees">Committees</a></li>-->
|
||||
<!--<li id="invitedspeakers"><a href="invitedspeakers">Invited Speakers</a></li>-->
|
||||
<li id="invitedspeakers"><a href="invitedspeakers">Invited Speakers</a></li>
|
||||
<li id="registration"><a href="registration">Registration</a></li>
|
||||
<li id="participants"><a href="participants">Participants</a></li>
|
||||
<li id="practicalinfo"><a href="practicalinfo">Practical Information</a></li>
|
||||
|
@ -176,14 +176,11 @@
|
||||
<div class="row">
|
||||
<div class="form-group col-xs-12">
|
||||
<div class="input-container">
|
||||
<!--
|
||||
<div id="testing" class="g-recaptcha"
|
||||
data-sitekey="6LeIxAcTAAAAAJcZVRqyHh71UMIEGNQ_MXjiZKhI"
|
||||
data-callback="recaptchaCallback"></div>
|
||||
-->
|
||||
|
||||
<div class="g-recaptcha"
|
||||
data-sitekey="6LesRDsUAAAAAJvyoODvjiza9u75qEGJmbKHEV6s"
|
||||
data-callback="recaptchaCallback"></div>
|
||||
data-sitekey="{{ sitekey }}"
|
||||
data-callback="recaptchaCallback">
|
||||
</div>
|
||||
|
||||
|
||||
<input type="hidden" class="hiddenRecaptcha required" name="hiddenRecaptcha" id="hiddenRecaptcha">
|
||||
@ -219,7 +216,7 @@
|
||||
<div class="modal-content">
|
||||
<div class="modal-header">
|
||||
<button type="button" class="close" data-dismiss="modal">×</button>
|
||||
<h4 class="modal-title">GGDWorkshop Registration</h4>
|
||||
<h4 class="modal-title">Surface Dynamics 2018 Workshop Registration</h4>
|
||||
</div>
|
||||
<div class="modal-body">
|
||||
<div class="alert">
|
||||
|
@ -1,7 +1,7 @@
|
||||
<div class="row">
|
||||
<div class="col-xs-12">
|
||||
<div class="thumbnail">
|
||||
<a href="img/Workshop-GGD2018-afiche.pdf" target="_blank">
|
||||
<a href="img/afiche.png" target="_blank">
|
||||
<img id="afiche2" class="img-responsive" src="img/afiche.png" alt="Surface Workshop 2018 Poster"/>
|
||||
</a>
|
||||
<!--<div class="caption text-center">
|
||||
|