Skip to content

Commit 9f0ad71

Browse files
committed
Removed hard coding of min/max duration
1 parent 5119ef5 commit 9f0ad71

1 file changed

Lines changed: 11 additions & 2 deletions

File tree

step1.php

Lines changed: 11 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -66,10 +66,17 @@
6666
<?php
6767
$date_type = $booking_criteria->date_selection->date_type;
6868
if($date_type == "DATE_NIGHTS" || $date_type == "DATE_DAYS"):
69-
$min_hdur = 7;
70-
$max_hdur = 21;
69+
$min_hdur = $booking_criteria->date_selection->duration_minimum;
70+
$max_hdur = $booking_criteria->date_selection->duration_maximum;
7171
$def_hdur = (int)$result->tour->duration;
72+
73+
if($min_hdur == $max_hdur):
7274
?>
75+
<input type="text" name="hdur" value="3" readonly="true" />
76+
<?
77+
else :
78+
?>
79+
7380
<select name="hdur">
7481
<?php
7582
for($i=$min_hdur; $i<=$max_hdur; $i++):
@@ -82,6 +89,8 @@
8289
?>
8390
</select>
8491
<?
92+
endif;
93+
8594
endif;
8695
?>
8796

0 commit comments

Comments
 (0)