增加出发日期需求框

master
candice 2 years ago
parent 9914bddd36
commit fbe0ba9d6b

@ -1285,6 +1285,13 @@
<input class="minaddBtn" id="tripLengthPlus" type="button" value="+">
</div>
</div>
<div id="expectedTravelDateBlock" style="display: none">
<p>Tell us your expected travel date.</p>
<span class="formNote">
E.g.: I want to start my trip when the weather at its best/during the local festival/during the off season/on the first week of the November...
</span>
<textarea id="date_requirements" name="date_requirements" style="resize:none;"></textarea>
</div>
</div>
</div>
@ -1561,7 +1568,7 @@
</h3>
<div id="requirement_error_msg" style="color:#ad1818;font-size:18px;" class="hidden">(Please
specify your requests.)</div>
<span class="formNote">E.g. This is a big trip for: ____'s birthday, our __-year anniversary, honeymoon, retirement, kid's graduation, bucket list…
<span class="formNote">E.g. This is a big trip for my husband's birthday, our 20-year anniversary, honeymoon, retirement, kid's graduation, bucket list…
<br>Our must-dos/must-sees for this big trip are…
<br>This would be my first/second/… visit to …
</span>
@ -2254,6 +2261,7 @@ margin-right: 10px;
var $expectedDate = $('#Date_Start');
var $expectedMonth = $('#expectedMonth');
var $dateSelectionBlock = $('#dateSelectionBlock');
var $expectedTravelDateBlock = $('#expectedTravelDateBlock');
var selectedExpectedDate = '';
$('input[name="trip_date"]').each((i, tripDateEle) => {
$(tripDateEle).click(function (e) {
@ -2264,14 +2272,17 @@ margin-right: 10px;
selectedExpectedDate = selectedTripDate.id;
if (selectedTripDate.id === 'exact') {
$dateSelectionBlock.show();
$expectedTravelDateBlock.hide();
$expectedMonth.hide();
$expectedDate.show();
} else if (selectedTripDate.id === 'approximate') {
$dateSelectionBlock.show();
$expectedTravelDateBlock.hide();
$expectedDate.hide();
$expectedMonth.show();
} else if (selectedTripDate.id === 'yet') {
$dateSelectionBlock.hide();
$expectedTravelDateBlock.show();
}
})
});

@ -994,6 +994,13 @@
name="trip_length" />
<button class="minaddBtn" id='tripLengthPlus' type="button" value="+">+</button>
</div>
<div id="expectedTravelDateBlock" style="display: none">
<p>Tell us your expected travel date.</p>
<span class="formNote">
E.g.: I want to start my trip when the weather at its best/during the local festival/during the off season/on the first week of the November...
</span>
<textarea id="date_requirements" name="date_requirements" style="resize:none;"></textarea>
</div>
</div>
</div>
</div>
@ -1268,7 +1275,7 @@
<em>*</em> Any more we should know?
</h3>
<div id="requirement_error_msg" class="hidden">(Please specify your requests.)</div>
<span class="formNote">E.g. This is a big trip for: ____'s birthday, our __-year anniversary, honeymoon, retirement, kid's graduation, bucket list…
<span class="formNote">E.g. This is a big trip for my husband's birthday, our 20-year anniversary, honeymoon, retirement, kid's graduation, bucket list…
<br>Our must-dos/must-sees for this big trip are…
<br>This would be my first/second/… visit to …</span>
<textarea id="additionalrequirements" name="additional_requirements" style="resize:none;"></textarea>
@ -1802,6 +1809,7 @@ margin-right: 10px;
var $expectedDate = $('#Date_Start');
var $expectedMonth = $('#expectedMonth');
var $dateSelectionBlock = $('#dateSelectionBlock');
var $expectedTravelDateBlock = $('#expectedTravelDateBlock');
var selectedExpectedDate = '';
$('input[name="trip_date"]').each((i, tripDateEle) => {
$(tripDateEle).click(function (e) {
@ -1812,14 +1820,17 @@ margin-right: 10px;
selectedExpectedDate = selectedTripDate.id;
if (selectedTripDate.id === 'exact') {
$dateSelectionBlock.show();
$expectedTravelDateBlock.hide();
$expectedMonth.hide();
$expectedDate.show();
} else if (selectedTripDate.id === 'approximate') {
$dateSelectionBlock.show();
$expectedTravelDateBlock.hide();
$expectedDate.hide();
$expectedMonth.show();
} else if (selectedTripDate.id === 'yet') {
$dateSelectionBlock.hide();
$expectedTravelDateBlock.show();
}
})
});

Loading…
Cancel
Save