65 lines
1.5 KiB
PHP
65 lines
1.5 KiB
PHP
<?php
|
|
|
|
/**
|
|
* Car Loan Calculator template.
|
|
*
|
|
* @package ThemeStarter
|
|
*/
|
|
|
|
?>
|
|
|
|
<!-- Get Header -->
|
|
<?php get_header(); ?>
|
|
|
|
<?php get_template_part('template-parts/partials/page-header') ?>
|
|
|
|
<!-- Car Loan Calculator Form -->
|
|
<section class="max-w-7xl mx-auto">
|
|
|
|
<div class="px-4 py-8">
|
|
<div>
|
|
<p style="width: 300px"><a href="http://www.carpaymentcalcualtor.net"><img src="<?php echo get_template_directory_uri(); ?>/assets/images/logos/rogers-motors-logo.png" alt="Rogers Motors Full Logo" /></a></p>
|
|
<div id="appointment-body"></div>
|
|
</div>
|
|
</div>
|
|
|
|
|
|
<style>
|
|
button#next-step,
|
|
[data-tab] {
|
|
display: none;
|
|
}
|
|
</style>
|
|
|
|
<script>
|
|
document.addEventListener('DOMContentLoaded', function() {
|
|
const appointmentForm = new AppointmentForm();
|
|
if (appointmentForm) {
|
|
const financeForm = new FinanceForm({}, appointmentForm, () => {});
|
|
const appointmentBody = document.querySelector('#appointment-body');
|
|
let userForm = financeForm.initForm();
|
|
|
|
const elementsToRemove = userForm.querySelectorAll('.finance-view-only');
|
|
elementsToRemove.forEach(element => {
|
|
element.remove();
|
|
});
|
|
|
|
appointmentBody.appendChild(userForm);
|
|
|
|
|
|
financeForm.updateView();
|
|
const advertisePriceInput = document.getElementById('advertise_price');
|
|
advertisePriceInput.value = 2500;
|
|
advertisePriceInput.dispatchEvent(new Event('input', {
|
|
bubbles: true
|
|
}));
|
|
|
|
}
|
|
});
|
|
</script>
|
|
|
|
</section>
|
|
|
|
|
|
<!-- Get Footer -->
|
|
<?php get_footer(); ?>
|