-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathf4p_form_reservas.php
More file actions
61 lines (59 loc) · 2.28 KB
/
f4p_form_reservas.php
File metadata and controls
61 lines (59 loc) · 2.28 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
<?php
$f4p_form_action = 'http://reservas.hotel-sanlorenzo.com/bookcore/v1/search-dispo.htm';
switch (ICL_LANGUAGE_CODE) {
case "eng":
$f4p_form_action = 'http://booking.hotel-sanlorenzo.com/bookcore/v1/search-dispo.htm';
break;
case "de":
$f4p_form_action = 'http://reservierungen.hotel-sanlorenzo.com/bookcore/v1/search-dispo.htm';
break;
case "it":
$f4p_form_action = 'http://prenotazione.hotel-sanlorenzo.com/bookcore/v1/search-dispo.htm';
break;
case "fr":
$f4p_form_action = 'http://reservations.hotel-sanlorenzo.com/bookcore/v1/search-dispo.htm';
break;
default:
$f4p_form_action = 'http://reservas.hotel-sanlorenzo.com/bookcore/v1/search-dispo.htm';
break;
}
?>
<form id="formReserva" action="<?php echo $f4p_form_action; ?>" method="POST">
Fecha entrada* <input class="required" type="text" placeholder="Entrada" id="calendar-entrada" readonly name="entrada" required data-msg-required="Campo 'Fecha entrada' obligatorio"/>
<span data-target="#calendar-entrada" class="calendar-trigger dashicons dashicons-calendar-alt"></span>
Fecha salida* <input clas="required" type="text" placeholder="Salida" id="calendar-salida" name="salida" readonly required data-msg-required="Campo 'Fecha salida' obligatorio"/>
<span data-target="#calendar-salida" class="calendar-trigger dashicons dashicons-calendar-alt"></span>
Código promoción <input type="text" name="codpromo" placeholder="Código promocional" />
<div class="mensajes-error"></div>
<input type="submit" value="Consultar disponibilidad">
</form>
<style>
.mensajes-error label{
color:red;
}
</style>
<script>
jQuery('.calendar-trigger').click(function(){
jQuery(jQuery(this).data('target')).trigger('focus');
});
jQuery( function() {
jQuery( "#calendar-entrada, #calendar-salida" ).datepicker({
dateFormat: "dd/mm/yy"
});
jQuery( "#calendar-entrada" ).datepicker();
jQuery( "#calendar-salida" ).datepicker();
} );
jQuery("#formReserva").validate({
errorLabelContainer: jQuery(".mensajes-error"),
rules: {
'calendar-entrada':{
required: true,
date:true
},
'calendar-salida':{
required: true,
date:true
}
}
});
</script>