增加出发日期需求框

master
candice 2 years ago
parent 9914bddd36
commit fbe0ba9d6b

@ -1285,6 +1285,13 @@
<input class="minaddBtn" id="tripLengthPlus" type="button" value="+"> <input class="minaddBtn" id="tripLengthPlus" type="button" value="+">
</div> </div>
</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>
</div> </div>
@ -1561,7 +1568,7 @@
</h3> </h3>
<div id="requirement_error_msg" style="color:#ad1818;font-size:18px;" class="hidden">(Please <div id="requirement_error_msg" style="color:#ad1818;font-size:18px;" class="hidden">(Please
specify your requests.)</div> 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>Our must-dos/must-sees for this big trip are…
<br>This would be my first/second/… visit to … <br>This would be my first/second/… visit to …
</span> </span>
@ -2254,6 +2261,7 @@ margin-right: 10px;
var $expectedDate = $('#Date_Start'); var $expectedDate = $('#Date_Start');
var $expectedMonth = $('#expectedMonth'); var $expectedMonth = $('#expectedMonth');
var $dateSelectionBlock = $('#dateSelectionBlock'); var $dateSelectionBlock = $('#dateSelectionBlock');
var $expectedTravelDateBlock = $('#expectedTravelDateBlock');
var selectedExpectedDate = ''; var selectedExpectedDate = '';
$('input[name="trip_date"]').each((i, tripDateEle) => { $('input[name="trip_date"]').each((i, tripDateEle) => {
$(tripDateEle).click(function (e) { $(tripDateEle).click(function (e) {
@ -2264,14 +2272,17 @@ margin-right: 10px;
selectedExpectedDate = selectedTripDate.id; selectedExpectedDate = selectedTripDate.id;
if (selectedTripDate.id === 'exact') { if (selectedTripDate.id === 'exact') {
$dateSelectionBlock.show(); $dateSelectionBlock.show();
$expectedTravelDateBlock.hide();
$expectedMonth.hide(); $expectedMonth.hide();
$expectedDate.show(); $expectedDate.show();
} else if (selectedTripDate.id === 'approximate') { } else if (selectedTripDate.id === 'approximate') {
$dateSelectionBlock.show(); $dateSelectionBlock.show();
$expectedTravelDateBlock.hide();
$expectedDate.hide(); $expectedDate.hide();
$expectedMonth.show(); $expectedMonth.show();
} else if (selectedTripDate.id === 'yet') { } else if (selectedTripDate.id === 'yet') {
$dateSelectionBlock.hide(); $dateSelectionBlock.hide();
$expectedTravelDateBlock.show();
} }
}) })
}); });

@ -994,6 +994,13 @@
name="trip_length" /> name="trip_length" />
<button class="minaddBtn" id='tripLengthPlus' type="button" value="+">+</button> <button class="minaddBtn" id='tripLengthPlus' type="button" value="+">+</button>
</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>
</div> </div>
</div> </div>
@ -1268,7 +1275,7 @@
<em>*</em> Any more we should know? <em>*</em> Any more we should know?
</h3> </h3>
<div id="requirement_error_msg" class="hidden">(Please specify your requests.)</div> <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>Our must-dos/must-sees for this big trip are…
<br>This would be my first/second/… visit to …</span> <br>This would be my first/second/… visit to …</span>
<textarea id="additionalrequirements" name="additional_requirements" style="resize:none;"></textarea> <textarea id="additionalrequirements" name="additional_requirements" style="resize:none;"></textarea>
@ -1802,6 +1809,7 @@ margin-right: 10px;
var $expectedDate = $('#Date_Start'); var $expectedDate = $('#Date_Start');
var $expectedMonth = $('#expectedMonth'); var $expectedMonth = $('#expectedMonth');
var $dateSelectionBlock = $('#dateSelectionBlock'); var $dateSelectionBlock = $('#dateSelectionBlock');
var $expectedTravelDateBlock = $('#expectedTravelDateBlock');
var selectedExpectedDate = ''; var selectedExpectedDate = '';
$('input[name="trip_date"]').each((i, tripDateEle) => { $('input[name="trip_date"]').each((i, tripDateEle) => {
$(tripDateEle).click(function (e) { $(tripDateEle).click(function (e) {
@ -1812,14 +1820,17 @@ margin-right: 10px;
selectedExpectedDate = selectedTripDate.id; selectedExpectedDate = selectedTripDate.id;
if (selectedTripDate.id === 'exact') { if (selectedTripDate.id === 'exact') {
$dateSelectionBlock.show(); $dateSelectionBlock.show();
$expectedTravelDateBlock.hide();
$expectedMonth.hide(); $expectedMonth.hide();
$expectedDate.show(); $expectedDate.show();
} else if (selectedTripDate.id === 'approximate') { } else if (selectedTripDate.id === 'approximate') {
$dateSelectionBlock.show(); $dateSelectionBlock.show();
$expectedTravelDateBlock.hide();
$expectedDate.hide(); $expectedDate.hide();
$expectedMonth.show(); $expectedMonth.show();
} else if (selectedTripDate.id === 'yet') { } else if (selectedTripDate.id === 'yet') {
$dateSelectionBlock.hide(); $dateSelectionBlock.hide();
$expectedTravelDateBlock.show();
} }
}) })
}); });

Loading…
Cancel
Save