AH 新增水灯节GP线路表单

hotfix/paypal-note
Jimmy 3 years ago
parent f35ae06f82
commit 963b4bbd3c

@ -1302,6 +1302,13 @@ class Information extends CI_Controller
array('meta_product_code' => $meta_product_code, 'information' => $information), array('meta_product_code' => $meta_product_code, 'information' => $information),
true); true);
$information->ic_content = str_replace('<!--@GP-FORM@-->', $gp_form_content, $information->ic_content); $information->ic_content = str_replace('<!--@GP-FORM@-->', $gp_form_content, $information->ic_content);
// 水灯节 GP 线路表单
$gp_form_content = $this->load->view(
$template_path . '-lantern-festival-gp-form',
array('meta_product_code' => $meta_product_code, 'information' => $information),
true);
$information->ic_content = str_replace('<!--@LANTERN-GP-FORM@-->', $gp_form_content, $information->ic_content);
} }
// why-us 相关的标签 // why-us 相关的标签
$why_us_mobile = $this->load->view($template_path . '-why-us-mobile', false, true); $why_us_mobile = $this->load->view($template_path . '-why-us-mobile', false, true);

@ -23,7 +23,7 @@
</p> </p>
<div class="numberBtn"> <div class="numberBtn">
<input class="minaddBtn reduceadult" id="minusKid" type="button" value="-"> <input class="minaddBtn reduceadult" id="minusKid" type="button" value="-">
<input class="number" type="text" id="kidsNumber" readonly value="0" name="kid"> <input class="number" type="text" id="kidNumber" readonly value="0" name="kid">
<input class="minaddBtn addadult" id="plusKid" type="button" value="+"> <input class="minaddBtn addadult" id="plusKid" type="button" value="+">
</div> </div>
</div> </div>
@ -381,8 +381,11 @@
} }
_ready(el => { _ready(el => {
var adultNumberValue = el('adultNumber').value; var adultNumberValue = el('adultNumber').value;
var kidNumberValue = el('kidNumber').value;
const plusAdultBtn = el('plusAdult'); const plusAdultBtn = el('plusAdult');
const minusAdultBtn = el('minusAdult'); const minusAdultBtn = el('minusAdult');
const plusKidBtn = el('plusKid');
const minusKidBtn = el('minusKid');
plusAdultBtn.on('click', () => { plusAdultBtn.on('click', () => {
adultNumberValue++; adultNumberValue++;
@ -394,6 +397,16 @@
el('adultNumber').value = adultNumberValue; el('adultNumber').value = adultNumberValue;
} }
}); });
plusKidBtn.on('click', () => {
kidNumberValue++;
el('kidNumber').value = kidNumberValue;
});
minusKidBtn.on('click', () => {
if (kidNumberValue > 0) {
kidNumberValue--;
el('kidNumber').value = kidNumberValue;
}
});
function validateGPForm() { function validateGPForm() {
var result = true; var result = true;
@ -450,6 +463,7 @@
el.value = token; el.value = token;
gp_form.appendChild(el); gp_form.appendChild(el);
gp_form.submit(); gp_form.submit();
submitFormBtn.innerText = "Submitted successfully";
}); });
} }
} }

Loading…
Cancel
Save