· 6 years ago · Sep 23, 2019, 01:30 PM
1<script src="https://www.google.com/recaptcha/api.js?render=6LcBL5EUAAAAAKKLxKv5TqabzaUikzRsZsYG1kNH"></script>
2<?php
3
4 function getCaptcha($token)
5 {
6 if($_POST)
7 {
8 $secretKey = "6LewB5MUAAAAABuZLvk9rgDy6EBS3buWIc7lPLOq";
9 $Response = file_get_contents("https://www.google.com/recaptcha/api/siteverify?secret=".$secretKey."&response=".$token);
10 $jsondecode = json_decode($Response);
11 return $jsondecode;
12 }
13 }
14
15
16
17 if($_POST)
18 {
19 $return = getCaptcha($_POST["g-recaptcha-response"]);
20
21 if($return->success == 0 || $return->success == null)
22 {
23
24 $error_recaptcha = true;
25 $error_recaptcha_message = pll__("message_recaptcha_non_valide");
26 // Ajouter les actions
27
28 }
29 else
30 {
31
32 $error_recaptcha = false;
33
34 // Ajouter les actions
35
36 }
37 }
38
39
40
41 /**
42 * Creates a token usable in a form
43 * @return string
44 */
45 function getToken(){
46 $token = sha1(mt_rand());
47 if(!isset($_SESSION['tokens'])){
48 $_SESSION['tokens'] = array($token => 1);
49 }
50 else{
51 $_SESSION['tokens'][$token] = 1;
52 }
53 return $token;
54 }
55 $token = getToken();
56
57 /**
58 * Check if a token is valid. Removes it from the valid tokens list
59 * @param string $token The token
60 * @return bool
61 */
62 function isTokenValid($token){
63 if(!empty($_SESSION['tokens'][$token])){
64 unset($_SESSION['tokens'][$token]);
65 return true;
66 }
67 return false;
68 }
69
70 // VARS
71 $err_number = 0;
72 $error_message = "";
73 $active_success_span = false;
74
75 // TMP file
76 // LOCAL
77 // $uploaddir = test_input('/Applications/MAMP/tmp/php/');
78 // PROD/PREPROD
79 $uploaddir = test_input('/tmp/');
80
81 $civilite__c = $nom__c = $prenom__c = $numero_rue__c = $codepostal__c = $ville__c = $pays__c = $suppliedemail = $suppliedphone = $pnr_code__c = $vehicle_number__c = $datedepart__c = $nombredepassagers__c = $villededpart__c = $villedarrive__c = $pjbilletaller = $pjbilletretour = $description = $pjautresdocs = $billetreservesurthello = $paiementparpaypal__c = $adresse_email_paypal__c = $paiement_virement_bancaire__c = $pjrib = $iban_aba__c = $swift_bic__c = $nomadressebanque__c = $numerodecompte__c = $nom_prenom_adresse_titulaire__c = $type = $origin = '';
82
83 // Check if a form has been sent
84 $postedToken = filter_input(INPUT_POST, 'token');
85 if(!empty($postedToken) && !isset($error_recaptcha_message)){
86
87 if(isTokenValid($postedToken)){
88
89 if( isset($_POST) && sizeof($_POST) != 0 ){
90
91
92
93 if ($_SERVER["REQUEST_METHOD"] == "POST"){
94 if (empty($_POST['civilite__c'])){
95 $err_number++;
96 } else {
97 if($_POST['civilite__c'] == 'Madame'){
98 $civilite__c = 'Madame';
99 } elseif($_POST['civilite__c'] == 'Monsieur') {
100 $civilite__c = 'Monsieur';
101 } else {
102 $err_number++;
103 }
104 }
105 if (empty($_POST['nom__c'])){
106 $err_number++;
107 } else {
108 $nom__c = test_input($_POST['nom__c']);
109 }
110
111
112 if (empty($_POST['objet__c'])){
113 $err_number++;
114 } else {
115 $objet__c = test_input($_POST['objet__c']);
116 }
117 if (empty($_POST['prenom__c'])){
118 $err_number++;
119 } else {
120 $prenom__c = test_input($_POST['prenom__c']);
121 }
122 if (empty($_POST['numero_rue__c'])){
123 $numero_rue__c = '';
124 } else {
125 $numero_rue__c = test_input($_POST['numero_rue__c']);
126 }
127
128 if (empty($_POST['numro_bsb__c'])){
129 $numro_bsb__c = '';
130 } else {
131 $numro_bsb__c = test_input($_POST['numro_bsb__c']);
132 }
133 if (empty($_POST['codepostal__c'])){
134 $codepostal__c = '';
135 } else {
136 $codepostal__c = test_input($_POST['codepostal__c']);
137 }
138 if (empty($_POST['ville__c'])){
139 $ville__c = '';
140 } else {
141 $ville__c = test_input($_POST['ville__c']);
142 }
143 if (empty($_POST['pays__c'])){
144 $pays__c = '';
145 } else {
146 $pays__c = test_input($_POST['pays__c']);
147 }
148 if (empty($_POST['suppliedemail'])){
149 $err_number++;
150 } else {
151 $suppliedemail = test_input($_POST['suppliedemail']);
152 $suppliedemail = filter_var($suppliedemail, FILTER_SANITIZE_EMAIL);
153 if(!filter_var($suppliedemail, FILTER_VALIDATE_EMAIL)){
154 $err_number++;
155 $error_message .= '<span>' . pll__("L'email renseigné n'est pas valide") . '</span>';
156 }
157 }
158 if (empty($_POST['suppliedphone'])){
159 $suppliedphone = '';
160 } else {
161 $suppliedphone = test_input($_POST['suppliedphone']);
162 }
163 if (empty($_POST['pnr_code__c'])){
164 $err_number++;
165 } else {
166 $pnr_code__c = test_input($_POST['pnr_code__c']);
167 }
168 if (empty($_POST['vehicle_number__c'])){
169 $vehicle_number__c = '';
170 } else {
171 $vehicle_number__c = test_input($_POST['vehicle_number__c']);
172 }
173 if (empty($_POST['datedepart__c'])){
174 $err_number++;
175 } else {
176 $datedepart__c = test_input($_POST['datedepart__c']);
177 }
178 if (empty($_POST['nombredepassagers__c'])){
179 $err_number++;
180 } else {
181 $nombredepassagers__c = test_input($_POST['nombredepassagers__c']);
182 }
183 if (empty($_POST['villededpart__c'])){
184 $villededpart__c = '';
185 } else {
186 $villededpart__c = test_input($_POST['villededpart__c']);
187 }
188 if (empty($_POST['villedarrive__c'])){
189 $villedarrive__c = '';
190 } else {
191 $villedarrive__c = test_input($_POST['villedarrive__c']);
192 }
193 if (isset($_FILES['pjbilletaller']) && basename($_FILES['pjbilletaller']['name']) !== ''){
194 $pjbilletaller_send = true;
195 $pjbilletaller_name = test_input(basename($_FILES['pjbilletaller']['name']));
196 $uploadfile_pjbilletaller = test_input($uploaddir . basename($_FILES['pjbilletaller']['tmp_name']));
197 } else {
198 $pjbilletaller_send = false;
199 }
200 if (isset($_FILES['pjbilletretour']) && basename($_FILES['pjbilletretour']['name']) !== ''){
201 $pjbilletretour_send = true;
202 $pjbilletretour_name = test_input(basename($_FILES['pjbilletretour']['name']));
203 $uploadfile_pjbilletretour = test_input($uploaddir . basename($_FILES['pjbilletretour']['tmp_name']));
204 } else {
205 $pjbilletretour_send = false;
206 }
207 if (empty($_POST['description'])){
208 $err_number++;
209 } else {
210 $description = test_input($_POST['description']);
211 }
212 if (isset($_FILES['pjautresdocs']) && basename($_FILES['pjautresdocs']['name']) !== ''){
213 $pjautresdocs_send = true;
214 $pjautresdocs_name = test_input(basename($_FILES['pjautresdocs']['name']));
215 $uploadfile_pjautresdocs = test_input($uploaddir . basename($_FILES['pjautresdocs']['tmp_name']));
216 } else {
217 $pjautresdocs_send = false;
218 }
219 if ($_POST['billetreservesurthello'] == 'Oui'){
220 $billetreservesurthello = 1;
221 } else {
222 $billetreservesurthello = 0;
223 }
224 if (!isset($_POST['paiementparpaypal__c']) || ( isset($_POST['paiementparpaypal__c']) && $_POST['paiementparpaypal__c'] != 'paypal' ) ){
225 $paiementparpaypal__c = false;
226 } elseif( isset($_POST['paiementparpaypal__c']) && $_POST['paiementparpaypal__c'] == 'paypal' ){
227 $paiementparpaypal__c = true;
228 } else {
229 // $paiementparpaypal__c = test_input($_POST['paiementparpaypal__c']);
230 $paiementparpaypal__c = false;
231 }
232 if (!isset($_POST['adresse_email_paypal__c'])){
233 $adresse_email_paypal__c = false;
234 } else {
235 $adresse_email_paypal__c = test_input($_POST['adresse_email_paypal__c']);
236 }
237 if (!isset($_POST['paiement_virement_bancaire__c']) || ( isset($_POST['paiement_virement_bancaire__c']) && $_POST['paiement_virement_bancaire__c'] != true ) ){
238 $paiement_virement_bancaire__c = false;
239 } elseif(isset($_POST['paiement_virement_bancaire__c']) && $_POST['paiement_virement_bancaire__c'] == true ){
240 $paiement_virement_bancaire__c = true;
241 } else {
242 $paiement_virement_bancaire__c = 1;
243 }
244 if (isset($_FILES['pjrib']) && basename($_FILES['pjrib']['name']) !== ''){
245 $pjrib_send = true;
246 $pjrib_name = test_input(basename($_FILES['pjrib']['name']));
247 $uploadfile_pjrib = test_input($uploaddir . basename($_FILES['pjrib']['tmp_name']));
248 } else {
249 $pjrib_send = false;
250 }
251 if (!isset($_POST['iban_aba__c'])){
252 $iban_aba__c = '';
253 } else {
254 $iban_aba__c = test_input($_POST['iban_aba__c']);
255 }
256 if (!isset($_POST['swift_bic__c'])){
257 $swift_bic__c = '';
258 } else {
259 $swift_bic__c = test_input($_POST['swift_bic__c']);
260 }
261 if (!isset($_POST['nomadressebanque__c'])){
262 $nomadressebanque__c = '';
263 } else {
264 $nomadressebanque__c = test_input($_POST['nomadressebanque__c']);
265 }
266 if (!isset($_POST['numerodecompte__c'])){
267 $numerodecompte__c = '';
268 } elseif (isset($_POST['numerodecompte__c']) && !empty($_POST['numerodecompte__c'])) {
269 $numerodecompte__c = test_input($_POST['numerodecompte__c']);
270 } else {
271 $numerodecompte__c = '';
272 }
273 if (!isset($_POST['nom_prenom_adresse_titulaire__c'])){
274 $nom_prenom_adresse_titulaire__c = '';
275 } else {
276 $nom_prenom_adresse_titulaire__c = test_input($_POST['nom_prenom_adresse_titulaire__c']);
277 }
278 if (empty($_POST['accept'])){
279 $err_number++;
280 } else {
281 $accept = test_input($_POST['accept']);
282 }
283
284 }
285
286
287 try {
288
289 // POUR DEBUG (valeurs post)
290 // echo '<pre>';
291 // print_r($_POST);
292 // echo '</pre>';
293
294 // SOAP API CONNECTION
295 $records = array();
296 // PRE PROD
297 define("USERNAME", 'idriss.birem@thello.com.thello.project');
298 // PROD
299
300 // define("USERNAME", 'idriss.birem@thello.com.thello');
301 // PRE PROD
302 define("PASSWORD", '$Mike5sh4M$MYeezQbQ51UfSDAxmtlCxgVW');
303 // PROD
304 // define("PASSWORD", 'SF2017Thel!zkRJxuO4FV7w2SOYNhTMXVfr6');
305
306 //preprod token
307
308 //prod token
309 require_once WP_CONTENT_DIR . '/../sf_api/soapclient/SforcePartnerClient.php';
310
311 // 1 : Connexion a l'API
312 $mySforceConnection = new SforcePartnerClient();
313 // PREPROD
314
315 $mySforceConnection->createConnection('http://127.0.0.1/thello/sf_api/wsdl.xml');
316 // PROD
317 // $mySforceConnection->createConnection('/srv/www/sites/creano/thello.com/sf_api/wsdl.xml');
318
319
320 // PREPROD OLD
321 // $mySforceConnection->setEndpoint('https://test.salesforce.com/services/Soap/u/35.0');
322
323 // PREPROD
324 $mySforceConnection->setEndpoint('https://test.salesforce.com/services/Soap/u/45.0');
325
326 // PROD
327 // $mySforceConnection->setEndpoint('https://login.salesforce.com/services/Soap/u/35.0');
328
329 } catch (Exception $e)
330 {
331
332 $error_message = pll__("Votre message n'a pas pu être envoyé, veuillez réessayer plus tard.");
333
334 global $wpdb;
335 $reclamations_table_name = $wpdb->prefix . 'reclamations';
336
337 $data = array(
338 'logs' => 'Erreur : ' . $e->getMessage(),
339 'name' => $prenom__c . ' ' . $nom__c,
340 'description' => $description,
341 'tel' => $suppliedphone,
342 'mail' => $suppliedemail,
343 'pnr' => $pnr_code__c,
344 'time' => current_time('mysql'),
345 'web_langue' => strtoupper(pll_current_language()),
346 );
347
348 $wpdb->insert(
349 $reclamations_table_name,
350 $data
351 );
352
353 }
354
355
356
357
358
359
360 if ($err_number == 0 && empty($error_message)) {
361 try{
362 $mySforceConnection->login(USERNAME, PASSWORD);
363 //connection.setAllOrNoneHeader(false);
364
365 // Add mail soap header to send confirmation mail
366 $header = new EmailHeader(true, false, false);
367 $mySforceConnection->setEmailHeader($header);
368
369
370 if ($pjbilletaller_send == true) {
371 // BILLET ALLER
372 $attached_file_content = file_get_contents($uploadfile_pjbilletaller);
373 $billetAllerAttachment = array();
374 $billetAllerAttachment[0] = new SObject();
375 $billetAllerAttachment[0]->type = 'ContentVersion';
376 $billetAllerAttachment[0]->fields = array(
377 'Title' => $pjbilletaller_name,
378 'PathOnClient' => $pjbilletaller_name,
379 'VersionData' => base64_encode($attached_file_content)
380 );
381
382 // Content version creation
383 $response_billetaller = $mySforceConnection->create($billetAllerAttachment);
384 $billetAllerQueryContentVersion = $mySforceConnection->query("SELECT ContentDocumentId FROM ContentVersion WHERE Id = '" . $response_billetaller[0]->id."'");
385
386 var_dump($billetAllerQueryContentVersion);
387 $billetAllerContentDocumentId = $billetAllerQueryContentVersion->records[0]->any;
388
389
390 }
391
392
393 // WEB 2 CASE
394 $records = array();
395
396 $records[0] = new SObject();
397 $records[0]->type = 'Case';
398 // $records[0]->Origin = 'FormulaireWeb';
399 // $records[0]->RecordtypeID = '0124E000000cqQlQAI';
400 $records[0]->fields = array(
401 'Origin' => 'FormulaireWeb',
402 'RecordtypeID' => '0124E000000cqQlQAI',
403 'Web_langue__c' => strtoupper(pll_current_language()),
404 'SuppliedEmail' => $suppliedemail,
405 'Objet__c' => $objet__c, // Réclamation ou Annulation
406 'Description' => $description,
407 'WebCivilite__c' => $civilite__c,
408 'Nom__c' => $nom__c,
409 'Prenom__c' => $prenom__c,
410 'Numero_rue__c' => $numero_rue__c,
411 'CodePostal__c' => $codepostal__c,
412 'Ville__c' => $ville__c,
413 'SuppliedPhone' => $suppliedphone,
414 'Pays__c' => $pays__c,
415 'Vehicle_number__c' => $vehicle_number__c,
416 'Datedepart__c' => $datedepart__c,
417 'Nombredepassagers__c' => $nombredepassagers__c,
418 'BilletreservesurThello__c' => $billetreservesurthello,
419 'Villededpart__c' => $villededpart__c,
420 'Villedarrive__c' => $villedarrive__c,
421 'PNR_Code__c' => $pnr_code__c);
422
423 if ($paiementparpaypal__c == true){
424 $records[0]->fields += array(
425 'PaiementparPaypal__c' => true,
426 'Adresse_email_Paypal__c' => $adresse_email_paypal__c
427 );
428 }
429
430
431
432 if ($paiement_virement_bancaire__c == true && ($pays__c != "New Zealand" || $pays__c != "
433 Nuova Zelanda" || $pays__c != "Nouvelle-Zélande" || $pays__c != "Australie" || $pays__c != "Australia")){
434 $records[0]->fields += array(
435 'Paiement_virement_bancaire__c' => true,
436 'IBAN_ABA__c' => $iban_aba__c,
437 'Swift_BIC__c' => $swift_bic__c,
438 'Nomadressebanque__c' => $nomadressebanque__c,
439 'Numerodecompte__c' => $numerodecompte__c,
440 'Nom_prenom_adresse_titulaire__c' => $nom_prenom_adresse_titulaire__c
441 );
442 }
443
444 if ($paiement_virement_bancaire__c == true && ($pays__c == "New Zealand" || $pays__c == "
445 Nuova Zelanda" || $pays__c == "Nouvelle-Zélande" || $pays__c == "Australie" || $pays__c == "Australia")){
446 $records[0]->fields += array(
447 'Paiement_virement_bancaire__c' => true,
448 'Num_ro_BSB__c' => $numro_bsb__c,
449 'Swift_BIC__c' => $swift_bic__c,
450 'Nomadressebanque__c' => $nomadressebanque__c,
451 'Numerodecompte__c' => $numerodecompte__c,
452 'Nom_prenom_adresse_titulaire__c' => $nom_prenom_adresse_titulaire__c
453 );
454 }
455
456
457
458 // Case creation
459 $response = $mySforceConnection->create($records);
460
461 // POUR DEBUG (retour api)
462 // echo '<pre class="api">';
463 // print_r($response);
464 // echo '</pre>';
465
466 global $wpdb;
467 $reclamations_table_name = $wpdb->prefix . 'reclamations';
468 if(isset($response[0]->success) && !empty($response[0]->success) && isset($response[0]->id) && !empty($response[0]->id)){
469 $log = ' ID : ' . $response[0]->id . ' => ' . $response[0]->success;
470 } elseif(isset($response[0]) && is_object($response[0])) {
471 $log = serialize($response[0]);
472 } else {
473 $log = serialize($response);
474 }
475
476 $data = array(
477 'logs' => $log,
478 'name' => $prenom__c . ' ' . $nom__c,
479 'description' => $description,
480 'tel' => $suppliedphone,
481 'mail' => $suppliedemail,
482 'pnr' => $pnr_code__c,
483 'time' => current_time('mysql'),
484 'web_langue' => strtoupper(pll_current_language()),
485 );
486
487 $wpdb->insert(
488 $reclamations_table_name,
489 $data
490 );
491
492 if ($pjbilletaller_send == true) {
493 $billetAllerLink = array();
494 $billetAllerLink[0] = new Sobject();
495 $billetAllerLink[0]->type = 'ContentDocumentLink';
496 $billetAllerLink[0]->fields = array(
497 'ContentDocumentId' => $billetAllerContentDocumentId,
498 'LinkedEntityId' => $response[0]->id,
499 'ShareType' => "V",
500 'Visibility' => "AllUsers"
501 );
502
503 // Link creation
504 $response_billetAllerLink = $mySforceConnection->create($billetAllerLink);
505
506 }
507
508 $active_success_span = true;
509 unset($_POST);
510 // echo 'Votre réclamation a bien été enregistrée.';
511 }
512
513 catch (Exception $e){
514 // echo "<br/><br/> Erreur trouvée ! " . $e->getMessage();
515 $error_message = pll__("Votre message n'a pas pu être envoyé, veuillez réessayer plus tard.");
516
517 global $wpdb;
518 $reclamations_table_name = $wpdb->prefix . 'reclamations';
519
520 $data = array(
521 'logs' => 'Erreur : ' . $e->getMessage(),
522 'name' => $prenom__c . ' ' . $nom__c,
523 'description' => $description,
524 'tel' => $suppliedphone,
525 'mail' => $suppliedemail,
526 'pnr' => $pnr_code__c,
527 'time' => current_time('mysql'),
528 'web_langue' => strtoupper(pll_current_language()),
529 );
530
531 $wpdb->insert(
532 $reclamations_table_name,
533 $data
534 );
535 }
536
537
538 $_POST = array();
539 }
540 elseif(isset($error_recaptcha_message))
541 {
542 $error_recaptcha_message = pll__("message_recaptcha_non_valide");
543 }
544 else
545 {
546 $error_message = empty($error_message) ? '<span>' . pll_e('form reclamation message erreur') . '</span>' : $error_message;
547 // echo 'Il y a ' . $err_number . ' erreur(s).';
548 }
549 }
550
551 } // endif isTokenValid
552 } // endif !empty($postedToken)
553
554 if($err_number == 0){
555 $_POST = array();
556 }
557?>
558
559 <section class="form--supercont form--validata">
560 <div class="form--supercont-inner">
561
562 <form
563 id="form-reclamation"
564 action="<?php echo htmlspecialchars(get_the_permalink() . '#form-reclamation'); ?>"
565 method="post"
566 enctype="multipart/form-data"
567 class="form form--reclamation"
568 data-error-message="<?php pll_e('Formulaire simple texte validation'); ?>">
569
570 <fieldset class="form--group-container">
571 <legend class="form--title"><?php pll_e('form contact Title votre message'); ?></legend>
572 <div class="clearfix">
573 <div class="form--w50">
574 <div class="form--label-title"><?php pll_e('form contact label Objet'); ?></div>
575 <select id="subject" name="subject" data-jcf='{"wrapNative": false, "wrapNativeOnMobile": true, "useCustomScroll": true}' required>
576 <option value=""><?php pll_e('form contact Select option default'); ?></option>
577 <option value="<?php pll_e('form contact Select option Assistance'); ?>"><?php pll_e('form contact Select option Assistance'); ?></option>
578 <option value="Réclamation"><?php pll_e('form contact Select option Reclamation'); ?></option>
579 <option value="Annulation"><?php pll_e('form contact Select option Annulation'); ?></option>
580 <option value="<?php pll_e('form contact Select option Reservation simple'); ?>"><?php pll_e('form contact Select option Reservation simple'); ?></option>
581 <option value="<?php pll_e('form contact Select option Reservation de groupe'); ?>"><?php pll_e('form contact Select option Reservation de groupe'); ?></option>
582 <option value="<?php pll_e('form contact Select option Informations'); ?>"><?php pll_e('form contact Select option Informations'); ?></option>
583 <option value="<?php pll_e('form contact Select mon billet'); ?>"><?php pll_e('form contact Select mon billet'); ?></option>
584 <option value="<?php pll_e('form contact Select option Objets perdus'); ?>"><?php pll_e('form contact Select option Objets perdus'); ?></option>
585 <option value="<?php pll_e('form contact Select option donnees personnelles'); ?>"><?php pll_e('form contact Select option donnees personnelles'); ?></option>
586 </select>
587 </div>
588 </div>
589 </fieldset>
590
591
592 <fieldset class="form--group-container">
593 <legend class="form--title"><?php pll_e('form reclamation titre infos perso'); ?></legend>
594 <div class="error-message"><span></span></div>
595
596 <?php if (!empty($error_message)) { ?>
597
598 <div class="show error-message-back">
599 <?= $error_message ?>
600 </div>
601
602 <?php } ?>
603
604 <?php if ($active_success_span == true) { ?>
605 <div class="show success-message-back"><span><?php pll_e('form reclamation message succes'); ?></span></div>
606 <?php } ?>
607 <!-- <div class="success-message-back"><span>Votre réclamation a bien été enregistrée.</span></div> -->
608
609
610 <div class="clearfix">
611 <div class="form--w50">
612 <div class="form--label-title"><?php pll_e('form reclamation label Civilite'); ?></div>
613 <input type="radio" name="civilite__c" value="Madame" id="mme" checked required <?php if(isset($_POST['civilite__c']) && $_POST['civilite__c'] == 'Madame'){ echo 'checked="checked"';} ?> />
614 <label for="mme"><?php pll_e('form reclamation label Madame'); ?></label>
615 <input type="radio" name="civilite__c" value="Monsieur" id="mr" required <?php if(isset($_POST['civilite__c']) && $_POST['civilite__c'] == 'Monsieur'){ echo 'checked="checked"';} ?> />
616 <label for="mr"><?php pll_e('form reclamation label Monsieur'); ?></label>
617 </div>
618 <div class="form--w50">
619 <div class="form--label-title"><?php pll_e('form reclamation label Nom'); ?></div>
620 <input type="text" name="nom__c" maxlength="30" placeholder="" value="<?php if(isset($_POST['nom__c'])){ echo $_POST['nom__c'];} ?>" required />
621 </div>
622 </div>
623
624 <div class="clearfix">
625 <div class="form--w50">
626 <div class="form--label-title"><?php pll_e('form reclamation label Prenom'); ?></div>
627 <input type="text" name="prenom__c" maxlength="30" placeholder="" value="<?php if(isset($_POST['prenom__c'])){ echo $_POST['prenom__c'];} ?>" required />
628 </div>
629 <div class="form--w50">
630 <div class="form--label-title"><?php pll_e('form reclamation label Numero de rue'); ?></div>
631 <input type="text" name="numero_rue__c" maxlength="80" placeholder="" value="<?php if(isset($_POST['numero_rue__c'])){ echo $_POST['villededpart__c'];} ?>" />
632 </div>
633 </div>
634
635 <div class="clearfix">
636 <div class="form--w50">
637 <div class="form--label-title"><?php pll_e('form reclamation label Code postal'); ?></div>
638 <input type="text" name="codepostal__c" maxlength="10" placeholder="" value="<?php if(isset($_POST['codepostal__c'])){ echo $_POST['codepostal__c'];} ?>" />
639 </div>
640 <div class="form--w50">
641 <div class="form--label-title"><?php pll_e('form reclamation label Ville'); ?></div>
642 <input type="text" name="ville__c" maxlength="30" placeholder="" value="<?php if(isset($_POST['ville__c'])){ echo $_POST['ville__c'];} ?>" />
643 </div>
644 </div>
645
646 <div class="clearfix">
647 <div class="form--w100">
648 <div class="form--label-title"><?php pll_e('form reclamation label Pays'); ?></div>
649 <div class="form--select">
650 <select name="pays__c" id="pays" data-jcf='{"wrapNative": false, "wrapNativeOnMobile": true, "useCustomScroll": true}'>
651 <option><?php pll_e('form reclamation label Pays'); ?></option>
652 <?php
653 if (isset($_POST['pays__c']) && !empty($_POST['pays__c'])){
654 echo '<option selected>' . $_POST['pays__c'] . '</option>';
655 }
656 ?>
657 </select>
658 </div>
659 </div>
660 </div>
661
662 <div class="clearfix">
663 <div class="form--w50">
664 <div class="form--label-title"><?php pll_e('form reclamation label Adresse email'); ?></div>
665 <input type="email" name="suppliedemail" maxlength="80" placeholder="" value="<?php if(isset($_POST['suppliedemail'])){ echo $_POST['suppliedemail'];} ?>" required />
666 </div>
667 <div class="form--w50">
668 <div class="form--label-title"><?php pll_e('form reclamation label Telephone'); ?></div>
669 <input type="tel" name="suppliedphone" maxlength="16" placeholder="" value="<?php if(isset($_POST['suppliedphone'])){ echo $_POST['suppliedphone'];} ?>" />
670 </div>
671 </div>
672 </fieldset>
673
674 <fieldset class="form--group-container">
675 <legend class="form--title">
676 <?php pll_e('form reclamation titre details voyage'); ?>
677 </legend>
678
679 <div class="clearfix">
680 <div class="form--w50">
681 <div class="form--label-title">
682 <?php pll_e('form reclamation label PNR'); ?>
683 </div>
684 <input type="text" name="pnr_code__c" maxlength="6" placeholder="" value="<?php if(isset($_POST['pnr_code__c'])){ echo $_POST['pnr_code__c'];} ?>" required />
685 <div class="form--info txt_right">
686 <?php pll_e('form reclamation label PNR mention'); ?>
687 </div>
688 </div>
689 <div class="form--w50">
690 <div class="form--label-title">
691 <?php pll_e('form reclamation label Numero train'); ?>
692 </div>
693 <input type="number" name="vehicle_number__c" maxlength="10" placeholder="" required value="<?php if(isset($_POST['vehicle_number__c'])){ echo $_POST['vehicle_number__c'];} ?>" />
694 </div>
695 </div>
696
697 <div class="clearfix">
698 <div class="form--w50">
699 <div class="form--label-title">
700 <?php pll_e('form reclamation label Date depart'); ?>
701 </div>
702 <div class="form--datepicker">
703 <?php if ( pll_current_language() == 'en' ): ?>
704 <input type="text" name="datedepart__c" class="form--datepicker-input datepicker--toformat" placeholder="<?php pll_e('Date aller'); ?>" value="<?php if(isset($_POST['datedepart__cVisible']) && !empty($_POST['datedepart__cVisible']) ){ echo $_POST['datedepart__cVisible']; } ?>" data-date-format="mm/dd/yyyy" required />
705 <?php else: ?>
706 <input type="text" name="datedepart__c" class="form--datepicker-input datepicker--toformat" placeholder="<?php pll_e('Date aller'); ?>" value="<?php if(isset($_POST['datedepart__cVisible']) && !empty($_POST['datedepart__cVisible']) ){ echo $_POST['datedepart__cVisible']; } ?>" data-date-format="dd/mm/yyyy" required />
707 <?php endif; ?>
708 </div>
709 </div>
710 <div class="form--w50">
711 <div class="form--label-title">
712 <?php pll_e('form reclamation label Nombre passagers'); ?>
713 </div>
714 <input type="number" min="1" name="nombredepassagers__c" maxlength="4" placeholder="" value="<?php if(isset($_POST['nombredepassagers__c'])){ echo $_POST['nombredepassagers__c'];} ?>" required />
715 </div>
716 </div>
717
718 <div class="clearfix">
719 <div class="form--w50">
720 <div class="form--label-title">
721 <?php pll_e('form reclamation label Ville depart'); ?>
722 </div>
723 <div class="form--select">
724 <select class="city-departure" data-jcf='{"wrapNative": false, "wrapNativeOnMobile": true, "useCustomScroll": true}' name="villededpart__c" id="departureStationText" required>
725 <option value=""><?php pll_e('De'); ?></option>
726 <optgroup label="<?php pll_e('France'); ?>">
727
728 <?php
729 $loop = new WP_Query( array( 'post_type' => 'gare', 'ignore_sticky_posts' => 1, 'showposts' => -1, 'orderby'=> 'title', 'order' => 'ASC' ) );
730 if ( $loop->have_posts() ) :
731 while ( $loop->have_posts() ) : $loop->the_post();
732
733 // Trie par pays de la gare
734 $gare_country = carbon_get_the_post_meta('gare_country');
735
736 if ( $gare_country == 'fr' ){
737
738 // VARS
739 $gare_trajet = carbon_get_the_post_meta('gare_trajet');
740 $gare_th = get_the_title();
741
742 // Nom selon langue du site
743 if ( pll_current_language() == 'fr' ){
744 $gare_name = carbon_get_the_post_meta('gare_fr');
745 } elseif ( pll_current_language() == 'en' ){
746 $gare_name = carbon_get_the_post_meta('gare_en');
747 } elseif ( pll_current_language() == 'it' ){
748 $gare_name = carbon_get_the_post_meta('gare_it');
749 }
750 ?>
751
752 <option <?php if(isset($_POST['villededpart__c']) && $gare_th == $_POST['villededpart__c']){ echo 'selected'; } ?> trajet="<?= $gare_trajet; ?>" value="<?= $gare_th; ?>"><?= $gare_name; ?></option>
753
754 <?php
755 } // endif
756
757 endwhile;
758 endif;
759 wp_reset_postdata();
760 ?>
761
762 </optgroup>
763 <optgroup label="<?php pll_e('Italie'); ?>">
764
765 <?php
766 $loop = new WP_Query( array( 'post_type' => 'gare', 'ignore_sticky_posts' => 1, 'showposts' => -1, 'orderby'=> 'title', 'order' => 'ASC' ) );
767 if ( $loop->have_posts() ) :
768 while ( $loop->have_posts() ) : $loop->the_post();
769
770 // Trie par pays de la gare
771 $gare_country = carbon_get_the_post_meta('gare_country');
772
773 if ( $gare_country == 'it' ){
774
775 // VARS
776 $gare_trajet = carbon_get_the_post_meta('gare_trajet');
777 $gare_th = get_the_title();
778
779 // Nom selon langue du site
780 if ( pll_current_language() == 'fr' ){
781 $gare_name = carbon_get_the_post_meta('gare_fr');
782 } elseif ( pll_current_language() == 'en' ){
783 $gare_name = carbon_get_the_post_meta('gare_en');
784 } elseif ( pll_current_language() == 'it' ){
785 $gare_name = carbon_get_the_post_meta('gare_it');
786 }
787 ?>
788
789 <option <?php if(isset($_POST['villededpart__c']) && $gare_th == $_POST['villededpart__c']){ echo 'selected'; } ?> trajet="<?= $gare_trajet; ?>" value="<?= $gare_th; ?>"><?= $gare_name; ?></option>
790
791 <?php
792 } // endif
793
794 endwhile;
795 endif;
796 wp_reset_postdata();
797 ?>
798 </optgroup>
799 </select>
800 </div>
801 </div>
802 <div class="form--w50">
803 <div class="form--select">
804 <div class="form--label-title">
805 <?php pll_e('form reclamation label Ville arrivee'); ?>
806 </div>
807 <select class="city-arrival" data-jcf='{"wrapNative": false, "wrapNativeOnMobile": true, "useCustomScroll": true}' name="villedarrive__c" id="arrivalStationText" required>
808 <option value=""><?php pll_e('A'); ?></option>
809 <optgroup label="<?php pll_e('France'); ?>">
810
811 <?php
812 $loop = new WP_Query( array( 'post_type' => 'gare', 'ignore_sticky_posts' => 1, 'showposts' => -1, 'orderby'=> 'title', 'order' => 'ASC' ) );
813 if ( $loop->have_posts() ) :
814 while ( $loop->have_posts() ) : $loop->the_post();
815
816 // Trie par pays de la gare
817 $gare_country = carbon_get_the_post_meta('gare_country');
818
819 if ( $gare_country == 'fr' ){
820
821 // VARS
822 $gare_trajet = carbon_get_the_post_meta('gare_trajet');
823 $gare_th = get_the_title();
824
825 // Nom selon langue du site
826 if ( pll_current_language() == 'fr' ){
827 $gare_name = carbon_get_the_post_meta('gare_fr');
828 } elseif ( pll_current_language() == 'en' ){
829 $gare_name = carbon_get_the_post_meta('gare_en');
830 } elseif ( pll_current_language() == 'it' ){
831 $gare_name = carbon_get_the_post_meta('gare_it');
832 }
833 ?>
834
835 <option <?php if(isset($_POST['villedarrive__c']) && $gare_th == $_POST['villedarrive__c']){ echo 'selected'; } ?> trajet="<?= $gare_trajet; ?>" value="<?= $gare_th; ?>"><?= $gare_name; ?></option>
836
837 <?php
838 } // endif
839
840 endwhile;
841 endif;
842 wp_reset_postdata();
843 ?>
844
845 </optgroup>
846 <optgroup label="<?php pll_e('Italie'); ?>">
847
848 <?php
849 $loop = new WP_Query( array( 'post_type' => 'gare', 'ignore_sticky_posts' => 1, 'showposts' => -1, 'orderby'=> 'title', 'order' => 'ASC' ) );
850 if ( $loop->have_posts() ) :
851 while ( $loop->have_posts() ) : $loop->the_post();
852
853 // Trie par pays de la gare
854 $gare_country = carbon_get_the_post_meta('gare_country');
855
856 if ( $gare_country == 'it' ){
857
858 // VARS
859 $gare_trajet = carbon_get_the_post_meta('gare_trajet');
860 $gare_th = get_the_title();
861
862 // Nom selon langue du site
863 if ( pll_current_language() == 'fr' ){
864 $gare_name = carbon_get_the_post_meta('gare_fr');
865 } elseif ( pll_current_language() == 'en' ){
866 $gare_name = carbon_get_the_post_meta('gare_en');
867 } elseif ( pll_current_language() == 'it' ){
868 $gare_name = carbon_get_the_post_meta('gare_it');
869 }
870 ?>
871
872 <option <?php if(isset($_POST['villedarrive__c']) && $gare_th == $_POST['villedarrive__c']){ echo 'selected'; } ?> trajet="<?= $gare_trajet; ?>" value="<?= $gare_th; ?>"><?= $gare_name; ?></option>
873
874 <?php
875 } // endif
876
877 endwhile;
878 endif;
879 wp_reset_postdata();
880 ?>
881
882 </optgroup>
883 </select>
884 </div>
885 </div>
886 </div>
887
888 <div class="form--spacer"></div>
889
890 <div class="clearfix">
891 <div class="form--w100">
892 <div class="form--label-title">
893 <?php pll_e('form reclamation message reservation'); ?>
894 </div>
895 </div>
896 </div>
897
898 <div class="clearfix">
899 <div class="form--w50">
900 <div class="form--label-title">
901 <?php pll_e('form reclamation Billet aller'); ?>
902 </div>
903 <input type="file" name="pjbilletaller" data-jcf='{"placeholderText": "<?php pll_e('form Choisir fichier'); ?>"}'>
904 <div class="form--info txt_right"><?php pll_e('form reclamation files infos'); ?></div>
905 </div>
906 <div class="form--w50">
907 <div class="form--label-title">
908 <?php pll_e('form reclamation Billet retour'); ?>
909 </div>
910 <div class="form--datepicker">
911 <input type="file" name="pjbilletretour" data-jcf='{"placeholderText": "<?php pll_e('form Choisir fichier'); ?>"}'>
912 <div class="form--info txt_right"><?php pll_e('form reclamation files infos'); ?></div>
913 </div>
914 </div>
915 </div>
916
917 <div class="clearfix">
918 <div class="form--w100">
919 <div class="form--label-title">
920 <?php pll_e('form reclamation titre details reclamation'); ?>
921 </div>
922 <textarea name="description" maxlength="1500" placeholder="" value="" required><?php if(isset($_POST['description'])){ echo $_POST['description'];} ?></textarea>
923 </div>
924 </div>
925
926 <div class="clearfix">
927 <div class="form--w50">
928 <div class="form--label-title">
929 <?php pll_e('form reclamation label Autres documents'); ?>
930 </div>
931 <input type="file" name="pjautresdocs" data-jcf='{"placeholderText": "<?php pll_e('form Choisir fichier'); ?>"}'>
932 <div class="form--info txt_right"><?php pll_e('form reclamation files infos'); ?></div>
933 </div>
934 </div>
935 </fieldset>
936
937 <fieldset class="form--group-container">
938 <legend class="form--title">
939 <?php pll_e('form reclamation titre coordonees bancaires'); ?>
940 </legend>
941
942 <div class="clearfix">
943 <div class="form--w100">
944 <div class="form--label-title">
945 <?php pll_e('form reclamation label reserve votre billet sur Thello'); ?>
946 </div>
947 <input type="radio" name="billetreservesurthello" value="Oui" data-ctrlgroup="billetreserve" class="choix-billet-reserve" id="BilletreservesurThelloOui" required <?php if(isset($_POST['billetreservesurthello']) && $_POST['billetreservesurthello'] == 'Oui'){ echo 'checked';} ?>/>
948 <label for="BilletreservesurThelloOui"><?php pll_e('form reclamation label Oui'); ?></label>
949 <input type="radio" name="billetreservesurthello" value="Non" data-ctrlgroup="billetnonreserve" class="choix-billet-reserve" id="BilletreservesurThelloNon" required <?php if(isset($_POST['billetreservesurthello']) && $_POST['billetreservesurthello'] == 'Non'){ echo 'checked';} ?> />
950 <label for="BilletreservesurThelloNon"><?php pll_e('form reclamation label Non'); ?></label>
951 </div>
952 </div>
953
954 <!-- IF YES THEN DISPLAY::: -->
955 <div class="form--group form--group--conditional form--group--reservedtrain <?php if(isset($_POST['billetreservesurthello']) && $_POST['billetreservesurthello'] == 'Oui'){ echo 'open-pannel';} ?>" data-group="billetreserve">
956 <div class="clearfix">
957 <div class="form--w100">
958 <div class="form--label-title">
959 <?php pll_e('form reclamation Message reserve votre billet sur Thello'); ?>
960 </div>
961 </div>
962 </div>
963 </div>
964
965
966 <!-- IF NO THEN DISPLAY::: -->
967 <div class="form--group form--group--conditional form--group--reservedtrain <?php if(isset($_POST['billetreservesurthello']) && $_POST['billetreservesurthello'] == 'Non'){ echo ' open-pannel';} ?>" data-group="billetnonreserve">
968 <div class="clearfix">
969 <div class="form--w100">
970 <div class="form--label-title">
971 <?php pll_e('form reclamation label vous navez pas reserve votre billet sur Thello'); ?>
972 </div>
973 <input type="checkbox" name="paiementparpaypal__c" value="paypal" id="PaypalOui" class="choix-paiement choix-paiement--paypal conditional-field" data-ctrlgroup="paypal" <?php if(isset($_POST['paiementparpaypal__c']) && $_POST['paiementparpaypal__c'] == 'paypal'){ echo 'checked'; } ?> />
974 <b><label for="PaypalOui"><?php pll_e('form reclamation label Soit via PayPal'); ?></label></b>
975 <span id="paypal-popin-trigger" class="popin-trigger form--label-title">
976 <?php pll_e('form reclamation plus dinfo Paypal'); ?>
977 </span>
978
979 <!-- PAYPAL POPIN -->
980 <div class="popin">
981 <div>
982 <p><?php pll_e('form reclamations popin paypal'); ?></p>
983 <span id="close-popin">✕</span>
984 </div>
985 </div>
986 <!-- /POPIN -->
987
988 </div>
989 </div>
990
991 <div class="form--group form--group--conditional form--group--paymentchoice <?php if(isset($_POST['paiementparpaypal__c']) && $_POST['paiementparpaypal__c'] == 'paypal'){ echo 'open-pannel';} ?>" data-group="paypal">
992 <div class="form--label-title">
993 <?php pll_e('form reclamation Votre adresse email Paypal'); ?>*</div>
994 <div class="clearfix">
995 <div class="form--w50">
996 <input type="email" name="adresse_email_paypal__c" maxlength="80" placeholder="" class="conditional-field" value="<?php if(isset($_POST['adresse_email_paypal__c'])){ echo $_POST['adresse_email_paypal__c'];} ?>" required/>
997 </div>
998 </div>
999 </div>
1000
1001 <div class="clearfix">
1002 <div class="form--w100">
1003 <input type="checkbox" name="paiement_virement_bancaire__c" value="Oui" id="VirementOui" class="choix-paiement choix-paiement--virement conditional-field" data-ctrlgroup="virement" <?php if(isset($_POST['paiement_virement_bancaire__c']) && $_POST['paiement_virement_bancaire__c'] == 'Oui'){ echo 'checked'; } ?> />
1004 <b><label for="VirementOui"><?php pll_e('form reclamation label Soit par virement'); ?></label></b>
1005 </div>
1006 </div>
1007
1008 <div class="form--group form--group--conditional form--group--paymentchoice <?php if(isset($_POST['paiement_virement_bancaire__c']) && $_POST['paiement_virement_bancaire__c'] == 'Oui'){ echo 'open-pannel';} ?>" data-group="virement">
1009
1010 <div class="clearfix">
1011 <div class="form--w100">
1012 <div class="form--label-title"> </div>
1013 <div class="form--label-title">
1014 <?php pll_e('form reclamation label indiquer coordonnees bancaires'); ?>
1015 </div>
1016 </div>
1017 </div>
1018
1019 <div class="clearfix">
1020
1021 <div id="div-iban" class="form--w50">
1022 <div class="form--label-title">
1023 <?php pll_e('form reclamation label IBAN'); ?>
1024 </div>
1025 <input type="text" name="iban_aba__c" maxlength="40" placeholder="" class="conditional-field" value="<?php if(isset($_POST['iban_aba__c'])){ echo $_POST['iban_aba__c']; } ?>"/>
1026 </div>
1027
1028 <div id="div-bsb" class="form--w50" hidden="true">
1029 <div class="form--label-title">
1030 <?php pll_e('form reclamation label BSB'); ?>
1031 </div>
1032 <input type="text" name="numro_bsb__c" maxlength="40" placeholder="" class="conditional-field" value="<?php if(isset($_POST['numro_bsb__c'])){ echo $_POST['numro_bsb__c']; } ?>"/>
1033 </div>
1034
1035 <div class="form--w50">
1036 <div class="form--label-title">
1037 <?php pll_e('form reclamation label SWIFT'); ?>
1038 </div>
1039 <input type="text" name="swift_bic__c" maxlength="15" placeholder="" class="conditional-field" value="<?php if(isset($_POST['swift_bic__c'])){ echo $_POST['swift_bic__c']; } ?>" required />
1040 </div>
1041 </div>
1042
1043 <div class="clearfix">
1044 <div class="form--w100">
1045 <div class="form--label-title">
1046 <?php pll_e('form reclamation label nom adresse banque'); ?>
1047 </div>
1048 <textarea name="nomadressebanque__c" maxlength="120" placeholder="" class="conditional-field" value="" required><?php if(isset($_POST['nomadressebanque__c'])){ echo $_POST['nomadressebanque__c'];} ?></textarea>
1049 </div>
1050 </div>
1051
1052 <div class="clearfix">
1053 <div class="form--w50">
1054 <div class="form--label-title">
1055 <?php pll_e('form reclamation label numero compte'); ?>
1056 </div>
1057 <input type="text" name="numerodecompte__c" maxlength="16" placeholder="" class="conditional-field" value="<?php if(isset($_POST['numerodecompte__c'])){ echo $_POST['numerodecompte__c'];} ?>" required />
1058 </div>
1059 </div>
1060
1061 <div class="clearfix">
1062 <div class="form--w100">
1063 <div class="form--label-title">
1064 <?php pll_e('label nom prenom adresse titulaire'); ?>
1065 </div>
1066 <textarea name="nom_prenom_adresse_titulaire__c" maxlength="150" placeholder="" class="conditional-field" value="" required><?php if(isset($_POST['nom_prenom_adresse_titulaire__c'])){ echo $_POST['nom_prenom_adresse_titulaire__c'];} ?></textarea>
1067 </div>
1068 </div>
1069
1070 <?php
1071 if (pll_current_language() == 'fr'){
1072 ?>
1073 <div class="clearfix">
1074 <div class="form--w50">
1075 <div class="form--label-title">
1076 <?php pll_e('form reclamation label Joindre RIB'); ?>
1077 </div>
1078 <input type="file" name="pjrib" data-jcf='{"placeholderText": "<?php pll_e('form Choisir fichier'); ?>"}' class="conditional-field" />
1079 <div class="form--info txt_right"><?php pll_e('form reclamation files infos'); ?></div>
1080 </div>
1081 </div>
1082 <?php
1083 }
1084 ?>
1085
1086 </div>
1087 </div>
1088 <!-- IF NO END -->
1089
1090 <div class="clearfix">
1091 <div class="form--w100">
1092 <div class="form--label-title"> </div>
1093 <input type="checkbox" id="accept" name="accept" required />
1094 <label title="accept" for="accept"><?php pll_e('form reclamation label acceptation conditions'); ?></label>
1095 </div>
1096 </div>
1097 <div class="error-message"><span></span></div>
1098 <p class="error-recaptcha error-message" style='text-align:center'><?= pll__("message_recaptcha_non_valide") ?></p>
1099
1100 <?php
1101
1102 if(isset($error_recaptcha_message))
1103 {
1104 echo "<p class='error-recaptcha' style='text-align:center'> ".$error_recaptcha_message."</p>";
1105 }
1106
1107
1108 ?>
1109
1110 <div style="text-align:center;"><div id="recaptcha" class="g-recaptcha" data-sitekey="6LewB5MUAAAAAOC7Soc3EyzuQDZFpKJrwzCvDpLh" style="display:inline-block;"></div></div>
1111 <button class="form--submit" id="btn-validate"><?php pll_e('form reclamation bouton validation formulaire'); ?></button>
1112
1113 <input type="hidden" name="subject" value="<?php pll_e('form réclamation objet'); ?>" />
1114 <input type="hidden" name="token" value="<?php echo $token; ?>" />
1115 <?php
1116 /* PREPROD
1117 <input type=hidden name="orgid" value="00D0Y000001fbbU">
1118 <input type=hidden name="retURL" value="http://thello.com" />
1119 <input type="hidden" name="debug" value="1" />
1120 <input type="hidden" name="debugEmail" value="nicolas@creano.paris" />
1121 <input type="hidden" id="external" name="external" value="2" />
1122 */ ?>
1123 <?php /*
1124 <input type="hidden" id="g-recaptcha-response" name="g-recaptcha-response">
1125 <script>
1126 grecaptcha.ready(function() {
1127 grecaptcha.execute('6LcBL5EUAAAAAKKLxKv5TqabzaUikzRsZsYG1kNH', {action: 'homepage'}).then(function(token) {
1128 console.log(token);
1129 document.getElementById('g-recaptcha-response').value = token;
1130 });
1131 });
1132 </script>*/ ?>
1133 </form>
1134
1135
1136 </div>
1137</section>