credit-direct/templates/front/old/credit-step1.php
2025-12-18 09:44:42 +01:00

324 lines
19 KiB
PHP
Raw Permalink Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

<?php
$show_all_form = false;
/* if($currentCredit->type_credit == 'pat')
$show_all_form = true; */
$form_action = $show_all_form ? '#' : get_site_url().'/credit-step2';
$submit_label = $show_all_form ? 'Envoyer demande' : 'Étape suivante';
$exemple_info = $model->get_exemples_infos($currentCredit->type_credit);
?>
<section class="credit-step-header">
<div class="container">
<div class="row">
<div class="col-md-12">
<h2>Introduction de votre demande de crédit</h2>
</div>
</div>
</div>
</section>
<section class="infos-credits-top">
<div class="container">
<section class="row">
<section class="type_credit_title">
<h3>Type de crédit: <?= (string) ($creditOptionsLabels ?? '') ?></h3>
</section>
<div class="bg-light credit-recap-holder">
<div class="credit-recap col-md-12 pb-3">
<div class="credit-recap-container">
<div class="credit-info">
<div class="credit-item">
<span class="credit-label">Montant:</span>
<span class="credit-value"><?= (string) ($currentCredit->capital ?? '') ?> €</span>
</div>
<div class="credit-item">
<span class="credit-label">Taux débiteur:</span>
<span class="credit-value highlight"><?= (string) ($currentCredit->taux_nominal_annuel ?? '') ?></span>
</div>
<div class="credit-item">
<span class="credit-label">Durée:</span>
<span class="credit-value"><?= (string) ($currentCredit->duree ?? '') ?> <?php if ($currentCredit->type_credit === 'am'): ?>ans<?php else: ?>mois<?php endif ?></span>
</div>
<div class="credit-item">
<span class="credit-label">Mensualité:</span>
<span class="credit-value highlight"><?= (string) ($currentCredit->mensualite ?? '') ?>€</span>
</div>
<div class="credit-item">
<span class="credit-label">Coût total:</span>
<span class="credit-value highlight"><?= (string) ($currentCredit->cout_total ?? '') ?>€</span>
</div>
<div class="credit-item">
<span class="credit-label">TAEG:</span>
<span class="credit-value"><?= (string) ($currentCredit->taux_nominal_annuel ?? '') ?></span>
</div>
</div>
</div>
</div>
</div>
</section>
</div>
<section class="steps-holder">
<div class="container">
<section class="row">
<div class="credit-recap col-md-12 pb-3">
<div class="progress-steps">
<div class="step active">
<span class="step-number">1</span>
<span class="step-text">Contact</span>
</div>
<div class="step">
<span class="step-number">2</span>
<span class="step-text">Revenus & charges</span>
</div>
<div class="step">
<span class="step-number">3</span>
<span class="step-text">Informations personnelles</span>
</div>
<div class="step">
<span class="step-number">4</span>
<span class="step-text">Coordonnées</span>
</div>
</div>
</div>
</section>
</div>
</section>
</section>
<div class="container">
<div class="wp-credit-form">
<form class="form-submit" method="POST" class="credit-steps-form" action="<?= (string) ($form_action ?? '#') ?>">
<input type="hidden" name="credit-direct-token" value="<?php echo (string) ($currentCredit->token ?? '') ?>">
<!-- <section class="step-progress">
<ul class="progressbar">
<li class="progress-step active-step">Coordonées</li>
<li class="progress-step">Emprunteur</li>
<li class="progress-step">Crédit</li>
</ul>
</section> -->
<div class="form-row">
<div class="form-group col-md-6">
<label for="IDlastname">Nom</label>
<input name="lastname" type="text" class="form-control" id="IDlastname" value="<?php echo $model->getFieldValue('lastname', $borrower); ?>" required>
</div>
<div class="form-group col-md-6">
<label for="IDfirstname">Prénom</label>
<input name="firstname" type="text" class="form-control" id="IDfirstname" value="<?php echo $model->getFieldValue('firstname', $borrower); ?>" required>
</div>
<div class="form-group col-md-6">
<label for="IDphone">Téléphone</label>
<input name="phone" type="tel" class="form-control" id="IDphone" value="<?php echo $model->getFieldValue('phone', $borrower); ?>" required>
</div>
<div class="form-group col-md-6">
<label for="IDemail">Email</label>
<input name="email" type="email" class="form-control" id="IDemail" value="<?php echo $model->getFieldValue('email', $borrower); ?>" required>
</div>
<div class="form-group col-md-6">
<label for="IDcountry">Pays</label>
<select name="country" id="IDcountry" class="form-control" required>
<option value="BE" <?php echo $model->isOptionSelected('country', 'BE', $borrower); ?>>Belgique</option>
<option value="LU" <?php echo $model->isOptionSelected('country', 'LU', $borrower); ?>>Luxembourg</option>
</select>
</div>
<div class="form-group col-md-6">
<label for="IDzip">Code postal</label>
<input name="zip" type="text" class="form-control" id="IDzip" value="<?php echo $model->getFieldValue('code_postal', $borrower); ?>" required>
</div>
<!-- <div class="form-group col-md-4">
<label for="IDagency">Agence</label>
<select name="agency" id="IDagency" class="form-control" required>
<option value="">Veuillez faire un choix</option>
<?php foreach($agencies as $agency) : ?>
<option value="<?php echo $agency->idAgences ?>">
Agence <?php echo $agency->Nom_agence ?>
<?php if (!is_null($agency->description_agence) && $agency->description_agence !== '') : ?>
: <?php echo $agency->description_agence ?>
<?php endif ?>
</option>
<?php endforeach ?>
</select>
</div> -->
</div>
<?php if($currentCredit->type_credit == 'fin_neuve' || $currentCredit->type_credit == 'fin_occ_m3a' || $currentCredit->type_credit == 'fin_occ_p3a' || $currentCredit->type_credit == 'mobil_carav') : ?>
<div class="form-row">
<div class="form-group col-md-4">
<label for="IDmarque">Marque + Modèle</label>
<input name="marque" type="text" class="form-control" id="IDmarque" value="<?php echo $model->getFieldValue('marque_modele', $borrower); ?>" required>
</div>
<div class="form-group col-md-4">
<label for="IDvehicleregistrationdate">Date 1ère immatriculation</label>
<input name="vehicleregistrationdate" type="text" class="form-control input-date" id="IDvehicleregistrationdate" value="<?php echo $model->getFieldValue('date_premiere_immatriculation', $borrower); ?>" placeholder="JJ/MM/AAAA" data-inputmask="'mask': '99/99/9999'" required>
</div>
<div class="form-group col-md-4">
<label for="IDsellername">Nom du vendeur</label>
<input name="sellername" type="text" class="form-control" id="IDsellername" value="<?php echo $model->getFieldValue('nom_vendeur', $borrower); ?>" required>
</div>
<div class="form-group col-md-4">
<label for="IDselleraddress">Adresse du vendeur</label>
<input name="selleraddress" type="text" class="form-control" id="IDselleraddress" placeholder="Rue + numéro" value="<?php echo $model->getFieldValue('adresse_vendeur', $borrower); ?>" required>
</div>
<div class="form-group col-md-4">
<label for="IDvehicleprice">Prix d'achat du véhicule</label>
<input name="vehicleprice" type="number" class="form-control" id="IDvehicleprice" min="0" step="0.01" value="<?php echo $model->getFieldValue('prix_achat_vehicule', $borrower); ?>" required>
</div>
<div class="form-group col-md-4">
<label for="IDaccompte">Montant de lacompte</label>
<input name="vehicule_accompte" type="number" class="form-control" id="IDaccompte" min="0" step="0.01" value="<?php echo $model->getFieldValue('montant_acompte', $borrower); ?>" required>
</div>
<div class="form-group col-md-4">
<label for="IDreprise">Montant de la reprise</label>
<input name="vehicule_reprise" type="number" class="form-control" id="IDreprise" min="0" step="0.01" value="<?php echo $model->getFieldValue('montant_reprise', $borrower); ?>">
</div>
<div class="form-group col-md-4">
<label for="IDemprunt">Montant à emprunter</label>
<input name="vehicule_emprunt" type="number" class="form-control" id="IDemprunt" value="<?= (string) ($currentCredit->capital ?? '') ?>" min="0" step="0.01" readonly>
</div>
<div class="form-group col-md-4">
<label for="IDduree">Durée</label>
<input name="vehicule_duree" type="number" class="form-control" id="IDduree" value="<?= (string) ($currentCredit->duree ?? '') ?>" min="0" step="1" readonly>
</div>
</div>
<?php endif ?>
<?php if ($currentCredit->type_credit == 'am') : ?>
<div class="form-row">
<div class="form-group col-md-4"><label for="IDestateloantype">Type de crédit</label>
<select name="estateloantype" id="IDestateloantype" class="form-control" required>
<option value="">Veuillez sélectionner votre type de prêt</option>
<?php foreach ($mapHouseCreditTypes as $value => $label): ?>
<option value="<?php echo $value ?>" <?php echo $model->isOptionSelected('type_credit_immobilier', $value, $borrower); ?>><?php echo $label ?></option>
<?php endforeach ?>
</select>
</div>
<div class="form-group col-md-4">
<label for="IDestatebuyingprice">Prix d'achat</label>
<input name="estatebuyingprice" type="number" class="form-control" id="IDestatebuyingprice" min="0" step="0.01" value="<?php echo $model->getFieldValue('prix_achat_immobilier', $borrower); ?>">
</div>
<div class="form-group col-md-4">
<label for="IDprix_achat_tvac">Prix de la construction TVAC</label>
<input name="prix_achat_tvac" type="number" class="form-control" id="IDprix_achat_tvac" min="0" step="0.01" value="<?php echo $model->getFieldValue('prix_construction_tvac', $borrower); ?>">
</div>
<div class="form-group col-md-4">
<label for="IDvaleur_batiment">Valeur du bâtiment </label>
<input name="valeur_batiment" type="number" class="form-control" id="IDvaleur_batiment" min="0" step="0.01" value="<?php echo $model->getFieldValue('valeur_batiment', $borrower); ?>">
</div>
<div class="form-group col-md-4">
<label for="IDestateequity">Fonds propres</label>
<input name="estateequity" type="number" class="form-control" id="IDestateequity" min="0" step="0.01" value="<?php echo $model->getFieldValue('fonds_propres', $borrower); ?>">
</div>
<div class="form-group col-md-4">
<div class="col-form-label">
<b>Compromis signé</b>
</div>
<div class="form-check form-check-inline">
<input name="estatecompromise" type="radio" class="form-check-input" id="ID1estatecompromise" value="0" <?php echo $model->isRadioChecked('compromis_signe', '0', $borrower); ?>>
<label class="form-check-label" for="ID1estatecompromise">Non</label>
</div>
<div class="form-check form-check-inline">
<input name="estatecompromise" type="radio" class="form-check-input" id="ID2estatecompromise" value="1" <?php echo $model->isRadioChecked('compromis_signe', '1', $borrower); ?>>
<label class="form-check-label" for="ID2estatecompromise">Oui</label>
</div>
</div>
<div class="form-group col-md-4">
<label for="IDestatcadastralincome">Montant du revenu cadastral</label>
<input name="estatcadastralincome" type="number" class="form-control" id="IDestatcadastralincome" min="0" step="0.01" value="<?php echo $model->getFieldValue('revenu_cadastral', $borrower); ?>">
</div>
<div class="form-group col-md-4">
<label for="IDbatiment_emprunt">Montant à emprunter</label>
<input name="batiment_emprunt" type="number" class="form-control" id="IDbatiment_emprunt" min="0" step="0.01" value="<?php echo $model->getFieldValue('montant_emprunt_immobilier', $borrower); ?>" required>
</div>
<div class="form-group col-md-4">
<label for="IDbatiment_duree">Durée (ans)</label>
<input name="batiment_duree" type="number" class="form-control" id="IDbatiment_duree" min="10" max="30" step="1" value="<?php echo $model->getFieldValue('duree_emprunt_immobilier', $borrower); ?>" required>
</div>
</div>
<?php endif ?>
<fieldset class="comment_fieldset col-md-12">
<legend>Commentaires et informations complémentaires</legend>
<div class="form-group">
<label for="IDcomment">Commentaires</label>
<textarea name="comment" class="form-control" id="IDcomment" rows="6"><?php echo $model->getFieldValue('commentaires', $borrower); ?></textarea>
</div>
</fieldset>
<div class="form-group">
<div class="form-check form-check-inline">
<input class="form-check-input" type="checkbox" name="rgpd" value="1" id="rgpdID" required>
<label class="form-check-label" for="rgpdID">
J'accepte <a href="https://credit-direct.be/vie-privee/" target="_blank">les conditions générales de Crédit Direct</a>
</label>
</div>
</div>
<div class="form-group">
<input type="hidden" name="wpcfstep" value="step1">
<input type="hidden" name="isback" value="<?php echo $is_from_back ? '1' : '0' ?>">
<input type="hidden" name="type_credit_selected" value="<?= (string) ($type_credit_selected ?? '') ?>">
<?php
if($show_all_form) {
?>
<input type="hidden" name="save_all_form" value="1">
<?php
}
?>
</div>
<div class="form-group">
<button class="btn btn-primary" type="submit" class="submit-demande" disabled>Etape suivante</button>
</div>
</form>
<section class="info-credits-step">
<div class="col-md-12 py-5">
<div class="row">
<div class="col-md-6">
<p class="font-weight-bold col-md-8">Montant emprunté :</p>
<span class="col-md-4 text-right"><?= (string) ($currentCredit->capital ?? '') ?> €</span>
<p class="font-weight-bold col-md-8">Durée :</p>
<span class="col-md-4 text-right"><?= (string) ($currentCredit->duree ?? '') ?> <?php if ($currentCredit->type_credit === 'am'): ?>ans<?php else: ?>mois<?php endif ?></span>
<p class="font-weight-bold col-md-8">Mensualité :</p>
<span class="col-md-4 text-right"><?= (string) ($currentCredit->mensualite ?? '') ?> €</span>
</div>
<div class="col-md-6">
<p class="font-weight-bold col-md-8">Coût Total :</p>
<span class="col-md-4 text-right"><?= (string) ($currentCredit->cout_total ?? '') ?> €</span>
<p class="font-weight-bold col-md-8">Taux nominal annuel :</p>
<span class="col-md-4 text-right"><?= (string) ($currentCredit->taux_nominal_annuel ?? '') ?></span>
<p class="font-weight-bold col-md-8">TAEG :</p>
<span class="col-md-4 text-right"><?= (string) ($currentCredit->taux_nominal_annuel ?? '') ?></span>
</div>
</div>
</div>
<div class="exemple-info">
<?php if (!empty($exemple_info)) : ?>
<?= $exemple_info ?>
<?php endif; ?>
</div>
</section>
</div>
</div>